[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is HEAD?

From: Ming Kin Lai
Subject: Re: What is HEAD?
Date: Sun, 11 Sep 2005 10:04:47 -0700

Larry Jones writes:
That description is lacking.  The manual source contains the following...:

@c FIXME: What does HEAD really mean?  I believe that
@c the current answer is the head of the default branch
@c for all cvs commands except diff.  For diff, it
@c seems to be (a) the head of the trunk (or the default
@c branch?) if there is no sticky tag, (b) the head of the
@c branch for the sticky tag, if there is a sticky tag.
@c (b) is ugly as it differs
@c from what HEAD means for other commands, but people
@c and/or scripts are quite possibly used to it.

The "head" of a branch (or trunk) is also called the "tip" and refers to
the highest numbered revision on the branch.  The "default branch" is
generally the vendor branch if the file has been imported and not
locally modified, and the trunk otherwise.

I need some clarification and confirmaton. By "default branch", you do not mean a branch created by
cvs tag -b mybranch
You mean either the "vendor branch" that is imported or the trunk.  Right?
Therefore even if I am on mybranch, with diff and no sticky tag and the file is not imported, or a command other than diff, HEAD does not mean the tip of mybranch, but still means the tip of the trunk. With diff and a sticky tag, HEAD is the tip of mybranch. Right?

Seems right! I did a little experiment: Revision 1.3 is my branch point, which I tagged Root-of-mybranch. I added the word "thrice" to the fle and committed it as Revision 1.4. Then I did a update -r mybranch to go on the branch. I added the word "fourtimes" there and committed it as Revision

address@hidden cvs status -v
cvs status: Examining proj
File: test3             Status: Up-to-date

  Working revision: Sun Sep 11 00:56:21 2005
  Repository revision: /home/mingl/shitrepo/proj/test3,v
  Sticky Tag:          mybranch (branch: 1.3.2)
  Sticky Date:         (none)
  Sticky Options:      (none)

  Existing Tags:
       mybranch                        (branch: 1.3.2)
       Root-of-branch                  (revision: 1.3)
       release                         (revision:
       vendor                          (branch: 1.1.1)

address@hidden cvs diff -r -r HEAD test3

address@hidden cvs diff -r -r 1.4 test3
Index: test3
RCS file: /home/mingl/shitrepo/proj/test3,v
retrieving revision
retrieving revision 1.4
diff -r1.3.2.1 -r1.4
< fourtimes

address@hidden cvs diff -r HEAD -r 1.4 test3
Index: test3
RCS file: /home/mingl/shitrepo/proj/test3,v
retrieving revision
retrieving revision 1.4
diff -r1.3.2.1 -r1.4
< fourtimes

Obviously HEAD is, tip of mybranch.

Express yourself instantly with MSN Messenger! Download today - it's FREE!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]