[Top][All Lists]

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

Re: Diffing previous revision

From: Greg A. Woods
Subject: Re: Diffing previous revision
Date: Wed, 29 May 2002 10:49:54 -0400 (EDT)

[ On Saturday, May 18, 2002 at 22:32:40 (-0700), Vince Rice wrote: ]
> Subject: Diffing previous revision
> I am constantly needing to diff a source file against
> the previous revision.  That currently means I have to
> do a log/rlog to determine the previous revision, then
> do the cvs diff.
> Is there a way to do this automagically, i.e. be able
> to say "previous revision" in the -r, without having
> to do the log/rlog?  And if there's not, would someone
> consider it as an enhancement request?

I would say "cvs status" is a much shorter and quicker way to find the
current revision number of a given file.

Personally I almost always have a $Id (or equivalent) line somewhere in
(usually at the top or bottom) my source files, and since I'm usually
looking at the file in an editor buffer when I want to know it's
revision number, a simple cursor jump command will find it.  Since I
almost always use CVS from PCL-CVS, thus also from within my editor, I
then just jump to the *cvs* buffer and run the diff command with the
appropriate parameter.

> Perhaps
>   cvs diff -r PREV source.c
> or something.

"or something".  :-)

There was a discussion long ago about naming conventions for magic tags
like "HEAD", and your proposed "PREV".  Unfortunately we've gone through
more than enough releases in the mean time to have migrated to those new
conventions, ane yet the migration was never done.  I sure as heck
wouldn't want yet another magic name that didn't follow the proposed
convention to be introduced and then have to wait indefinitely again to
have it renamed too!  :-)

On the other hand a small wrapper script could combine the "status/diff"
into one command....  In my case I could easily write an editor macro to
do the same, though I don't find the current method too much of a burden.

                                                                Greg A. Woods

+1 416 218-0098;  <address@hidden>;  <address@hidden>;  <address@hidden>
Planix, Inc. <address@hidden>; VE3TCP; Secrets of the Weird <address@hidden>

reply via email to

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