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.

 

 


Posted by Anonymous (83.23.xx.xx) on Tue 26 Jul 2005 at 14:05
Great tool.
I'm looking for something similar, but for svn. Any ideas?

[ Parent | Reply to this comment ]

Posted by Anonymous (212.21.xx.xx) on Tue 26 Jul 2005 at 14:05
do you know something similiar for svn?

[ Parent | Reply to this comment ]

Posted by Anonymous (84.131.xx.xx) on Wed 27 Jul 2005 at 13:25
This might be like shouting 'Jehova', but this functionality is built in in Emacs - if you're using it, C-x v a is sufficient

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Wed 27 Jul 2005 at 13:30
[ View Steve's Scratchpad | View Weblogs ]

Good tip, I didn't realise Emacs could do that.

Although it only appears to do it per buffer/file rather than per-project.

To make it work I ran the following from the *scratch* buffer. Although it could also be added to the ~/.emacs file for constant use:

(require 'vc)

Once that's loaded you get a lot of new commands. To do the history on the current file/buffer you run:

M-x vc-print-log
(vc-print-log is bound to "Ctrl-x v a" as you mention).

For a one-off job using Emacs is fine, but for scripting the cvs2cl tool is probably better).

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by Anonymous (216.234.xx.xx) on Wed 27 Jul 2005 at 14:02
What's wrong with rcs2log?

[ Parent | Reply to this comment ]

Posted by Anonymous (80.171.xx.xx) on Thu 28 Jul 2005 at 08:04
Why would some use the version control history to store his application history?

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Thu 28 Jul 2005 at 08:06
[ View Steve's Scratchpad | View Weblogs ]

Depends on how you write your commit text I guess, but I try to be descriptive and that's what I'd expect from a "full" ChangeLog file.

Sure in release notes you only need to write "Added support for blah", but in a changelog I like to see exactly what has changed.

Whichever you prefer, I guess.

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by Anonymous (84.189.xx.xx) on Mon 2 Nov 2009 at 17:26
Works out-of-the-deb on Cygwin. Cool! Thanks!

[ Parent | Reply to this comment ]

Sign In

Username:

Password:

[Register|Advanced]

 

Flattr

 

Current Poll

What do you use for configuration management?








( 458 votes ~ 5 comments )