CvsGraph

A CVS/RCS repository grapher

CvsGraph is a utility to make a graphical representation of all revisions and
branches of a file in a CVS/RCS repository. It has been inspired by the 'graph'
option in WinCVS, but I could not find a
stand-alone version of this graph code. So, it was time to write one.

Automake is used from version 1.7.0. There can still be problems. Please
let me know if you run into problems.

CVSNT is supported as of version 1.5.1, including mergepoints. Please
report any stability problems and errors.

I no longer build/provide rpm packages as of version 1.6.1. Fedora supplies
its own binaries in the 'extras' repository. Also, most Linux distros have a
prepackaged version available. You are encouraged to use those packages for
your convenience and automatic update purposes.

ViewVC with CvsGraph

CvsGraph is officially supported by ViewVC (previously known as ViewCVS*)
as of version 0.8. The CvsGraph cvs-source is viewable with ViewVC.Note 20060102: I fixed the repository for the colored images. See the testrepository.
I have made a set of patches against ViewVC' distribution and current CVS to enable
new features of CvsGraph version 1.4.x and later.

Please note that this patch does not work with older versions of either
CvsGraph or View{CVS,VC}.

Notes from Jene Jasper:
Just finished creating an update of the patch for ViewVC 1.0.4. Included a diff
and txt (with Windows style path for GnuWin32:
patch -i viewvc-1.0.4-cvsgraph-1.6.1.txt -p 0 [--dry-run] --verbose) file.
Also changed the patch a bit:

the default setting takes effect again, when the user selects a new cvsgraph_href

reformatted the table into a 4 column setup instead of the 2 column one

footer changed to contain a reference to CvsGraph next to ViewVC

view.conf is also patched the same way as view.conf.dist to be able to run the patch on an existing configuration that wasn't dramatically changed from the distribution version

Other notes for the patches:
The patch changes following:

add options in the graph display page:

upside-down display

add/remove an extra branchbox at the end of the trunk

left-to-right and right-to-left display

strip untagged revisions

user settable limit on maximum tags displayed

viewcvs.conf option cvsgraph_useropt to control the visibility of above options

viewcvs.conf option cvsgraph_opt to set the defaults of above options

cvsgraph.conf branch_tag_* options to set proper defaults to the new options

Continue with the install instructions of the distribution. After installation,
you might want to take a look at the cvsgraph.conf file and change some of the
new options for version 1.4.x.

CvsWeb with CvsGraph

27-Feb-2004: Ville Skyttä writes from FreeBSD.org:
I'm glad to announce that the new stable version of FreeBSD-CVSweb 3.0.0 has
CvsGraph support built in, zero patching necessary. Feel free to update
the information on this in the CvsGraph page.

Another wrapper written in perl was contributed by Sietse Visser.
You might also want to modify the call to the wrapper
(Internet Explorer has terrible problems rendering text/plain and insists on showing it as text/html.
To view it, use a browser, or look at it with "show source" option in IE).
Another wrapper in perl, donated by Roberto Aragón Pividal, acts like the php scripts
listed above to generate an image with imagemap (note that these perl scripts do not check
arguments!):

I get the error "cvsgraph.c:52: #error No image output format available. Check libgd" when running make
This is caused by libgd missing vital libraries. Please check config.log
for the details of which library is missing. Then add a --with-xxx-lib=yyy
to configure. Rerunning configure means that you might want to run 'make distclean'
first, or remove the cache file to make sure that everything is checked.
Most often this happens on systems where you have libgd compiled as a static library
(manual installed libgd and associate libraries).
If you know how to write proper autoconf checks, then please send me a patch, or tell
me how to do it.

I get lex errors "lex: illegal option -- 8"
This is because you need to use flex. Get it from a GNU mirror near you.

I get lex errors "rcsl.l", line xx: undefined symbol: rcslval"
This is because you need to use bison. Get it from a GNU mirror near you.

I get errors translating/compiling file rcsy.y
This is because you need bison. Get it from a GNU mirror near you (byacc might work, but I do not support it).

cvsgraph and/or configure can't find all (dynamic) libraries
This seems to be a major problem on SunOS and the like. You need to check the library-path to include /usr/local/lib
because many libraries end up there.
For SunOS 5.9 you can do something like: crle -l "/usr/lib:/usr/local/lib"
Can someone please send a patch for configure.in so that detection works?
Also, please check the /etc/ld.so.conf file on Linux and check if the webserver (in conjunction with viewcvs) adds/strips
a LD_LIBRARY_PATH or setting.

Does CvsGraph support Subversion?
No, no and no. Subversion is a no go because they have trashed the tree-structure of branching by making the repository
a copy database. Not even tags are real, but copies of files.
A quote from the subversion mailing list
(alt link):

> Does CVSGraph version 1.5.0 support subversion repositories when used with
> development version of ViewCVS?

The basic problem that cvsgraph solves for CVS (full history tree
browsing) is at best untenable, and worst impossible, in Subversion
right now (due to the design of the repository). This is a problem we
aim to solve (in Subversion) in the relatively near future.

I get no image in ViewVC/ViewCVS but see a Python Exception
You probably see something similar like:

The problem is that the cvsgraph executable cannot be run because it is not
found. This is most of the time because you have misconfigured the option
cvsgraph_path in the viewcvs.conf file. Please check that you have a
trailing '/' in the path and that no leading or trailing whitespace is on that
line.

Do a better job at drawing the merge lines by selecting the shortest path
from the revision boxes. An analysis is now done whether the source and
destinations should be on the left or right side.

Fix the left_right case for merge lines to display correctly.

Fix a +/-1 error on the merge lines to account for both rounding errors and
the shadow of the revision boxes.

Add configuration option 'merge_on_tag' to force the left_right case to
display merge lines on the tags instead of on the top/bottom sides. This also
solves imagemap overlaps where multiple sources or destinations would be
displayed at the same position.

Fix the imagemap function to record the correct position of the merges.

added resorting of branches on how many revisions they have. This saves
space under circumstances.

Added option merge_findall so that merge_from/merge_to tags can have multiple
matches.

Added the patches supplied by Ville Skyttä

fixed spelling in the manpages and config file

fixed & -> &amp; problem in config

fixed generics in wrapper example

Added a fix for the zimezone problem as suggested by Henrik Carlqvist by
using the environment.

Fixed a bug in the detection of branch-numbers in the logical ,v file
structure (reported by Daniel Dumitrache). The branch was deduced from the
revision, but that would fail for revision numbers that are like magic
branch-numbers (x.x.0.x) because they were interpreted. These revision numbers
are now correctly handled.

Added patch from Gordon Hollingworth to use mergepoints as implemented by
CVSNT. Adapted the patch to enable both tag-detected merges and mergepoints to
be shows at the same time.

Changed the warning behaviour so that known CVS/CVSNT extension phrases
don't generate warning messages that mess up the generated image.

Implemented selection of png compression level with image_compress and enable
interlacing (progressive load) for both png and jpeg images with image_interlace.

Add regex method for ignoring tags in the generation of the graph. Old
trees are overpolulated and this is a way to reduce it even further. New config
options tag_ignore, tag_nocase and tag_negate.

Added drawing of partial trees. You now can select a subtree based on a
revision number, branch number or symbolic tag to show only that part of the
tree. New config option branch_subtree selects which part is shown. If the
subtree is empty, then the whole tree is shown.

Most error and warning messages are now displayed in the graph, instead of
being written to stderr. This enables you to see an image eventhough errors
might be present. The old method would generate a corrupt image. New
configuration options include msg_color and msg_font to control the looks of
it. Messages are always printed at the bottom of the image.

Fixed a bug in the folding code where subtrees would not fold correctly.

Added diff links in the map-generation for detected merges so that you can
get the differences in merge-operations. The options map_merge_href and
map_merge_alt must be set accordingly.

Thanks to Russell Yanofsky and Chris Bridges (cvsgraph at rfel dot com) for the windows binaries.
Please see http://www.cvsnt.org/wiki/CvsGraphMingw
for details if you want to compile a windows binary. I do not know anything about it.

Thanks to all others who contributed bugreports and patches which I
probably have mentioned in a log or other places. Mail me if your ego is big
enough to want a place on the frontpage ;-)

* The icon used is shamelessly taken from the ViewCVS distro,
file cvsgraph_16x16.png. I cannot find any reference to the original creator,
otherwise I would gladly credit him or her personally.