Generating a ChangeLog from CVS history

Posted by Steve on Tue 26 Jul 2005 at 13:28

I'm currently in the middle of releasing some software which I've been developing. All the history is stored in a CVS repository and I realise I have no ChangeLog. I hoped it would be possible to use the CVS history to generate the ChangeLog, and here's how to do it.

This will probably not interest most readers, but if you do find yourself in need of generating a ChangeLog file - containing lists of changes to your software - from a CVS repository the only thing you need is the cvs2cl package.

You can install it via apt-get as follows:

apt-get install cvs2cl

(Removing with "dpkg --purge cvs2cl" when you're done if you wish).

Once installed you need only change to your projects directory and run:

cvs2cl

This will produce a single file named ChangeLog in the current directory. Sample entries look like this:

2005-07-24 02:02  steve

        * conf/SiteConfig.pm:   Don't require version 5.005 of perl.

2005-07-23 01:57  steve

        * doc/rewrite.sample.conf:   Add rule to control number of recent
          comments displayed via /recent/XX

If you wish you can also split the output into one ChangeLog file per directory, via the -d flag.

There are other options which allow you to generate a history only between certain revisions of the source, and to include tags.

The options can be explored by reading the manpage via "man cvs2cl", if you'd like to see them explained.

This is a neat tool which I'd not previously been aware of, and it's already proved to be very useful.

I keep meaning to change to using subversion instead of CVS, but I'm so used to the way I currently work that I find it difficult to motivate myself. Little tools like this which work with CVS only make the transition harder to make.


This article can be found online at the Debian Administration website at the following bookmarkable URL:

This article is copyright 2005 Steve - please ask for permission to republish or translate.