Thursday, November 15, 2018 [Tweets] [Favorites]

Version Control Before Git with CVS

Sinclair Target (Hacker News):

Whereas with Git you’d talk about the version of a file associated with commit 45de392, in CVS files are versioned separately. The first version of your file is version 1.1, the next version is 1.2, and so on. When branches are involved, extra numbers are appended, so you might end up with something like the 1.1.1.1 above, which appears to be the default in our case even though we haven’t created any branches.

[…]

Since CVS doesn’t have easily addressable commit objects, the only way to group a collection of changes is to mark a particular working directory state with a tag.

[…]

Because you need a tag to rewind to an earlier working directory state, CVS encourages a lot of preemptive tagging. Before major refactors, for example, you might create a BEFORE_REFACTOR_01 tag that you could later use if the refactor went wrong. People also used tags if they wanted to generate project-wide diffs. Basically, all the things we routinely do today with commit hashes have to be anticipated and planned for with CVS, since you needed to have the tags available already.

This is a good retrospective of what it was like to use CVS. In my experience, it was also much more prone to corrupting the repository than either Git or Subversion.

3 Comments

For more about VOODOO, see my review.

CVS is really just an incremental change to RCS, which shares all of the same problems and then some.

Before my employer used Git, they used a commercial product called Perforce (https://www.perforce.com/) which avoided most of CVS's problems. It was also a centralized system, so you still have to check-out and lock files, but it tracked commits as distinct objects, so it was very easy to view all the changes of a commit or perform a rollback. It also had a very good merge-conflict resolution system, where it would automatically find the common ancestor of the two files in question and set up the 3-way diff.

These days, git provides everything I and my employer need so we're no longer using a commercial version control system (and companies like Perforce have expanded their product catalog to go beyond just version control in order to remain competitive). Seeing these descriptions of CVS reminds me of how lousy free version control software was 20 years ago - which is why we didn't want to use it at that time.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment