Reputation: 54619
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).
Upvotes: 17
Views: 27383
Reputation: 81
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.
Upvotes: 8
Reputation: 31045
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: |============|-------------"
Upvotes: 3
Reputation: 421
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.
Upvotes: 3
Reputation: 24936
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.
Upvotes: 5
Reputation: 43452
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.
Upvotes: 5