[p4] converting static labels to automatic labels
Jay Glanville
Jay.Glanville at naturalconvergence.com
Fri Jul 20 10:45:10 PDT 2007
Gordon, interesting suggestion. Thanks.
But, isn't diff2 actually doing file content comparisons? Isn't that
going to be a lot more costly for the server then simply doing revision
number comparisons?
Also, doesn't that fail when my label's view is scoped down?
For example, if the view of my label was
//depot/path/a/...
//depot/path/b/...
But the label didn't include
//depot/path/c/
Then, when executing:
p4 diff2 -q //... at label //... at changelist
It will include //depot/path/c in the diff, giving output like:
==== <none> - //depot/path/c/filename.txt#5 ====
Ie: not (<none>) in label, but in change list.
Thanks for the suggestion.
JDG
> I would go a step further and not use a workspace at all but diff2:
>
> p4 changes -m 1 //... at label
> p4 diff2 -q //... at label //... at changelist
>
> That should be faster because it doesn't have the overhead of the
> metadata operations a p4 flush does.
>
> -gordon
>
> > -----Original Message-----
> > From: perforce-user-bounces at perforce.com
> > [mailto:perforce-user-bounces at perforce.com] On Behalf Of
> Stephen Vance
> > Sent: Friday, July 20, 2007 7:15 AM
> > To: Jay Glanville
> > Cc: Perforce Users Mailing List
> > Subject: Re: [p4] converting static labels to automatic labels
> >
> > There are a couple of things to consider. Which ones you worry about
> > depends on your trust in the orderliness of your environment.
> >
> > The easy part is
> >
> > p4 changes -m 1 @label
> >
> > which, as you note, answers the question "What is the highest
> > changelist
> > number that contributes to the label?"
> >
> > Next, if you create a workspace and
> >
> > p4 sync -k @label
> > p4 sync -k -n @changelist
> >
> > you will find out if the label purely represents the
> > changelist *within
> > the constraints of your views*.
> >
> > However, both your workspace view and your label view can
> potentially
> > split changelists. If you open up those views to include your entire
> > repository, you could use a combination of 'p4 sync -k -n
> @changelist'
> > and 'p4 labelsync -n -l label @changelist' to easily
> > determine if it was
> > truly pure. If you need to keep the views restrictive then
> it's a more
> > computational task to determine.
> >
> > Steve
> >
> > Jay Glanville wrote:
> > > Hello all.
> > >
> > > I'm wanting to convert some of the old static labels we have (many
> > > containing over 60k files) into automatic ones, in the
> hopes that it
> > > will make label diffs more efficient. The conversion
> process itself
> > > isn't that hard.
> > >
> > > The hard bit is trying to determine if an automatic label
> > can represent
> > > a static label. The only way I can think of right now is
> > to find the
> > > highest change list in the label, and then perform a diff
> > between the
> > > label and the change list. But, is that the best way? Is there a
> > > simpler way (that just hasn't occurred to me yet...).
> > >
> > >
> > > So, my question to these eminent minds is this: what is the
> > best way to
> > > determine if a static label can represented by an automatic label?
---
Jay Dickon Glanville
More information about the perforce-user
mailing list