How do I get a list of commit comments from CVS since last tagged version?
Asked Answered
L

5

17

I have made a bunch of changes to a number of files in a project. Every commit (usually at the file level) was accompanied by a comment of what was changed.

Is there a way to get a list from CVS of these comments on changes since the last tagged version?

Bonus if I can do this via the eclipse CVS plugin.

UPDATE: I'd love to accept an answer here, but unfortunately none of the answers are what I am looking for. Frankly I don' think it is actually possible, which is a pity really as this could be a great way to create a change list between versions (Assuming all commits are made at a sensible granularity and contain meaningful comments).

Lewd answered 31/10, 2008 at 6:21 Comment(0)
A
8

I think

cvs -q log -SN -rtag1:::tag2 

or

 cvs -q log -SN -dfromdate<todate  

will do what you want. This lists all the versions and comments for all changes made between the two tags or dates, only for files that have changed. In the tag case, the three colons exclude the comments for the first tag. See cvs -H log for more information.

Alkahest answered 2/4, 2012 at 19:21 Comment(1)
This does answer the question. I'm using rlog. I find two colons works not three colons. Also can be useful to leave in the tags (so leave out the -N option). So: 'cvs -q rlog -S -rtag1::tag2' or 'cvs -q rlog -S -rtaglast::'Colbycolbye
E
5

The options for the cvs log command are available here. Specifically, to get all the commits since a specific tag (lets call it VERSION_1_0)

cvs log -rVERSION_1_0:

If your goal is to have a command that works without having to know the name of the last tag I believe you will need to write a script that grabs the log for the current branch, parses through to find the tag, then issues the log command against that tag, but I migrated everything off of CVS quite a while ago, so my memory might be a bit rusty.

Espagnole answered 31/10, 2008 at 7:31 Comment(3)
hmm It looks like the -r indicates a file revision number not a specific tag.Lewd
at least my cvs prints tags, author and dates... but not the commentsCobelligerent
HEAD is an alias for the latest, if you haven't explicitly tagged the newest versions of your codeCongratulatory
D
5

If you want to get a quick result on a single file, the cvs log command is good. If you want something more comprehensive, 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.

Dioptric answered 31/10, 2008 at 16:25 Comment(0)
F
3

I know you have already "solved" your problem, but I had the same problem and here is how I quickly got all of the comments out of cvs from a given revision until the latest:

$ mkdir ~/repo
$ cd ~/repo
$ mkdir cvs
$ cd cvs
$ scp -pr [email protected]:/cvs/CVSROOT .
$ mkdir -p my/favorite
$ cd my/favorite
$ scp -pr [email protected]:/cvs/my/favorite/project .
$ cd ~/repo
$ mkdir -p ~/repo/svn/my/favorite/project
$ cvs2svn -s ~/repo/svn/my/favorite/project/src ~/repo/cvs/my/favorite/project/src
$ mkdir ~/work
$ cd ~/work
$ svn checkout file:///home/geek/repo/svn/my/favorite/project/src/trunk ./src
$ cd src
$ # get the comments made from revision 5 until today
$ svn log -r 5:HEAD
$ # get the comments made from 2010-07-03 until today
$ svn log -r {2010-07-03}:HEAD

The basic idea is to just use svn or git instead of cvs :-) And that can be done by converting the cvs repo to svn or git using cvs2svn or cvs2git, which we should be doing anyway. It got my my answer within about three minutes because I had a small repository.

Hope that helps.

Fullgrown answered 5/1, 2011 at 22:44 Comment(0)
C
3

Something like this

cvs -q log -NS -rVERSION_3_0::HEAD

Where you probably want to pipe the output into egrep to filter out the stuff you don't want to see. I've used this:

cvs -q log -NS -rVERSION_3_0::HEAD | egrep -v "RCS file: |revision |date:|Working file:|head:|branch:|locks:|access list:|keyword substitution:|total revisions: |============|-------------"
Congratulatory answered 11/3, 2011 at 9:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.