Jump to content


p4.run("opend", ... ) does not work

P4ruby run API run opened

  • Please log in to reply
3 replies to this topic

#1 apl.matumoto@gmail.com

apl.matumoto@gmail.com

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 08 November 2016 - 10:40 AM

Hi,

Some of p4.run("command") does not work in my environment.

p4.run("opened", "...") returns void array in my env while it gives me some messages when typed "p4 opened ..." via command line.
Is this a spec of P4API? Does anyone kindly check whether it works properly with your environment?

Other commands such as "
p4.run("filelog", "...")
"  or  "
p4.run("info")
" works properly.


UNIX%> p4 opened ...
//depot/project/AAAAAA/trunk/chip/ZZZ/src/uvm/ssharness/aaa_sub_env_pkg.sv#1 - edit default change (text+k)
//depot/project/AAAAAA/trunk/chip/ZZZ/src/uvm/top/tests.sv#22 - edit default change (text)
//depot/project/AAAAAA/trunk/chip/ZZZ/vflist/chip_tb.fl#44 - edit default change (text+k) *locked*

require "P4"
require 'pp'
$p4 = P4.new
$p4.port = "xyz.com:1668"
$p4.connect
ary=$p4.run("opened", "...")

pp ary

Version:
p4api-2014.1.821990
p4ruby-2014.1.846327

Thanks,

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1084 posts

Posted 08 November 2016 - 04:19 PM

Check that you're using the right client?  "filelog" and "info" don't limit their output to a particular client, "opened" does.

#3 apl.matumoto@gmail.com

apl.matumoto@gmail.com

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 09 November 2016 - 02:21 PM

Hi,

Please help me understand in detail.

How should I check I am in the right client?

after connecting p4,
"$p4.client"  returns valid directory name which is the same as what is reported by the command "UNIX%> p4 info" as "Client name"

Thanks,

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1084 posts

Posted 09 November 2016 - 09:06 PM

Since you can run "p4 info" that's a good way to check that your app is picking up the same environment that you have in the shell.  Run it both places and compare; the pieces of information that might affect the results you get from other commands include:
  • Server address
  • User name
  • Client name
  • Current directory
If any of those is different between the two environments you'll very likely get different results from some commands.





Also tagged with one or more of these keywords: P4ruby run, API, run, opened

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users