[p4] How to determine what labels a file has

Weintraub, David david.weintraub at bofasecurities.com
Mon Oct 16 07:07:54 PDT 2006


I wouldn't get too embarrassed by this. It isn't an obvious answer. In
most version control systems, the equivalent of "p4 labels" simply
displays the labels created and doesn't tell you which files have these
labels. In those systems, you'd use something like "p4 fstat" or "p4
filelog" to display the labels on a particular version of a file.

It took me a while to figure this out, and I went through the admin and
user manuals a few times. Then, I did a "p4 help commands" and "p4 help
undoc" to look for the that missing command. I don't remember when the
eureka moment was, but I believe I simply either stumbled across it, or
I saw someone else mentioning it on the list.

In fact, I just asked a very similar question here last week: Is "p4
labels <fileVersion>" the best way to see whether or not a particular
version of a file has any labels attached to it. (Answer: Yes it is).

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Jamison, Shawn
Sent: Friday, October 13, 2006 10:17 AM
To: Sweeney, Tony; perforce-user at perforce.com
Subject: Re: [p4] How to determine what labels a file has

Thank you.

Now that I'm feeling just a little embarrassed I think I'll go hide
somewhere or torture a user.

-Shawn J>
Babs/Perforce Admin

-----Original Message-----
From: Sweeney, Tony [mailto:sweeney at ea.com]
Sent: Friday, October 13, 2006 10:09 AM
To: Jamison, Shawn; perforce-user at perforce.com
Subject: RE: [p4] How to determine what labels a file has

[sweeney at cgdata triggers]$ p4 help labels

    labels -- Display list of defined labels

    p4 labels [ file[revrange] ]

        Reports the list of all labels currently known to the system.

        If files are specified, 'p4 labels' limits its report to labels
        that contain those files.  If the file specification includes
        a revision range, 'p4 labels' limits its report to labels that
        contain those particular revisions.  See 'p4 help revisions'
        for help specifying revisions.

[sweeney at cgdata triggers]$

quis custodiet ipsos custodes -- Juvenal VI, 347-8  

> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of Jamison, 
> Shawn
> Sent: 13 October 2006 14:37
> To: perforce-user at perforce.com
> Subject: [p4] How to determine what labels a file has
> 
> How can I determine what labels have been applied to a file?
> 
> I have an source escrow issue where I need to prove that a particular 
> file has the appropriate labels for test and release and I can not see

> an easy way to accomplish that task.
> 
> I'm surprised that I can see the labels applied to a file by looking 
> at it's properties or history.
> 
> Thanks for your help
> -Shawn J>
> 
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com 
> http://maillist.perforce.com/mailman/listinfo/perforce-user
> 

_______________________________________________
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