Here’s a really brief layman’s description of the Subversion version control system along with some links to resources about it. Since this most excellent tool is approaching its 1.0 release, you might want to check it out, if you’re into that kind of thing. I’m not as well-versed with Subversion as I’d like to be, so feel free to post a comment if I got anything wrong.
I’m really interested in the way people organize information and, in a more general sense, how technology can help people work more intelligently. Using technology to get more organized really pumps me up.
I’m really fascinated by version control systems. I think SourceSafe reeks, but that’s not news; everyone who uses SourceSafe thinks it reeks. I used a commercial product Perforce for a while and I liked that, but it’s kind of expensive ($750/seat) and a lot of purists don’t like it because it, like SourceSafe,
Locking version control systems force you to check out a file to edit it. Locking is good because it means that two people can’t muck with the same file at the same time, but it’s bad because two people can’t muck with the same file at the same time. And if I check out a file, go to lunch, and get hit by a bus, you are hosed, at least until you can track down a repository administrator to release my lock on the file.
The most prevalent version control system in the open source world today is a free product called CVS. A lot of people think it reeks too, but they continue to use it because it reeks less than all the other stuff out there. (Like other ancient protocols which also reek yet continue to exist as part of the DNA of the Internet — SMTP comes to mind — CVS seems to have persisted for so long because it has persisted for so long).
CVS doesn’t lock files by default. Instead, if you want to work on something, you just start working on it. If it should happen that I changed the file while you were working on it, either you or I can merge our changes to the file using software tools that are specifically tailored to that purpose. This enables projects to scale up to hundreds of developers without the need for a lot of centralized management — perfect for open-source projects.
Subversion is a version control system that attempts to take the goodness from CVS (such as an easily automated command-line interface and a lack of locking) and get rid of some of its long-standing shortcomings — such as the lack of ‘atomic commits’. The ability to do atomic commits means that if you make changes to more than one file, you can specify that all of the files you’re working on must be checked in as a single ("atomic") unit. In a world in which changes to multiple files often have critical interdependencies, this is a nifty feature. But there are other important benefits to using Subversion as well, such as efficient handling of binary files and an easy way to browse repositories with a Web browser (thanks to the fact that Subversion is built on top of the Apache Web server).
Subversion, like CVS, is also an open-source project. But unlike CVS, a lot of development resources are being devoted to it today. Subversion is currently close to a 1.0 release; its own team have been using it to store their own source code for many months now. They say that neither they nor anyone else have lost data with it.
I wrote this mainly to kick off a new category devoted to Subversion; I have a couple of projects I’m working on that I’d like to use it for. So I’m going to try to devote some time to learning it well.
The book Version Control with Subversion is the definitive book on Subversion. The pre-publication version is available free online today, but the book will supposedly find its way into print at some point (I think O’Reilly is going to publish it, and I understand that APress is working on their own Subversion book as well, which is great).
TortoiseSVN is a nifty GUI front-end for Subversion that provides deep integration into the Windows shell. If you ever wanted to right-click on a file and add it to a version control repository, TortoiseSVN is what you want. This is the tool that I use to do 99% of my daily interaction with Subversion.
There is a Visual Studio .NET add-in for Subversion called AnkhSVN.
Subway is a project to create an SCC provider for Subversion. SCC providers let you get to a source control system from development environments that supports Microsoft’s SourceSafe integration API (this means Visual Studio and Visual Basic, but also others such as Macromedia Dreamweaver). This looks like it will be a great choice if you have existing SourceSafe users that want a relatively seamless upgrade path, but it also looks like this tool is a work in progress; the first (and only) release was put out in April 2003, and the last update to the Subway Web site was in June 2003.
Subversion has its own client API for C/C++ that you can use to integrate Subversion repositories into your applications. Here is an article by Garrett Rooney on using the Subversion Client API. Here is part two of that article. The full Subversion API documentation is here.
Updated 28. Dec 2003 to reorganize and provide more details for Subversion utilities for Windows, in particular the indispensible TortoiseSVN and the unfortunate not-ready-for-prime-time-ishness of Subway.