CvsGraph 1.4.0, 17-Mar-2003
CvsGraph creates a graphic representation of the revisions and branches in a
cvs/rcs repository. CvsGraph is inspired on the 'graph'-option from WinCVS. I
could not find something right away on the web and decided that it was time to
write a stand-alone version. I might have been doing some double work, but hey,
I like a hack.
New in this version
- Fix warnings in readconf on some 'older' compiler systems.
- Implement new option to generate proper maps for different levels of HTML.
The option -x[34x] determines HTML 3.x (default), HTML 4.x or XHTML style
- Implement a scheme to visualize merges based on tag names. If tags are
consistently named at the mergepoint and the destination, then these points
can be detected using regular expressions. Several new configuration
options, merge_*, describe the tags.
- Implemented HTMLizing of expansion with %(...%). This prevents a possible
cross site scripting exploit when you use '<', '>' or '"' in tagnames.
This is a remote chance (you must be stupid to use these characters in a
tagname) but anyway, your system can be under attack.
- Fixed backing up in the lexer. This improves speed slightly because no
rule requires lookahead over one character anymore.
- Fixed a bug in the initial placing of left to right displaying.
- Half-fixed a bug in the kerning code, where a loop-safeguard was triggered
way too soon (at 100 iterations). This has now been changed to 10000, but
should be dependent on the number of drawable branches, as the function is
_at least_ order O(N^2). However, more analysis is required to ensure
safe guarding under all circumstances.
- Implemented folding of empty branches. Many uses of CVS create many
branches on the same revision but have no commits on them. This occurs
often with stable files like .cvsignore files and the like. A new
configuration option branch_fold enables imaging consequtive brances
with no commits in the same branch-box. This reduces images by a huge
factor (28000x1700 -> 2100x2300, i.e. a factor of 10). It also speeds up
drawing considerably. The branch_fold option is *on* by default.
- Fix duplicate branch-boxes (branch_dupbox=true). No duplicates should be
created if there are no commits on a specific branch. There is no reason
for having two boxes on top of each other.
- Implement folding for all branches on the same branchpoint if empty. New
option branch_foldall controls this behavior. See cvsgraph.conf(5) for
details. The imagemap is configured to map all branches within the box.
$ cd /where/ever/you/want
$ tar xzf cvsgraph-1.4.0.tar.gz
$ cd cvsgraph-1.4.0
This should do the trick and you have an executable file 'cvsgraph' in the
NOTE: The GD library is required for CvsGraph to function. Get it from
http://www.boutell.com, compile it and use either --with-gd-lib=DIR
and --with-gd-inc=DIR to specify its location. You might also have
to use --with-z-inc, --with-z-lib and --with-png-inc, --with-png-lib
for gd versions 1.6 and higher.
If you build with static libgd (i.e. libgd.a) and already have
libpng.so and/or libjpeg6b.so (i.e. dynamic), then you might want to
try to trick configure into adding these libs to the tests by adding
commandline options '--with-png-lib=.' and '--with-jpeg-lib=.'.
If you have linked libgd with freetype, then you might also need
either --with-freetype-lib or --with-freetype2-lib.
Put the executable file 'cvsgraph' somewhere where you think it should go.
Normally this would be "/usr/local/bin" or "/usr/bin". The configuration file
ought to be put in "/usr/local/etc" or "/etc". The exact position can be
overriden on the commandline anyway. Edit the configuration file to your liking
and you should be all set.
Do *NOT* execute the program directly from a webserver. Direct execution would
be very insecure. Make a wrapper cgi-script in php, perl, or whatever you
normally use. The easiest way is to get the ViewCVS package from their website
at http://viewcvs.sourceforge.net and follow the instructions.
Alternately, you can hack the 'cvsweb' package to call CvsGraph. There are
several scripts and patches available from the CvsGraph homepage (see below for
address). However, the scripts are no longer maintained because ViewCVS has
native support now.
To generate an image do something like:
$ cvsgraph -r /home/to/repository -m module -o mygraph.png myfile.c,v
This generates a revison/branch image of the rcs file 'myfile.c,v' and puts it
into 'mygraph.png'. The '-r' option is the path to the repository *located and
accessible* on your filesystem. The '-m' is the module in the repository. Note
that the extension of the file ends with ",v".
Just to make it clear: You cannot make images from a cvs-repository over the
internet as if you were using cvs. The repository files
must be on a locally mounted filesystem. However, you
can use cvsup or rsync to get a repository to your
local filesystem and make then images from there.
Type 'cvsgraph -h' to get a full list of options. If the output is not given
(no '-o'), then the output is written to standard output.
Please read the manual pages cvsgraph(1) and cvsgraph.conf(5) for more
information on execution and configuration.
- do a better job in making a layout (auto moving branches and rubber banding
revision-connectors to make place). A start is made, but this is not very
- draw only a part or parts of the tree.
CvsGraph is distributed under GNU GPL v2. See 'LICENSE' for more information.