[p4] I finally grok "p4 labelsync"
Jeff A. Bowles
jab at pobox.com
Thu Jul 16 20:45:45 PDT 2009
Here's some gimmicks, from my own bag-of-tricks:
(1) When I write scripts that use "labelsync", I always (underline:
_always_) write "p4 labelsync -l labelname xxxxxxx#have" (or #head or
whatever), regardless of the documented behavior. I trust the tool, a whole
lot, but think that relying on the folks maintaining the script is dicey.
The redudant "#have" helps everyone understand what the intent is.
(2) Do not understand the power of the new revision-based labels. It's a
slight-bit more work, but way-more efficient for build scripts and
(3) The cheap-o developer labels ("a normal label, but something a
developer might use to reference 1-20 files instead of the entire tree") is
a godsend. I use them for "jab-passed-regression" sort of labels, to
remember what was good for the sloppy development tricks I use sometimes.
("It should all pass regressions, before checkin, but I use a label to
really track which revisions passed which tests, for my development line.")
You are plugging along the right path.
Last thought: make sure that your releases track the important stuff:
"handoffs are always recreatable" and "the version-number that we pass along
to a QA-team is a different number, the next time we hand-off to them. We do
not reuse labels, but make new label names to track new handoffs, so that we
can talk intelligently about the differences between the handoffs."
Best to ya!
Jeff Bowles - jeff at vizim.com
On Thu, Jul 16, 2009 at 3:47 PM, Tim McDaniel <tmcd at panix.com> wrote:
> On Thu, 16 Jul 2009, Tim McDaniel <tmcd at panix.com> wrote:
> > I think I finally figured out the behavior of "p4 labelsync".
> Before someone else says it, I do realize that "p4 labelsync" is
> deprecated in favor of "p4 tag", and boy howdy, does "p4 tag" look
> good now! So my accomplishment is like figuring out how to drive a
> street-legal chariot.
> > "p4 labelsync -a" with every revRange specified is identical to
> > "p4 tag", I believe.
> Except that, if the label does not exist, "p4 tag" will create it
> silently, but "p4 labelsync" will error out. (At least in 2007.3.)
> Tim McDaniel, tmcd at panix.com
> perforce-user mailing list - perforce-user at perforce.com
More information about the perforce-user