cvs2cl1
Convert cvs log messages to changelogs
Usage
cvs2cl [options]
[FILE1
[FILE2 ...]]
Overview
cvs2cl produces a GNU-style ChangeLog for CVS-controlled sources by running "cvs log" and parsing the output. Duplicate log messages get unified in the Right Way.
The default output of cvs2cl is designed to be compact, formally unambiguous, but still easy for humans to read. It should be largely self-explanatory; the one abbreviation that might not be obvious is "utags". That stands for "universal tags" -- a universal tag is one held by all the files in a given change entry.
If you need output that's easy for a program to parse, use the --xml option. Note that with XML output, just about all available information is included with each change entry, whether you asked for it or not, on the theory that your parser can ignore anything it's not looking for.
If filenames are given as arguments cvs2cl only shows log information for the named files.
Options
-
-h, -help, --help, -? -
Show a short help and exit.
-
--version -
Show version and exit.
-
-r, --revisions -
Show revision numbers in output.
-
-b, --branches -
Show branch names in revisions when possible.
-
-t, --tags -
Show tags (symbolic names) in output.
-
-T, --tagdates -
Show tags in output on their first occurance.
-
--show-dead -
Show dead files.
-
--stdin -
Read from stdin, don't run cvs log.
-
--stdout -
Output to stdout not to ChangeLog.
-
-d, --distributed -
Put ChangeLogs in subdirs.
-
-f FILE, --file FILE -
Write to FILE instead of ChangeLog.
-
--fsf -
Use this if log data is in FSF ChangeLog style.
-
--FSF -
Attempt strict FSF-standard compatible output (incompatible with
--accum).
-
-W SECS, --window SECS -
Window of time within which log entries unify.
-
-U UFILE, --usermap UFILE -
Expand usernames to email addresses from UFILE.
-
--passwd PASSWORDFILE -
Use system passwd file for user name expansion. If no mail domain is provided (via
--domain), it tries to read one from/etc/mailname, output ofhostname-d,dnsdomainname, ordomain-name. cvs2cl exits with an error if none of those options is successful. Use a domain of '' to prevent the addition of a mail domain.
-
--domain DOMAIN -
Domain to build email addresses from.
-
--gecos -
Get user information from GECOS data.
-
-R REGEXP, --regexp REGEXP -
Include only entries that match REGEXP. This option may be used multiple times.
-
-I REGEXP, --ignore REGEXP -
Ignore files whose names match REGEXP. This option may be used multiple times. The regexp is a perl regular expression. It is matched as is; you may want to prefix with a ^ or suffix with a $ to anchor the match.
-
-C, --case-insensitive -
Any regexp matching is done case-insensitively.
-
-F BRANCH, --follow BRANCH -
Show only revisions on or ancestral to BRANCH.
-
--follow-only BRANCH -
Like --follow, but sub-branches are not followed.
-
--no-ancestors -
When using
-F, only track changes since the BRANCH started.
-
--no-hide-branch-additions -
By default, entries generated by cvs for a file added on a branch (a dead 1.1 entry) are not shown. This flag reverses that action.
-
-S, --separate-header -
Blank line between each header and log message.
-
--group-within-date -
Group ChangeLog entries on the same date together, instead of having a separate entry for each commit on that date.
-
--summary -
Add CVS change summary information.
-
--no-wrap -
Don't auto-wrap log message (recommend
-Salso).
-
--no-indent -
Don't indent log message
-
--gmt, --utc -
Show times in GMT/UTC instead of local time.
-
--accum -
Add to an existing ChangeLog (incompatible with
--xmland--FSF).
-
-w, --day-of-week -
Show day of week.
-
--no-times -
Don't show times in output.
-
--chrono -
Output log in chronological order (default is reverse chronological order).
-
--header FILE -
Get ChangeLog header from FILE ("
-" means stdin).
-
--xml -
Output XML instead of ChangeLog format (incompatible with
--accum).
-
--xml-encoding ENCODING -
Insert encoding clause in XML header.
-
--xml-stylesheet FILE -
Insert xml-stylesheet processing instruction with FILE formatting stylesheet file path in XML header.
-
--noxmlns -
Don't include xmlns= attribute in root element.
-
--hide-filenames -
Don't show filenames (ignored for XML output).
-
--no-common-dir -
Don't shorten directory names from filenames.
-
--rcs CVSROOT -
Handle filenames from raw RCS, for instance those produced by "cvs rlog" output, stripping the prefix CVSROOT.
-
-P, --prune -
Don't show empty log messages.
-
--lines-modified -
Output the number of lines added and the number of lines removed for each checkin (if applicable). At the moment, this only affects the XML output mode.
-
--ignore-tag TAG -
Ignore individual changes that are associated with a given tag. May be repeated, if so, changes that are associated with any of the given tags are ignored.
-
--show-tag TAG -
Log only individual changes that are associated with a given tag. May be repeated, if so, changes that are associated with any of the given tags are logged.
-
--delta FROM_TAG:TO_TAG -
Attempt a delta between two tags (since FROM_TAG up to and including TO_TAG). The algorithm is a simple date-based one (this is a hard problem) so results are imperfect.
-
-g OPTS, --global-opts OPTS -
Pass OPTS to cvs like in "cvs OPTS log ...".
-
-l OPTS, --log-opts OPTS -
Pass OPTS to cvs log like in "cvs ... log OPTS".
Notes about the options and arguments:
- •
-
The
-Iand-Foptions may appear multiple times.
- •
-
To follow trunk revisions, use "-F trunk" ("-F TRUNK" also works). This is okay because no would ever, ever be crazy enough to name a branch "trunk", right? Right.
- •
-
For the
-Uoption, the UFILE should be formatted like CVSROOT/users. That is, each line of UFILE looks like this:jrandom:[email protected]or maybe even like this
jrandom:'Jesse Q. Random <[email protected]>'Don't forget to quote the portion after the colon if necessary.
- •
-
Many people want to filter by date. To do so, invoke cvs2cl like this:
cvs2cl -l "-d'DATESPEC'"where DATESPEC is any date specification valid for "cvs log -d". (Note that CVS 1.10.7 and below requires there be no space between -d and its argument).
- •
-
Dates/times are interpreted in the local time zone.
- •
-
Remember to quote the argument to `
-l' so that your shell doesn't interpret spaces as argument separators.
- •
-
See the 'Common Options' section of the cvs manual ('info cvs' on UNIX-like systems) for more information.
- •
-
Note that the rules for quoting under windows shells are different.
- •
-
To run in an automated environment such as CGI or PHP, suidperl may be needed in order to execute as the correct user to enable /cvsroot read lock files to be written for the 'cvs log' command. This is likely just a case of changing the /usr/bin/perl command to /usr/bin/suidperl, and explicitly declaring the PATH variable.
Examples
Some examples (working on UNIX shells):
# logs after 6th March, 2003 (inclusive)cvs2cl -l "-d'>2003-03-06'"# logs after 4:34PM 6th March, 2003 (inclusive)cvs2cl -l "-d'>2003-03-06 16:34'"# logs between 4:46PM 6th March, 2003 (exclusive) and# 4:34PM 6th March, 2003 (inclusive)cvs2cl -l "-d'2003-03-06 16:46>2003-03-06 16:34'"
Some examples (on non-UNIX shells):
# Reported to work on windows xp/2000cvs2cl -l "-d"">2003-10-18;today<"""
Prerequisites
This script requires "Text::Wrap", "Time::Local", and "File::Basename". It also seems to require "Perl 5.004_04" or higher.
Operating system compatibility
Should work on any OS.
Script categories
Version_Control/CVS
Releases
8 releases since Debian 3.0 (Woody); the text changed 4 times.
--FSF since Debian 3.1 (Sarge);
--accum since Debian 3.1 (Sarge);
--branches since Debian 3.1 (Sarge);
--case-insensitive since Debian 3.1 (Sarge);
--chrono since Debian 3.1 (Sarge);
--day-of-week since Debian 3.1 (Sarge);
--delta since Debian 3.1 (Sarge);
--distributed since Debian 3.1 (Sarge);
--domain since Debian 3.1 (Sarge);
--file since Debian 3.1 (Sarge);
--follow since Debian 3.1 (Sarge);
--follow-only since Debian 3.1 (Sarge);
--fsf since Debian 3.1 (Sarge);
--gecos since Debian 3.1 (Sarge);
--global-opts since Debian 3.1 (Sarge);
--gmt since Debian 3.1 (Sarge);
--group-within-date since Debian 7 (Wheezy);
--header since Debian 3.1 (Sarge);
--help since Debian 3.1 (Sarge);
--hide-filenames since Debian 3.1 (Sarge);
--ignore since Debian 3.1 (Sarge);
--ignore-tag since Debian 3.1 (Sarge);
--lines-modified since Debian 3.1 (Sarge);
--log-opts since Debian 3.1 (Sarge);
--no-ancestors since Debian 3.1 (Sarge);
--no-common-dir since Debian 3.1 (Sarge);
--no-hide-branch-additions since Debian 3.1 (Sarge);
--no-indent since Debian 3.1 (Sarge);
--no-times since Debian 3.1 (Sarge);
--no-wrap since Debian 3.1 (Sarge);
--noxmlns since Debian 3.1 (Sarge);
--passwd since Debian 3.1 (Sarge);
--prune since Debian 3.1 (Sarge);
--rcs since Debian 3.1 (Sarge);
--regexp since Debian 3.1 (Sarge);
--revisions since Debian 3.1 (Sarge);
--separate-header since Debian 3.1 (Sarge);
--show-dead since Debian 3.1 (Sarge);
--show-tag since Debian 3.1 (Sarge);
--stdin since Debian 3.1 (Sarge);
--stdout since Debian 3.1 (Sarge);
--summary since Debian 3.1 (Sarge);
--tagdates since Debian 3.1 (Sarge);
--tags since Debian 3.1 (Sarge);
--usermap since Debian 3.1 (Sarge);
--utc since Debian 3.1 (Sarge);
--version since Debian 3.1 (Sarge);
--window since Debian 3.1 (Sarge);
--xml since Debian 3.1 (Sarge);
--xml-encoding since Debian 3.1 (Sarge);
--xml-stylesheet since Debian 7 (Wheezy);
-? since Debian 3.1 (Sarge);
-C since Debian 3.1 (Sarge);
-F since Debian 3.1 (Sarge);
-I since Debian 3.1 (Sarge);
-P since Debian 3.1 (Sarge);
-R since Debian 3.1 (Sarge);
-S since Debian 3.1 (Sarge);
-T since Debian 3.1 (Sarge);
-U since Debian 3.1 (Sarge);
-W since Debian 3.1 (Sarge);
-b since Debian 3.1 (Sarge);
-d since Debian 3.1 (Sarge);
-f since Debian 3.1 (Sarge);
-g since Debian 3.1 (Sarge);
-h since Debian 3.1 (Sarge);
-help since Debian 3.1 (Sarge);
-l since Debian 3.1 (Sarge);
-r since Debian 3.1 (Sarge);
-t since Debian 3.1 (Sarge);
-w since Debian 3.1 (Sarge).