[Top][All Lists]

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

Re: Easy DIFF Against Next Version?

From: Stephen Cameron
Subject: Re: Easy DIFF Against Next Version?
Date: Mon, 5 Nov 2001 14:17:01 -0800 (PST)

Michael Becker (address@hidden) wrote:

> In article <address@hidden>, "Guy Scharf"
> cvs diff -r HEAD
> will do the job

Careful.  Using "-r HEAD" when you're on a branch will not
get the results you probably expect when used with "cvs diff".

In this patch
I added a few words into the docs, among other changes:

> CAUTION: the special tag `HEAD' is interpreted by
> the `cvs diff' command in a different way than it
> is interpreted by any other cvs command.  `cvs diff'
> takes `-r HEAD' to mean the following, as nearly as
> I can tell:
> For `cvs diff', `HEAD' means the most recent revision
> on the `current branch' (taking into account whatever
> sticky tags are active in your working directory) unless
> a particular file has not had a revision committed to the
> branch, in which case the head revision of the trunk is
> taken.  This is clearly wrong in most cases.

If you're on a branch you should use "-r branchtag" rather
than "-r HEAD", unless, for some strange reason,
you actually want the above behavior.  

I don't know why
"cvs diff" treats HEAD this way, but there are tests in to ensure that it works in this strange way,
and comments claim that (weird :-) people are depending on 
this behavior, though I don't think I've ever seen anyone 
speak up in favor of this "cvs diff" the times I've 
mentioned it here before.

-- steve

Do You Yahoo!?
Find a job, post your resume.

reply via email to

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