I thought I read recently (either in Cederqvist, the CVS FAQ, or this list) that
using "-r 1" was unsupported and not guarenteed to work in all versions of CVS,
especially in the future. It is also ambiguous at best that using "-r 1" will
automagically be interpreted properly if someone commits revision 2.1 or higher
on the trunk, although your test shows that this works OK for your specific CVS
release (1.10.8?). At the least, a simple, unambiguous, and well-documented way
to refer to the newest revision on the trunk would be handy to have. It seems
that defining a tag ".TRUNK" (or similar) would be the simplest way to
accomplish this.
It would also be desirable if the definitions of "HEAD" and "BASE" could be
clarified as well.
Alan Thompson
Please respond to [EMAIL PROTECTED] (CVS-II Discussion Mailing List)
To: [EMAIL PROTECTED] (CVS-II Discussion Mailing List)
cc: (bcc: Alan Thompson/Orincon)
Subject: RE: Proposed new aliases, like HEAD
[ On Wednesday, March 29, 2000 at 10:59:32 (-0600), Cameron, Steve wrote: ]
> Subject: RE: Proposed new aliases, like HEAD
>
> Either interpretation of HEAD is pretty simple to code, _if I'm right_.
> Just a matter of calling rcs_head() or rcs_branch_head() for the "HEAD"
> specific code. Whatever way it's done, it ought to be consistent, the
> smallest change to make it consistent is to change "cvs diff". Changing
> all the other usages of HEAD to match how "cvs diff" does it isn't hard
> either though. But, having it inconsistent is a bug, and even if I don't
ever
> use HEAD I still want the bug fixed.
The inconsistency is indeed "bad" and should be fixed.
For anyone using branches, such as for release and patch branches, I
find the behaviour in "cvs diff" where HEAD matches the head of the
current branch, to be the most useful and most logical.
Since anyone can always refer to the trunk by a very simple and
easy-to-remember number (i.e. "1"), the other option (i.e. of removing
the feature from "cvs diff") seems very wasteful to me.
> If somebody is interested, I can try to make a version of my patch that
> makes HEAD work as it does for "cvs diff" in all the other cases. I don't
> think it's very hard. (Hardest part will probably be fixing sanity.sh...)
I'd be interested but don't bother to do it just on my account alone --
I'll be able to to the same when I get some free time too....
> > You don't really want it to be a CVS
> > magic branch tag but rather just the real RCS trunk branch identifier.
>
> [smc] Oh...I thought you meant you had some way to make a name for
> the trunk as I described above. Tagging the trunk, while useful, isn't as
> ideal, to my mind, as a real branch-tag name that means the trunk.
But tagging the trunk with its RCS branch identifier (i.e. "1") is
indeed exactly what you need to do if you want to create a symbolic name
to refer to the trunk. You most definitely do not want to try to create
a CVS magic branch tag for the trunk -- that will not work right.
Also, I have confirmed that using "1" will work just fine even if
someone has rolled the release number up to 2.x (and 3.x and so on).
So, just "cvs tag -r 1 TRUNK" iff you want such a name and you are not
comfortable using "-r 1" instead. There's no need to clutter the
namespace of magic tags when an ordinary one will do for those who feel
they need it.
--
Greg A. Woods
+1 416 218-0098 VE3TCP <[EMAIL PROTECTED]> <robohack!woods>
Planix, Inc. <[EMAIL PROTECTED]>; Secrets of the Weird <[EMAIL PROTECTED]>