[p4] yet again

David Weintraub qazwart at gmail.com
Tue May 8 17:18:08 PDT 2007


On 5/8/07, Steve M. Robbins <steve at sumost.ca> wrote:
>
> I wonder if you could expand on this a bit.
>
> For example, what are you referring to by "newer label spec feature"?
> On our 2006.1 server, at least, "Revision:" doesn't appear in the
> label spec, so I assume you must be speaking of a newer p4.

Take a look at:

$ p4 help undoc

I believe that's where I saw it described.

Basically, you add a "Revision:" field when you do a "p4 label", and
put in revision specifier much the same way you do when you put it in
the "p4 files" or "p4 sync" command.  The revision specifier can be a
date, a changelist, or even another label. All files that match that
specifier will be "labeled" without first having to do a "p4
labelsync". It's like an alias to the revision specifier.

The advantage is that this is much faster since you don't have to
attach a label to each revision. Plus, there are fewer entries needed
in the database. The disadvantage is that this is a dynamic label, so
the underlying label could change without you knowing it. Or, someone
could edit the Revision specifier, and your label gets changed without
your knowledge.

Some people have a label like "BUILD" that they attach to their latest
build. This would be a great type of label to do something like this
with.


>
> I'm mainly curious about the comment regarding database overhead for a
> label.  I'm new to p4 and naively a label seems like the right tool to
> identify released code versions.  However, my boss -- who has
> previously used p4 -- is allergic to labels and I think part of the
> reason has to do with DB storage.  Is a label a lot of overhead?  I
> imagine that a label is basically the same size as a changelist as
> conceptually both have to store pairs of (filename,revision).
>
> I just had a look at the 2006.2 version of p4guide and there I
> see a discussion about "automatic" labels, that describes
> the Revision field.  I guess this is what Jeff Bowles is referring
> to.  An automatic label is described as a changelist alias, so I
> imagine it to be a simple, O(1) space, entry in the DB.  Is this
> what you are thinking of when you say it has
>
>     very low database storage overhead compared to using "p4
>     labelsync"
>
> ?
>
> Thanks,
> -Steve
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>


-- 
--
David Weintraub
qazwart at gmail.com


More information about the perforce-user mailing list