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

Karr, David david.karr at wamu.net
Wed Mar 26 08:44:15 PDT 2008

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?

More information about the perforce-user mailing list