CVSHistory

What is CVSHistory

CVSHistory is a web interface to browse and search a CVS history file in order to track development activity on a software project. It is designed to integrate into ViewCVS or CVSweb, but it can be used as a standalone script if necessary.

It includes powerful search functionality to limit the entries by user, filename, directory, revision, date, or CVS command type. Regular expressions, value ranges, and inclusion/exclusion rules are supported.

Screenshots

Requirements

Download

Download CVSHistory 2.2 (Latest) -- A BZipped tarball.

New in 2.2: Courtesy of Julio César Aguilar: Version number comparisons have been fixed, and 'E' handling has been corrected to 'export' instead of 'error.' Courtesy of Ville Skyttä: Support for unknown optypes, URL construction improvements, and some HTML cleanup. Courtesy of yours truly: Corrections on handling complex queries on multiple repositories.

New in 2.1: RSS descriptions are more verbose.

New in 2.0: Separate configuration file, multiple CVSROOT and RSS support, thanks to contributions from Marius Scurtescu and Ville Skyttä.

New in 1.6: 'E' handling in cvs history files. Row colors match ViewCVS better.

New in 1.5: ViewCVS/cvsweb script location bug fixed.

New in 1.4: Fixed a bug that switched the Newer/Older labels in MODE_FAST.

New in 1.3: A high-performance mode for busy servers. Also, cvshist.cgi is now cvshistory.cgi in order to avoid confusion with an existing project. (Oops.)

Old: (2.1) (2.0) (1.6) (1.5) (1.4) (1.3) (1.2)

Installation

First of all, make sure that CVS is generating a history file. If you used

cvs init
to set up your repository, then it most likely is keeping one in
$CVSHOME/CVSROOT/history

The user your web server will use to execute cvshistory.cgi needs to have read (and only read) permission on your CVS history file.

Next, unpack the tarball. You'll see two files in the cvshistory-version directory: cvshistory.cgi and cvshistory.conf. Copy cvshistory.cgi into some CGI script directory on your web server. If you're using Apache, this directory is going to have a ScriptAlias entry in your httpd.conf. If you're planning on using CVSHistory with ViewCVS or CVSweb (highly recommended), it would be best to simply put cvshistory.cgi in the same directory with viewcvs.cgi or cvsweb.cgi. See your web server documentation if you need more help setting up a working CGI environment.

Edit the top "USER EDITABLE" section of the cvshistory.cgi and change the CONFIGFILE variable to the full path of your cvshistory.conf file. Also, make sure that the top line reflects the correct name of your Python 2.X interpreter. cvshistory.cgi includes this by default:

#!/usr/bin/env python

I've heard that on some RedHat systems, you'll want to replace 'python' with 'python2'.

Finally, open up cvshistory.conf in your favorite editor and change any necessary options. At the very least, you'll need to set HISTORY, INTEGRATION, and you'll probably want to set a few others.

Performance

On it's default mode, MODE_SLOW, CVSHistory would perform poorly for servers with very large history files and many HTTP requests. The reason is that, for simplicity's sake, the entire history more-or-less is loaded into memory. With overhead, it's safe to assume that cvshistory.cgi could allocate 1.5 x history file size memory.

If you're on a busy server hosting a large project, it's absolutely essential to change the PERFORMANCE option to MODE_FAST. You will lose sorting capability, and you won't have definite paging boundaries--but you'll use a ton less memory and take less CPU time for every request.

1.5MB history file, default page view:
MODE_SLOW
4.97 real         4.81 user         0.15 sys
MODE_FAST
0.22 real         0.17 user         0.04 sys

Next, set the LIMITDAYS variable to an appropriate value. This will cause CVSHistory to only go back into (today - LIMITDAYS) worth of history. This gives search queries, some of which may not reach PERPAGE matching entries for some depth into the file, a breaking point to "give up" and return their current entry set.

Here are some other suggestions:

Notes

CVSHistory was developed based upon the history file format in CVS 1.11. The CVS manpages do say that this format could change, and they recommend against parsing it directly. This project was made, however, in part due to the limitations of the 'cvs history' command. So, whatever difficulties might arise from tracking this format will have to be faced. If you use a version of CVS that you believe has a different file format, please let the developer know. For the expected format of the history file, search for 'CVSFORMAT' in your cvshistory.cgi.

CVSHistory opens no files in write mode, and it opens your history file in read-only mode. The history file is opened based upon the HISTORY variable set upon installation; at no time are any files opened based upon input from the browser or elsewhere. Because of this, it is very unlikely for a security breach to occur from use of CVSHistory.

Contact

CVSHistory was written by Jamie Turner, and a handful of others have contributed helpful things along the way.