[p4ruby] p4 changelist

Andy Koch andy.koch at pc-doctor.com
Mon Apr 14 17:40:58 PDT 2008


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

Andy Koch wrote:
> question with new P4ruby,
>
> with the old p4ruby I could get the changelist number for a pending 
> changelist by parsing the output property, but now this method is gone
>
> is there a new way to get the changelist number?
>
> Old Way...
> changelist_num = params['p4'].output.to_s.split(/\s+/)[1]
>
>   

-- 
Andy Koch, Web Applications Developer




More information about the p4ruby mailing list