Why CVS Sucks - The Downloader's Perspective

Let me follow up my inflammatory title with all due respect for CVS and what it has brought us, besides a thousand years of pain. Who knows how many man-hours were saved by CVS? Of course, there is always the argument about how many man-hours have been lost due to it as well, but then again we all know the importance of proper backups... especially when dealing with source code control systems. While CVS is one of the oldest, its legacy of suggesting it will do one thing and will do another is probably its most-emulated feature, so it is by no means unique in that regard.

Until recently, however, it was unique in that it was essentially the only Free, Open Source remote source code control system with anonymous access. This means that it has often been the distribution method of choice for prerelease versions of software. While more recently it has been all but superseded and is gradually being supplanted by more modern FOSS source control systems like subversion, git, or bzr (all of which were designed at least in part to address specific, grating failings of CVS) it still enjoys a substantial amount of inertia and it is still the primary source control system for a number of major public repositories.

As mostly a putterer in the software development world, I am somewhere between a user and a programmer. I believe the term is either "Power User" or "Wanker" depending on where you're sitting, but either way I find myself compiling a lot of code from source so that I can play with bleeding-edge features. Many popular projects have already been compiled and even packaged for you, one of today's primary examples being Ubuntu Personal Package Archives ("PPAs"). There are always those edge cases however which are either not packaged or just difficult to find, or which perhaps do not track the features you would like. Luckily, most distributions make it very easy to build software (if you can just figure out the right -dev package names, of course) and so as long as the software in the repository actually builds (never a safe bet) you can generally build anything you can download.

Therein lies the basic problem. While some repositories can be downloaded very trivially, CVS has some major failings that make it altogether undesirable for this purpose. It is of course (at least nominally) acceptable for its primary purpose, which is to allow the checking in and out of various revisions and branches of files with locking behavior, and assisting with merges between revisions. But when it comes to downloading whole repositories, even people with fairly good connections will often have problems. A user on a modem (once the norm, and still not uncommon unfortunately) is in serious trouble. The biggest problem is that CVS' behavior when it fails is anything but pretty. There is no command intended to simply resume the last broken command which failed due only to a network error, and when CVS fails in the middle of transferring a file the results are somewhat unpredictable. While CVS is intended to do the right thing if you check out a directory which is already partially checked out, in practice it often will leave the last directory in which it was working unfinished from the point of the error, resulting in entire trees of the directory structure left unordered.

The solution is to produce "CVS snapshots", an archive of a successful anonymous CVS checkout. This permits first-time downloading of the tree. However, it should not be necessary in the first place. Downloading the files need be no more complicated than a recursive http get, a potentially complicated but typically straightforward operation; in fact, it should be substantially easier due to the ready availability of directory information. In practice, a user on a poor connection will have to babysit CVS for hours to download any substantially-sized codebase.

This message is as much a plea for sense as a rant against CVS. Please, please convert your repositories to some, any other format. If subversion is acceptable to you (it is no more awkward and significantly less offensive to use on Unix systems than CVS, and reportedly a joy to use on Windows via TortoiseSVN) then there is a single tool which can convert your repository to the svn format. There is a learning curve with any new tool, but this is one which will probably save a great number of your hairs from being torn out, and which will certainly save you from having to hear people like me cry about your chosen source control system. It would get a lot more people out there running your testing version, too...

Comments

I've been using cvs on unix for several years and find it no more useful than maintaining a basic set of local directories on the working machine. The group has roughly 10 developers working the same files. And I agree it causes many headaches.

Add new comment

Default

  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • You may link to images on this site using a special syntax
  • Web page addresses and e-mail addresses turn into links automatically.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Internal paths in single or double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or path. Paths to files in single or double quotes, written as "files:somefile.ext", for example, are replaced with the appropriate URL that can be used to download the file.
  • Filtered words will be replaced with the filtered version of the word.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <q>

Issue

  • Lines and paragraphs break automatically.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>

Drinking Game

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p> <br> <pre> <h2> <h3> <h4>
  • Images may be embedded like: [image:node_id align=alignment hspace=n vspace=n border=n size=label width=n height=n nolink=(0|1) class=name style=style-data node=id] Leave off any attributes you don't want.
  • [img_assist|...] tags will be displayed, maybe. Please don't make more of them.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.