[p4] Creating trigger when a label is applied

P4Reg <[email protected]> Thu, 3 May 2018 08:15:01 -0700
Newsgroups gmane.comp.version-control.perforce
Message-ID <[email protected]>
Posted on behalf of forum user 'P4Reg'.

>  a command which gives details of the files which are part of the label but
haven't had any luck yet

p4 files @labelname

The output has extra information e.g.

p4 files @jam-2.1.0-mac-export
//depot/Jam/MAIN/src/Build.com#6 - edit change 289 (text)
//depot/Jam/MAIN/src/Jambase#123 - edit change 308 (text)
//depot/Jam/MAIN/src/Jambase.5#24 - edit change 182 (text)

To output just the file#rev you can use the -F formatting option e.g.:

p4 -ztag -F "%depotFile%#%rev%" files @=jam-2.1.0-mac-export
//depot/Jam/MAIN/src/Build.com#6
//depot/Jam/MAIN/src/Jambase#123
//depot/Jam/MAIN/src/Jambase.5#24


You can read more about the -F option here in the following blog post   
https://www.perforce.com/blog/130826/fun-formatting  and in this Knowledge Base
article   Formatting p4 command output using the -F global option with examples
[http://answers.perforce.com/articles/KB/15148/?q=Formatting+p4+command+output+using+the+-F+global+option+with+examples&l=en_US&fs=Search&pn=1]



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/5714-creating-trigger-when-a-label-is-applied
_______________________________________________
perforce-user mailing list  -  [email protected]
http://maillist.perforce.com/mailman/listinfo/perforce-user