[p4] How can I tell if a changelist was added to a label?
Weintraub, David
david.weintraub at bofasecurities.com
Tue Oct 17 06:02:47 PDT 2006
I would think there could be something like this:
$ p4 files //...@><changeList>,@=<label>
which might work. No, the above doesn't work, but I was hoping that
someone else would come up with the magic combination of revision
specifications. I've tried quite a few things, and didn't quite get what
I want.
This is much trickier than it seems. For example, I am interested in
changelist 7000 and label MY_LABEL. File "foo" hasn't been changed since
changelist 5000, but I've labeled it "MY_LABEL". Then, there's another
file "bar" that was changed in changelist 7000 and 7500, and I've
labeled it "MY_LABEL". This file is good because the version labeled
(although not the version in changelist 7000) does include changes made
in changelist 7000. So, by looking at this:
$ p4 files //... at MY_LABEL would give me this:
//depot/foo - edit change 5000 (text)
//depot/bar - edit change 7500 (text)
//depot/barfoo - edit change 7000 (text)
I get three different changelist numbers, but all three are files match
my criteria. File "foo" was last changed in changelist 5000, so there is
no foo at 7000 to choose. File "bar at 7500" does include changelist 7000's
changes, and "barfoo" was actually changed in changelist 7000 (although
may have been changed in a later version too).
The only way I can think of doing something like this is to take the
output of:
$p4 files //... at MY_LABEL
and compare it against the output of:
$p4 files //... at 7000
Where all the files listed in the first command are either in an equal
or greater than version number of the files outputted in the second
command.
This would take a bit of scripting to get you the answer, but it would
be possible. Unless, of course, someone could come up with a way with a
single "p4 files" command and by specifying revisions that would give
you the same answer.
-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Jeff Grills
Sent: Monday, October 16, 2006 1:05 PM
To: darrylw at hb-studios.com; 'Perforce Users'
Subject: Re: [p4] How can I tell if a changelist was added to a label?
I think this might work for your needs - you'll see all the changes that
contribute to a label:
p4 changes //... at LABEL
If you want to consider only the changes that contributed the exact
revisions of the files in the label (instead of all revisions up to the
head for each file), you can use this command:
p4 changes //... at LABEL,LABEL
If you add "-m 1" to either command, p4 will report only the highest
change number, which might suit your needs.
j
-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Darryl G.
Wright
Sent: Monday, October 16, 2006 9:10 AM
To: 'Perforce Users'
Subject: [p4] How can I tell if a changelist was added to a label?
Hey All,
I need to know if a specific change made it into a label update. Is
there a quick command I can use to find out either the last/largest
change list # that was added to a label or whether or if a specific
change list # made it into the label?
Thanks,
Darryl
--
Darryl G. Wright
Technical Lead
HB Studios
http://www.hb-studios.com
_______________________________________________
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