List Info

Thread: Re: changelist # retrieval




Re: changelist # retrieval
country flaguser name
United Kingdom
2007-02-07 16:31:59
All commands take an array like ARGV:

Try:
   p4.run_add("-c", "#",
"change.txt") 

> -----Original Message-----
> From: p4ruby-bouncesperforce.com 
> [mailto:p4ruby-bouncesperforce.com] On Behalf Of
Andy Koch
> Sent: 07 February 2007 18:18
> Cc: p4rubyperforce.com
> Subject: Re: [p4ruby] changelist # retrieval
> 
> Thanks Jeff,
> 
> That helped a great deal.  Now I'm having what I
consider a 
> spooky problem.
> 
> My code is now...
> 
> ###############################################
> require 'P4'
> p4 = P4.new
> 
> begin
>   p4.debug=3
>   p4.parse_forms
>   p4.connect
>   p4.run_login
> 
>   change = p4.run_change( "-o" ).shift
>   change[ "Description" ] = "Andy
Testing : p4ruby"
> 
>   p4.input( p4.format_changelist(change) )
>   p4.run_change( "-i" )
> 
>   changelist_num = p4.output.to_s.split(/s+/)[1]
> 
>   p4.run_add("-c #
change.txt")
>   p4.run_edit("-c #
stuff.txt")
> 
>   # No Submit yet
>   #p4.input( change )
>   #p4.run_submit( "-i" )
> rescue P4Exception => ex
>   puts "Exception Caught: nn #"
> ensure
>   p4.disconnect
> end
> ############################################
> 
> But I keep getting an error related to the p4 add
command...
> 
> _________________________________________
> Exception Caught:
> 
>  [P4#run] Errors during command execution( "p4 add
-c 87651 
> change.txt" )
> 
>     [Error]: Usage: add/edit/delete [-c changelist#] [
-f ] 
> [-t type] files...
> Missing/wrong number of arguments.
> _________________________________________
> 
> Which is very strange because if I copy that command
"p4 add 
> -c 87651 change.txt" and run from cmd line it
works.
> 
> Am I missing something?
_______________________________________________
p4ruby mailing list
p4rubyperforce.com

http://maillist.perforce.com/mailman/listinfo/p4ruby

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )