cvs2cl - Generate GNU-Style ChangeLogs
======================================
Depends on: Perl
URL: `http://www.red-bean.com/~kfogel/cvs2cl.shtml'
cvs2cl.pl condenses and reformats the output of cvs log to create a
GNU-style ChangeLog file for your project. ChangeLogs are
chronologically organized documents showing the change history of a
project, with a format designed specifically for human-readability (see
the following examples).
The problem with the `cvs log' command is that it presents its output
on a per-file basis, with no acknowledgement that the same log message,
appearing at roughly the same time in different files, implies that
those revisions were all part of a single commit. Thus, reading over
log output to get an overview of project development is a hopeless task
- you can really only see the history of one file at a time.
In the ChangeLog produced by cvs2cl.pl, identical log messages are
unified, so that a single commit involving a group of files shows up as
one entry. For example:
floss$ cvs2cl.pl -r
cvs log: Logging .
cvs log: Logging a-subdir
cvs log: Logging a-subdir/subsubdir
cvs log: Logging b-subdir
floss$ cat ChangeLog
...
1999-08-29 05:44 jrandom
* README (1.6), hello.c (2.1), a-subdir/whatever.c (2.1),
a-subdir/subsubdir/fish.c (2.1): Committing from pcl-cvs 2.9, just
for kicks.
1999-08-23 22:48 jrandom
* README (1.5): [no log message]
1999-08-22 19:34 jrandom
* README (1.4): trivial change
...
floss$
The first entry shows that four files were committed at once, with the
log message, "Committing from pcl-cvs 2.9, just for kicks.". (The -r
option was used to show the revision number of each file associated with
that log message.)
Like CVS itself, cvs2cl.pl takes the current directory as an implied
argument but acts on individual files if given file name arguments.
Following are a few of the most commonly used options.
* `h', `--help'
Show usage (including a complete list of options).
* `-r', `--revisions'
Show revision numbers in output. If used in conjunction with -b,
branches are shown as BRANCHNAME.N, where N is the revision on the
branch.
* `-t', `--tags'
Show tags (symbolic names) for revisions that have them.
* `-b', `--branches'
Show the branch name for revisions on that branch. (See also -r.)
* `-g OPTS', `--global-opts OPTS'
Pass OPTS as global arguments to cvs. Internally, cvs2cl.pl
invokes cvs to get the raw log data; thus, OPTS are passed right
after the cvs in that invocation. For example, to achieve quiet
behavior and compression, you can do this:
floss$ cvs2cl.pl -g "-Q -z3"
* `-l OPTS', `--log-opts OPTS'
Similar to -g, except that OPTS are passed as command options
instead of global options. To generate a ChangeLog showing only
commits that happened between July 26 and August 15, you can do
this:
floss$ cvs2cl.pl -l "'-d1999-07-26<1999-08-15'"
Notice the double-layered quoting - this is necessary in Unix
because the shell that invokes cvs log (inside cvs2cl.pl)
interprets the `<' as a shell redirection symbol. Therefore, the
quotes have to be passed as part of the argument, making it
necessary to surround the whole thing with an additional set of
quotes.
* `-d', `--distributed'
Put an individual ChangeLog in each subdirectory, covering only
commits in that subdirectory (as opposed to building one ChangeLog
that covers the directory where cvs2cl.pl was invoked and all
subdirectories underneath it).