info-cvs
[Top][All Lists]
Advanced

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

-r HEAD bug


From: Cameron, Steve
Subject: -r HEAD bug
Date: Tue, 15 May 2001 16:29:27 -0500

R. Bresner wrote:

> We've just installed cvs 1.11 from 1.9 and are noticing a different 
> behavior
> with -r HEAD. (client NT, server Solaris).
> 
> When diffing a branched area, CVS is getting the head of a branch
> based on the revision of a file. We have many files that are branched, 
> but have no changes in the branched area, and so still have a 
> mainline-esq revision number. The problem occurs when we do a diff
> with -rHEAD, as the file is diffed to _mainline_, which is rarely as 
> stable
> as our branches. 

Hi,

"cvs diff" used with "-r HEAD" seems to be a little 
screwy, IMHO.

There are some comments in sanity.sh around this area....
and It tests for it, so I guess that makes it a feature 
rather than a bug...:

to wit:

         # But diff thinks that HEAD is "br1".  Case (b) from cvs.texinfo.
          # Probably people are relying on it.
          dotest head-br1-diff "${testcvs} -q diff -c -r HEAD -r br1" ""

          # With a nonbranch sticky tag on a branch,
          # HEAD is the head of the trunk
          dotest head-brtag-setup "${testcvs} -q update -r brtag" "[UP]
file1"
          dotest head-brtag-update "${testcvs} -q update -r HEAD -p file1" \
"imported contents
add a line on trunk
add a line on trunk after trunktag"

          # CVS 1.9 and older thought that HEAD is "brtag" (this was
          # noted as "strange, maybe accidental").  But "br1" makes a
          # whole lot more sense.
          dotest head-brtag-diff "${testcvs} -q diff -c -r HEAD -r br1" ""

          # With a nonbranch sticky tag on the trunk, HEAD is the head
          # of the trunk, I think.  

I have a patch which allows you to specify ".trunk" to 
be an (almost) real branch name for the trunk (you can
commit to it, and everything else you could do with a branch
tag (except you can't delete the ".trunk" tag).  

If you are interested in that, 
http://www.geocities.com/dotslashstar/branch_patch.html

It also lets you specify the origin of a branch name by
"branchname.origin"

I gather, what you are trying to do is figure the changes that
have occurred on the branch, without regard for what
changes may have occurred on the trunk in the mean time.

Assuming you have tagged the beginning of your branch
(at the time you created the branch, you created a separate,
non-branch tag so you could refer to the beginning of the branch)

cvs rdiff -r branchpoint -r branch_tag modulename

Or, using my patch, (in case you didn't make such a 
"branchpoint" tag) 

"cvs rdiff -r branch_tag.origin -r branch_tag modulename" 

Hope it helps.

-- steve



reply via email to

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