Distributed version control systems – why?

Some time ago I finally had time to read the Subversion book and felt that all my questions were answered. I tried SVN many years back and failed miserably, but now I’m confident in my ability to use, install and maintain SVN. However there seems to be a new buzz about distributed versioning systems (like darcs, http://www.selenic.com/mercurial, and so on), which for the longest time I didn’t get. It seemed to me that everything I need or could possibly need is in SVN. Then it hit me:

"Classical" version control systems like SVN are about keeping a central repository of "stuff" (code mostly, but it can be other things) enabling a large set of users to work on it concurrently and coordinating them to minimize friction but also ensure that they don’t step on each-others toes. The versioning part of the systems is a side-effect of these goals (meaning that versions are primarily there as an accounting mechanism – a "who did what" type of thing).

Distributed version control systems on the other hand put the emphasis exactly on that: keeping a very granular history. To put in a very oversimplified way: in my opinion if you have permanent connectivity to your SVN server (it’s on your local box for example) and you "commit early, commit often" you basically have most of the advantages if a DVCS. Or to put it otherwise:

If you’re using SVN, then somebody can go away, work on a change for days (weeks, months) and come back with a big patch which you apply and you’ll see in the log that at the given commit you’ve changed a thousand line of code for example. With a DVCS (if I understand correctly) you would merge not only the patch, but also the history of the patch, having a result similar to the branch-merge method (ie when the changes were gradually committed to a branch which got merged back into the trunk), but without the need to have constant access to the SVN.

In conclusion, currently I don’t have any great interest in DVCS both because I have (almost) permanent connectivity to my repository and I already "commit early / commit often", but this (as almost all the things) may change in the future :-).

Update: Hanselminutes (a great podcast for every developer) has just published an episode about Git, an other distributed version control system (this one is written by Linus Torvalds himself and is used to develop the Linux kernel). It contains some good discussions about Git from a Subversion user point of view.

Leave a Reply

Your email address will not be published. Required fields are marked *