views:

1008

answers:

10

I'm using CVS on Windows (with the WinCVS front end), and would like to add details of the last check in to the email from our automated build process, whenever a build fails, in order to make it easier to fix.

I need to know the files that have changed, the user that changed them, and the comment.

I've been trying to work out the command line options, but never seem to get accurate results (either get too many result rather than just from one checkin, or details of some random check in from two weeks ago)

+1  A: 

CVS does not provide this capability. You can, however, get it by buying a license for FishEye or possibly by using CVSTrac (note: I have not tried CVS Trac).

Or you could migrate to SVN, which does provide this capability via atomic commits. You can check in a group of files and have it count as a single commit. In CVS, each file is a separate commit no matter what you do.

Zathrus
+2  A: 

CVS doesn't group change sets like other version control systems do; each file has its own, independent version number and history. This is one of the deficiencies in CVS that prompts people to move to a newer VC.

That said, there are ways you could accomplish your goal. The easiest might be to add a post-commit hook to send email or log to a file. Then, at least, you can group a set of commits together by looking at the time the emails are sent and who made the change.

Jason Terk
A: 

Will "cvs history -a -l" get you close? Shows for all users last event per project...

flxkid
This is what I tried, but it returned ~40 results!
John Sibly
+1  A: 

Wow.

I'd forgotten how hard this is to do. What I'd done before was a two stage process.

Firstly, running

cvs history -c -a -D "7 days ago" |
    gawk '{ print "$1 == \"" $6 "\" && $2 == \"" $8 "/" $7 "\" { print \"" $2 " " $3 " " $6 " " $5 " " $8 "/" $7 "\"; next }" }' > /tmp/$$.awk

to gather information about all checkins in the previous 7 days and to generate a script that would be used to create a part of the email that was sent.

I then trawled the CVS/Entries file in the directory that contained the broken file(s) to get more info.

Mungeing the two together allowed me to finger the culprit and send an email to them notifying them that they'de broken the build.

Sorry that this answer isn't as complete as I'd hoped.

Rob Wells
Assuming the optional 'history' is enabled, otherwise "cvs [server aborted]: History logging is not enabled on this repository"
Ray Hayes
+1  A: 

We did this via a perl script that dumps the changelog and you can get a free version of perl for Windows at the second link.

Cvs2Cl script

Active Perl

Kevin Gale
+2  A: 

I use loginfo in CVSROOT and write that information to a file

http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_18.html#SEC186

Sally
A: 

CVSNT supports commit IDs which you can use in place of tags in log, checkout or update commands. Each set of files committed (commits are atomic in CVSNT) receives its own unique ID. You just have to determine the commitid of the last checked in file via cvs log first (you can restrict the output via -d"1 hour ago" or similar) and then query which other files have that ID.

Oliver Giesen
A: 

Eclipse has ChangeSets built in. You can browse the last changes (at least incoming changes aka updates) by commit. It does this by grouping the commits by author, commit message and similar timestamps.

This also works for "Compare with/Another Branch or Version" where you can choose Branches, Tags and Dates. Look through the Synchronization View Icons for a popup menu with "Change Sets" and see for yourself.

Edit: This would require to change to Eclipse at least as a viewer, but depending on the frequency you need to compare and group it might not be too bad. If you don't want to use more - use Eclipse just for CVS. It should be possible to even get a decent sized graphical cvs client through the rcp with all the plugins, but this'd definitely be out of scope...

Olaf
A: 

Is there any command line visual tools for cvs. I am looking for something like the tkcvs where I can see the graphical representation of the cvs branches

A: 

Isn't this a solved problem? I would think any of the several tools on the CI Matrix that supports both CVS and email notifications could do this for you.

Jeffrey Fredrick