[p4] How to get newest label matching a regexp?

Ivey, William william_ivey at bmc.com
Wed Mar 26 10:56:47 PDT 2008


It's an "undocumented" feature that's documented in the
"p4 help undoc" text. It's been around for a long time.

-Wm


-----Original Message-----
From: Karr, David [mailto:david.karr at wamu.net] 
Sent: Wednesday, March 26, 2008 11:52 AM
To: Ivey, William; perforce-user at perforce.com
Subject: RE: [p4] How to get newest label matching a regexp?

I don't appear to find a "-ztag" command-line option.  Is that only
available in 2007.3? 

> -----Original Message-----
> From: Ivey, William [mailto:william_ivey at bmc.com] 
> Sent: Wednesday, March 26, 2008 9:22 AM
> To: Karr, David; perforce-user at perforce.com
> Subject: RE: [p4] How to get newest label matching a regexp?
> 
> If you use the -ztag option:
> 
> p4 -ztag labels
> 
> You'll get timestamps down the the second in easy to compare 
> epoch-seconds format:
> ... Update 1156897852
> ... Access 1156897851
> 
> You will have to process multiple lines of output per label.
> Each line is nicely prefixed, though, so it's not too bad.
> 
> -Wm
> 
> 
> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of Karr, David
> Sent: Wednesday, March 26, 2008 10:44 AM
> To: perforce-user at perforce.com
> Subject: [p4] How to get newest label matching a regexp?
> 
> I need to write a procedure to get the newest label that 
> matches a regular expression.  I can see how to do this 
> conceptually, but there's a minor problem.
> 
> In P4Win, the list of labels lists the label creation time 
> down to the second.  However, running "p4 labels" from the 
> command line only gets this down to the day.  If two labels 
> were created on the same day, I don't know which one is newer.
> 
> Is the order of the output of "p4 labels" significant?  Are 
> they in creation order, or in alphabetical order?
> 
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com 
> http://maillist.perforce.com/mailman/listinfo/perforce-user
> 
> 
> 




More information about the perforce-user mailing list