[p4] Scripting label creation

David Weintraub qazwart at gmail.com
Thu Apr 10 11:33:51 PDT 2008


Have you looked at the various P4 scripting integrations? I've used
P4perl for a while. It allows you to create Perforce forms using their
Perl classes. There's also a P4ruby and a P4python too. This would be
the easiest and most transparent way of doing this. Otherwise you can
do the old standby:

p4 label -o <label> | <formEditingProgram> | p4 label -i

The -o prints out the label, the -i takes the label information from
standard in. The only question is what you can use as your
formEditingProgram. In Unix, you can easily use "sed" to find the
line, and edit it the way you want.

On Wed, Apr 9, 2008 at 9:43 PM, Yamuna Ramasubramaniyan
<YRamasubramaniyan at webroot.com> wrote:
> Hello,
>
>  I am trying to script label creation to go along with our daily builds
>  (I am aware that labeling is wasteful and there are better methods, but
>  that's for phase II of our build system).  I can't make sense of the p4
>  label command though.  I'm trying to avoid cat file | p4 label -i, but I
>  can't seem to find any way around it.
>
>  Here's what I have:
>  P4 label -o TemplateLabel newLabel > temp.file
>  editlabelDescription(temp.file)    --- I need to store a description of
>  the label
>  cat temp.file | p4 label -i
>
>  I'm sure there are more elegant solutions, could someone please
>  enlighten me?
>
>  Thanks,
>  Yamuna
>
>  _______________________________________________
>  perforce-user mailing list  -  perforce-user at perforce.com
>  http://maillist.perforce.com/mailman/listinfo/perforce-user
>



-- 
--
David Weintraub
qazwart at gmail.com


More information about the perforce-user mailing list