info-cvs
[Top][All Lists]
Advanced

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

Re: am I misunderstanding what HEAD refers to?


From: Dennis Jones
Subject: Re: am I misunderstanding what HEAD refers to?
Date: Fri, 05 Oct 2007 21:20:45 GMT

"Ted Stern" <address@hidden> wrote in message 
news:address@hidden
> On 05 Oct 2007 11:04:38 -0700, Dennis Jones wrote:

> To do what you suggest, the user would have to do a 'cvs update -dA'
> [or 'cvs update -d -r parentbranch' if not branching from the trunk].
> This can take almost as long as tagging.  Then they would have to 'cvs
> update -d -r branchname' to get back to the branch checkout they were
> working on.

Well, I personally keep the TRUNK and any branches I need checked out all 
the time (as opposed to trying to switch a single sandbox from branch to 
trunk and back).  So, for me, doing a diff on the TRUNK is a simple matter 
of merely changing over to my TRUNK folder and doing the diff.  That's what 
I was really suggesting.  Though, like you said, if you don't already have a 
copy of the TRUNK checked out, then you would have to do that.  But once 
done, it's done, and you just have to make sure it is up to date before 
doing a diff like we're talking about.

I agree that it is too bad that "HEAD" does not refer to the top of the 
TRUNK when you're working on a branch.  I think there was some discussion 
some time ago about the idea of introducing a new keyword (like "TOP" or 
"TIP" or something like that) that would always refer to the current 
revision on the TRUNK regardless of where you are currently working, but I 
don't know what came of it.


> The other question is whether HEAD will mean what _YOU_
> think it means, even when you are in a trunk checkout.  If it always
> points to the most recently checked in version, even if it is not on
> the current branch, then the same problem will still apply.

It is my understanding that HEAD always refers to the latest revision on the 
branch you are working in.  So, if you are in the TRUNK, then it is the head 
of the trunk.  If you are in a branch, then it is the head of the branch. 
In other words, "HEAD" is relative to your current location.  Also, if you 
are up to date on the branch/trunk, you don't even need to use "HEAD".  You 
can just say, "cvs diff -r <tag>" and that will give you the differences 
between the tag and the current head (because "HEAD" is redundant if your 
local sandbox is up to date).

I've never needed to use "HEAD" myself, so I could be mistaken; but I 
believe I understand its use correctly.

- Dennis 




reply via email to

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