[p4ruby] p4.run_changes with user yields no results
tony at smee.org
Thu Apr 26 07:55:26 PDT 2007
Yes, it's because " 5" gets converted to an integer (5) easily, whereas you
probably didn't mean your username to be " jcowlishaw" (note the leading
space). Just a feature of Perforce's argument parsing - you can reproduce the
same thing from the command line like this:
p4 changes "-u jcowlishaw" "-m 5"
Another feature though is that the space is optional, so this works in both
P4Ruby and the command line:
p4 changes -ujcowlishaw -m5 ...
On Thursday 26 April 2007 12:59, James Cowlishaw wrote:
> My goodness, thank you.
> Any ideas why p4.run_changes("-m 5") works as I'd imagine?
> On 26/04/07, Robert Cowham <robert at vaccaperna.co.uk> wrote:
> > Try passing in an array of parameters (argv style):
> > changes = p4.run_changes("-u", "jcowlishaw")
> > Robert
> > ------------------------------
> > *From:* p4ruby-bounces at perforce.com [mailto:p4ruby-bounces at perforce.com]
> > *On Behalf Of *James Cowlishaw
> > *Sent:* 26 April 2007 12:24
> > *To:* p4ruby at perforce.com
> > *Subject:* [p4ruby] p4.run_changes with user yields no results
> > Hey guys,
> > Being new to this. I'm having troubles with listing change lists.
> > The following code produces an empty array
> > changes = p4.run_changes("-u jcowlishaw")
> > while
> > p4 changes -u jcowlishaw
> > produces a long list.
> > I know the p4.connect has worked, because
> > changes = p4.run_changes("-m 5")
> > produces the last five change lists on the server.
> > Am I doing something wrong, or is there a server incompatibility (I'm
> > connecting to a 2006.2/113956 server)?
> > Thanks in advance for any hints you can give.
> > James.
More information about the p4ruby