"Greg A. Woods" wrote:

>> TRUNK - top of the trunk
>> BHEAD - head of the current branch (or trunk if not on a branch)
>> PHEAD - head of the parent branch 
>>              (or trunk if the file split from the trunk)
>> TBASE - point at which this file left the trunk.
>>              Same as self if not on a branch.
>> SPLIT - point at which this file left was branched.
>>              Same as self if not on a branch.
>
> Why is specific knowledge about the trunk important?  Certainly it's
> possible to derive from the branch ID, but why?  The only things that
> I've ever seen as necessary to know about a branch in a symbolic sense
> are its current head in the repository, and of course it's base.

Because, at any given point, it would be nice to be able to see what has
changed since the last branch on this file, as well as what has changed
since it left the main trunck.

Often they will be the same, but perhaps, not always.
 
> My preference would be to do what is effectively the opposite of what
> Steve Cameron's proposed patch does.
> 
> I.e make "HEAD" always refer to the head of the current branch
> (or the trunk if there is no sticky branch in effect; or if no branch
> name is given with '-r'); and make "BASE" always refer to the base of
> the current branch (or the trunk if there is no branch in effect).
> 
> There is no real need for "TRUNK" -- it is the same as specifying "1".
> (And of course the base of the trunk is always "1.1", not that this
> matters in day-to-day normal usage.)  Having a symbolic name for "TRUNK"
> isn't necessarily a bad thing, but it does crowd the tag namespace
> unnecessarily.  If you really want to use it then why not just manually
> add a real "TRUNK" tag and be done with it?  This way those who want it
> can have it and those who don't won't be troubled by it.

1: The trunk might not be "1". 'cvs commit -r 2.0' will make it '2' for old
files, and '1' for new files.
2: If you have just imported files, the trunk is 1.1.1.1, and a branch.
3: Please tell me how to make a "TRUNK" tag for the top of the trunk? Make
sure it works for 2.0, 3.0, vendor branch (unmodified) files, etc.
 
> Similarly the head of any given branch is found by specifying the branch
> tag itself.  I believe this works just fine today in 1.10.8.

If you know the branch tag. How can a script determine this?

Looking in "CVS/Tag" doesn't necessarily tell you the tag of the file, only
the tag from the last module update. (You can have different files checked
out from different places).
 
> I can't fathom any reason for knowing "TBASE" (aka "TSPLIT") either.
> For branches which split from the trunk this is of course redundant and
> for branches which split from other branches it is, IMO, rather
> meaningless.  If you really want to know the base of a parent branch
> then you can find it easily enough (see bellow) once you know the name
> of the parent branch, and you can iterate until you hit the trunk if you
> want to know the point at which the current branch was originally forked
> from the trunk.

I want to do a cvs diff from something that is two levels down in the
branching, to see how it has changed in the full development from the last
known good commit.

Incidently, I didn't see any way in your letter to determine the name of
the parent branch, or to tell if the parent branch was the trunk.

Reply via email to