[p4ruby] p4 changelist

Tony Smith tony at smee.org
Fri Apr 18 01:56:55 PDT 2008

Hi Andy,

> to elaborate, my code does this...
> **********************
>  # create a new changelist and retrieve changelist number
>     change = p4.run_change( "-o" ).shift
>     p4.input( p4.format_changelist(change) )
>    p4.run_change( "-i" )
>     changelist_num = p4.output.to_s.split(/\s+/)[1]
> **********************
> the changelist_num is then used for processing to add files to the
> specific changelist, reverting empty changelists and submitting changelists
> but I've still not worked out a way to accomplish this with the new P4
> library

The output method was deleted because it was redundant really. You can get the 
output just by saving the result of the p4.run_change command. Something like 

     p4.input( p4.format_changelist(change) )
     changelist_num = p4.run_change( "-i" ).to_s.split(/\s+/)[1]


More information about the p4ruby mailing list