commitlog2cvsweb − convert FreeBSD commitlog files to HTML
|
. |
commitlog2cvsweb [−−cvsweb= URL ] [−−urlsuffix= SFX ] [−−branch= TAG ] [−−showallbranches] [−−outfile= FILE ] [−−committer= PATTERN ] [−−and] [−−insensitive] [−−logmessage= PATTERN ]... [−−link−committers] [−−queryprcgi= URL ] [−−number−commits] [−−maximum= NUM ] [−−sort−arguments] commitlog-file... |
||
|
. |
commitlog2cvsweb −−version |
The commitlog2cvsweb program takes one ore more commitlog files and converts them into HTML . The commitlog files are usually stored under /home/ncvs/CVSROOT/commitlogs/ and can be retrieved by cvsup-ing the cvsroot-common and cvsroot-src collections in CVS mode. (See cvsup, http://www.FreeBSD.org/doc/en/books/handbook/cvsup.html and " EXAMPLES ".)
The generated HTML has hyperlinks to the "cvsweb.cgi" script. This means you can click on any of the changed files and see the CVS log (change history) and have access to all the revisions and deltas.
(The CGI script "cvsweb.cgi" was originally written by Bill Fenner <fenner@freebsd.org> for the FreeBSD project. It allows browsing of CVS-repositories with a HTML−browser. CVS is a popular version control system. "cvsup" is written by John Polstra <jdp@polstra.com>. It is a network distribution package for CVS repositories.)
Options may be
abbreviated to a unique prefix. The options are as follows:
−−cvsweb= URL
Specify URL of cvsweb.cgi script. Default: http://cvsweb.FreeBSD.org/
−−urlsuffix= SFX
Specify some extra information for appending to generated URLs. (You should not type a leading "?" or "&" character because it will be added automatically.)
−−branch= TAG
Output only commit messages from branch TAG .
−−showallbranches
Tell "cvsweb.cgi" that you want to see file revisions on all branches. The default behaviour is to show only revisions on the branch selected with "−−branch".
−−outfile= FILENAME
Specify the output file. If no output file is specified standard output is used.
−−committer= PATTERN
Output only commit messages from committer PATTERN . More than one committer is requested by separating the committer names with a bar. Committer names in PATTERN are case insensitive and must match the full committer name.
−−filename= PATTERN
Output only commits affecting file PATTERN . (Note that the pattern is in Perl syntax and not in Shell syntax!)
−−logmessage= PATTERN
Output only commits with matching commit log messages. This option may be be specified multiple times.
−−and
Output only commits matching all logmessage patterns ( AND ). The default is to output commits matching any pattern ( OR ).
−−insensitive
Ignore case when matching logmessage patterns.
−−link−committers
Add hyperlinks to committers previous/next commit.
−−number−commits
Sequentially number all commits. (Numbering is done on a per file basis.)
−−queryprcgi= URL
Use URL to query problem reports. Default: http://www.FreeBSD.org/cgi/query−pr.cgi
−−maximum= NUM
Output at most NUM commits per input file.
−−body−attributes= ATTRIBUTES
Specify attributes for the html BODY tag.
−−noheadfoot
Suppress output of HTML , HEAD and BODY tags. This is for including the output into another HTML file.
−−from= DATE
Output only commit messages made after DATE . Options "−−after" and "−−since" are aliases for "−−from".
−−to= DATE
Output only commit messages made before DATE . Options "−−before" and "−−upto" are aliases for "−−to". If DATE does not contain a timezone then the date is interpreted according to the local timezone. Check Time::ParseDate for supported date/time formats.
−−nofileheaders
Do not emit H1 tags for each input file.
−−commitlogdir= DIR
Look for commitlogfiles in DIR . (May contain shell wildcard characters.)
−−sort−arguments
Arguments (input files) are processed in order of their modification times. This is useful to process several commitlog files in chronological order.
−−version
Print version information and exit.
Input file names may contain shell wildcard characters (’"*"’, ’"?"’). The −"−−commitlogdir" is prepended if given. Input files may have been compressed with "gzip".
"commitlog2cvsweb" looks for a configuration file in three places.
|
• |
If the variable "CVSWEB_CONVERTERS_CONF" is set in the environment its content is interpreted as the name of the configuration file, otherwise |
||
|
• |
the file ~/.cvsweb−converters.conf is examined, and finally |
||
|
• |
/tmp/etc/cvsweb−converters.conf is tried. |
Only the first existing file is used.
Step1: Retrieving the commitlog files
As a first step you need to get commitlog files. Retrieve them with cvsup(1). An example supfile is:
# Change the next line to use your nearest CVSup mirror site, check
# out http://www.FreeBSD.org/doc/en/books/handbook/cvsup.html
*default host=cvsup2.FreeBSD.org base=/usr prefix=/home/ncvs
*default release=cvs delete use-rel-suffix
# If you have a slow network link, uncomment the following line!
#*default compress
# Next two lines will fetch/sync the commitlogs of /usr/src only.
# If you are interested in doc/ports/projects too then you will
# need "cvsroot-all" instead of only -common and -src.
#cvsroot-all
cvsroot-common
cvsroot-src
Store this as file cvsroot-supfile and run cvsup:
"cvsup −i CVSROOT\*/commitlogs cvsroot−supfile"
This will retrieve all commitlog files. That is some 32 MiB as of June 2006. If you are not interested in old logs use a refuse file as described in cvsup or a more selective "−i" option in the above command line example.
Step2: HTMLizing with commitlog2cvsweb
To check what was going on in the area of FreeBSD kernel development since last monday run this command:
"commitlog2cvsweb
−−since "monday 0:00" −o
sys.html
/home/ncvs/CVSROOT/commitlogs/sys"
and open sys.html.
To see all kernel commits mentioning "sound" or "pcm" dating from the year 2006 run:
"commitlog2cvsweb −−since 2006−01−01 −−before 2007−01−01 −o sound2006.html −i −−log sound −−log ’\bpcm\b’ −−sort /home/ncvs/CVSROOT/commitlogs/sys*"
Note how "\b" (word boundary) was used to avoid matching "pcmcia"!
This implementation is too slow.
Commit messages pasted into logs of other commits may confuse the parser.
Timestamps in commitlog files without a timezone are interpreted according to the local timezone. (These timestamps occur only in very old FreeBSD commit logs.)
Option "−−link−commiters" always adds a link to the next commit made by the same committer. This is wrong for the last one. (This bug is a consequence of single pass processing.)
Martin Kammerhofer <mkamm@gmx.net>