cvs diff -r queston

0 views
Skip to first unread message

Mark Lancisi

unread,
Mar 17, 2005, 3:44:20 PM3/17/05
to info...@gnu.org
Hello -

I've got a branch that was branched some months ago from the trunk of one of my projects.

I'd like to diff the head of this branch with the HEAD of the trunk.

So - while in the top level directory of a local checked out copy of the branch I run:

cvs diff -rHEAD


Problem is, this seems to only return differences between the base files for the branch and the HEAD of the trunk, rather than the head of the branch and HEAD of the trunk.
(Example: So if I have file x.c that is currently version 1.4 on the trunk and 1.2.2.7 on the branch, I'd expect the command I run run cvs -r1.4 -r1.2.2.7 x.c against that file, but instead it runs cvs diff -r1.2 -r1.4 x.c)

One way around this, I've found, is to use rdiff instead:

cvs rdiff -r<branchname> -rHEAD <projectname>

This does do the appropriate diffs, however I don't understand why simply running cvs diff -rHEAD doesn't do the same thing..

Thanks in advance for any help!

Larry Jones

unread,
Mar 17, 2005, 4:37:26 PM3/17/05
to Mark Lancisi, info...@gnu.org
Mark Lancisi writes:
>
> This does do the appropriate diffs, however I don't understand why
> simply running cvs diff -rHEAD doesn't do the same thing..

Because, unlike every other CVS subcommand, diff interprets HEAD as the
head of the current branch rather than as the head of the trunk. Unless
you've done something silly, you can use ``-r1'' to get the head of the
trunk.

-Larry Jones

I think football is a sport the way ducks think hunting is a sport. -- Calvin


Reply all
Reply to author
Forward
0 new messages