On 3-Nov-2008, at 7:14 AM, Joerg Sonnenberger wrote:
On Mon, Nov 03, 2008 at 12:12:29PM +0200, Alan Barrett wrote:This is traceable to a design flaw in the way cvs handles the magic 1.1.1 vendor branch.Actually, this is more a design flaw of time-based checkouts not workingwith branches very well in general :)
Well, sort of, though it's really still just a usage issue -- and unfortunately the correct usage might not quite be intuitive or well documented, at least not for these more complex cases.
In general one should not ever use '-D' without an explicit '-r' at the same time (and the '-r' must specify a branch that is not the vendor branch as specific times have no real meaning on the vendor branch and indeed the vendor branch is not a true full-fledged CVS branch anyway).
I think one trick though is that if there are other branch revisions in any selected files, and especially if anything other than the trunk is/was ever the default branch (which is what Alan was talking about with the "branch" and "head" values in the ,v file) then one must explicitly mention the trunk as the desired branch to select on with "- r 1".
Personally I think if you're down to using '-D' on checkout for _any_ reason whatsoever then things have got way too far out of hand in your project. Of course it can be useful to use date checkouts for debugging untested changes in projects which have grown too large and complex for finding bugs just by viewing diffs, but that's what I mean by getting out of hand -- the project is too large and too complex and/ or too poorly managed (not enough regression tests and tests for each change) if bugs can get lost in time such that time slices are needed to narrow down the problematic changes.
So, anyway, to reiterate: never use '-D' without also giving a valid '-r'; and in doing so the trunk must be specified using its true branch number, eg. with '-r 1', and any other regular branch must be specified using its branch tag name (since the trunk branch is the only one guaranteed to always have the same branch number in all files at all times).
In an ideal world one should never use sticky dates in CVS working directories if you can possibly avoid it. Use them only to narrow down the set of revisions causing problems when doing a binary search between two known dates bracketing the issue and when builds are necessary to identify the issue (i.e. when viewing diffs alone is not sufficient). Also, never make changes in a directory with a sticky date.
-- Greg A. Woods; Planix, Inc. <woods%planix.ca@localhost>
Description: This is a digitally signed message part