tags:

views:

9359

answers:

7

Is there any way to list all the files that have changed between two tags in CVS?

Every time we do a release we apply a tag to all the files in that release. I want to find all the files that changed between releases.

It would also work if I could find all files that had changed between two dates.

+8  A: 

I suppose this command would help:

cvs diff -N -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs

where RELEASE_1_0 and RELEASE_1_1 are the names of your tags.

You can find a little more information on cvs diff command here

plus it should be fairly simple to create a script to make report more suitbable for your needs, ex: number of files changed, created deleted etc. As far as I know the most common cvs GUI tools (wincvs and tortoise) do not provide something like this out of the box.

Hope it helps ;)

Decio Lira
There's a perl script called cvs2cl which can produce nice formatted versions of logs, either as the finished report or as text or XML to post-process: http://www.red-bean.com/cvs2cl/
Steve Jessop
Just found this via Google and it saved me a load of work, thanks a lot!I was trying to find out via the 'history' command, forgot about diff.
Darren Greaves
+3  A: 

DLira's method gives a lot of detail, including all the changes.

To just get a list of files, this works:

cvs diff -N -c -r RELEASE_1_0 -r RELEASE_1_1 | grep "Index:" > diffs

roomaroo
sorry, I forgot to comment on the verbosity and how get just what you want. But you are right! grep is a great way to get only what you need. ;)
Decio Lira
A: 

The best tool I've found for this is a perl script called cvs2cl.pl. This can generate a change list in several different formats. It has many different options, but I've used the tag-to-tag options like this:

cvs2cl.pl --delta dev_release_1_2_3:dev_release_1_6_8

or

cvs2cl.pl --delta dev_release_1_2_3:HEAD

I have also done comparisons using dates with the same tool.

Alex B
+3  A: 

I prefer using rdiff and -s option

cvs rdiff -s -r RELEASE_1_0 -r RELEASE_1_1 module > diffs

rdiff does not require a sandbox -s gives you a summary of the changes.

Sally
+1  A: 

Slightly late, but I only found what I was looking for just now. May as well share it around. To get a list of files that have changed between one version and another using the standard cvs commands:

cvs -q log -NSR -rV-1-0-69::V-1-0-70 2>/dev/null >log.txt

Or alternatively, to get a list of commit comments just drop the -R:

cvs -q log -NS -rV-1-0-69::V-1-0-70 2>/dev/null >log.txt

Where you replace V-1-0-69 and V-1-0-70 with the revisions you're comparing.

Taufiq
The last command was what I was looking for :) Just added a little grep to filter out the lines I don't want: grep -vE "^branch|^RCS|^head|^locks|^access|^keyword|^total|^description|^revision"
gregers
A: 

To get the list of files between two dates using CVS:

cvs diff -N -c -D YYYY-MM-DD -D YYYY-MM-DD | grep "Index:" > diff.out

More information on accepted dates for the -D flag: http://docs.freebsd.org/info/cvs/cvs.info.Common_options.html

Michael
A: 

what about:

cvs log -d ">=DATE" -N -S -R > cvs.log

???

it worked for me

tkrille