ViewCVS: Viewing CVS Repositories

Quickstart: download
ViewCVS project page

Links:

Home
Upgrading
Contributing
License
Who

Sections:

Features
History
Mailing Lists
vs. cvsweb
Download
Future directions
Colorization
Related Software

Features

ViewCVS can browse directories, change logs, and specific revisions of files. It can display diffs between versions and show selections of files based on tags or branches. In addition, ViewCVS has "annotation" or "blame" support, Bonsai-like query facilities, template-based page generation, and support for individually configuring virtual hosts. It also includes support for CvsGraph -- a program to display the tree of revisions and branches graphically.

Currently, the functionality of ViewCVS surpasses that of cvsweb. See below for a list of additional features.


History

The ViewCVS software was inspired by cvsweb (originally written by Bill Fenner and then further developed by Henner Zeller). Greg Stein wanted to make some changes and updates, but cvsweb was implemented in Perl. He wrote:

While I can manage some Perl, cvsweb was rather unmaintainable for me. So I undertook the task to convert the software to Python. As a result, I've actually been able to go way beyond the simple changes that I had envisioned.

ViewCVS started as a port of the cvsweb script, but has had numerous cleanups and other modifications, based on some of Python's strengths. There is still some minor "badness" remaining from the Perl code, but Greg has been working on flushing that out, while adding new features.

ViewCVS has been developed by the ViewCVS Group and is made available under a BSD-type license.

ViewCVS requires Python 1.5 or later (Python 1.5 has been out for a couple years and is readily available for your favorite operating system). If you choose to use the SQL Checkin Database feature, then you must use Python 1.5.2 or later and have the MySQLdb module installed.


Mailing Lists

If you have any comments, questions, or suggestions, then please send them to the ViewCVS mailing list, which is also archived.

A mailing list for ViewCVS developers is also available (Archive).

ViewCVS is an Open Source project, and all contributions are welcome.


Additional features over cvsweb

  • Template support: you can now customize the look and feel of ViewCVS by editing the provided EZT templates, which are used to generate the pages.
  • Internationalization support: ViewCVS will parse and handle the Accept-Language request header, and can select different inputs for localized page generation.
  • Colorization for many file types via enscript.
  • Bonsai-like query features. (Requires MySQL and some other prerequisites)
  • Annotation/blame viewing support against a read-only repository.
  • Configuration on a per-virtual-host basis. This allows you to share the configuration file and ViewCVS installation across virtual hosts, yet still be able to fine-tune the options when necessary.
  • Automatic generation of tarballs for the HEAD or a specified tag.
  • Runs either as CGI script, called from an installed web server (such as Apache), or as a standalone server.
  • Searching files for matches for a regular expression.
  • Better reporting for unreadable files.
  • More robust when given varying rcsdiff or rlog outputs.
  • Hard breaks in human-readable diffs.
  • The configuration file is optional (you can change the values right in the CGI script and avoid the config file, if you so choose). The config file syntax is also cleaner, since it is human-manageable rather than source code.
  • Directories with a large number of files can be viewed.
  • Support for browsing Subversion repositories. (requires Subversion's Python bindings)
  • Security: ViewCVS only requires read access to the CVS repository (not read/write). With the correct security partitioning, this means that even if ViewCVS were to be subverted, your source code is safe. Further, ViewCVS does not use any system() or popen() calls, which are very susceptible to abuse.
    (cvsweb had a hole due to a popen() call)
  • Last but not least: it doesn't suffer from the "unmaintainable code effect" that hits most Perl projects sooner or later:
    [Perl] combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski

The changes present in each release are available in ViewCVS's CHANGES file.


Download

The software is available for download:

Version 0.9.2 of ViewCVS as a gzipped tar
Version 0.9.2 of ViewCVS as a ZIP file

Of course the current development version is also available through ViewCVS itself:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/viewcvs/

You can also see the changes for this release.


Future features, directions

ViewCVS is a Open Source project. So any future development depends on the contributions that will be made by its user community. Certainly working patches have a greater chance to become realized quickly than feature requests. But don't hesitate to submit your suggestions! Send mail to the viewcvs@lyra.org mailing list or even better use the SF tracker.

  • See the feature requests already submitted through the SF feature request tracker
  • UI streamlining/simplification
  • Integration with CVS checkin auto-mail scripts
  • Tighter integration with the query features

And another longer term pet of Greg Stein:

  • Integration with an indexer such as LXR


Colorization of files

ViewCVS can make use of the enscript program to colorize files in the CVS repository. If enscript is present on your system, then set the use_enscript option in the viewcvs.conf configuration file to 1. If necessary, update the enscript_path option to point to your installation directory. ... That's it! Now, as you view files through ViewCVS, they will be colored.

Colorization of Python files

ViewCVS currently also comes with a builtin colorizer for Python source files. This may go away in a future version, given the new enscript support...

Christophe Pelte suggested this feature: colorize Python source files using py2html (by Marc-Andrew Lemburg, based on PyFontify by Just van Rossum). I've added this feature to ViewCVS 0.3, along with a generalized plugin mechanism for custom coloring other types of files. See the instructions within the viewcvs.cgi for setting the py2html_path configuration variable if you want to use this feature.


Related Software

Finally we compiled a list of links to related software projects that might be also of interest to you:

  • Python : The programming language ViewCVS is written in.
  • CVS : CVS is the Concurrent Versions System, the dominant open-source network-transparent version control system.
  • RCS : Revision Control System; the backend to CVS.
  • Subversion : a CVS-like open source version control system.
  • Apache : A (The?) web server.
  • enscript : used to colorize code displayed from the CVS repository (see above).
  • CvsGraph : server side software used to display revisions graphically. Called from ViewCVS.
  • MySQL : to create and query a commit database. To make use of it you also need:
  • mysql-python : the Python language binding to access MySQL databases.
  • CVSGrab : client software used to grab from a public repository using ViewCVS and HTTP (useful if you are behind a firewall).


ViewCVS Users Group
Last modified: Sat Jun 15 11:30:35 CEST 2002