Centralized vs Distributed Version Control (was: Re: [Ilugc] Subversion Open House @ CollabNet Chennai)

  • From: doran+clug@xxxxxxxxxxxxxxxxxxxxx (Doran)
  • Date: Wed May 2 20:59:56 2007

On Wed, May 02, 2007 at 07:51:53PM +0530, S.Ramaswamy wrote:

Subversion is outdated in the same way "Windows is outdated". Our
community has never lagged behind when it comes to wishful thinking
;-)

Amen to that.

Damn, I was trying not to dive back into this thread, but I have to
disagree with you on management issues: *many* projects using Darcs have
a single, central, canonical repository, and distributed branches are
merely for individual developers to hack on. This provides great
freeedom: while hacking on a project like this, I can make changes
willy-nilly in my development branch and not worry about cluttering up
the changelog of the central repository. I can even have my editor
commit the change every time I save to compile or test or lint the code,
without having to worry about the effects of maybe hundreds of commits a
day on the central repository. As I'm going, I get all the advantages of
version control -- mostly being able to inspect the changes on a number
of scales. When I have the code in a stable state, I can package up my
patches and send them as a single change -- perhaps by e-mail, where
appropriate hooks will run a test suite against it before committing it
to the main branch. This sort of model is approached by SVN's
lightweight branching, but it doesn't go far enough and isn't exploited
well enough in the majority of cases.

Also, I've worked in a number of places (on and off dev teams, but
mostly off them, attempting to support the developers) where the VCS is
seen merely as a backup tool. Changes get checked in and history is
ignored. Branches are under-utilised. Bug-ridden code or even cruft such
as temp files get checked in, and nobody cleans it up until stuff really
starts breaking. Developers in such an environment rapidly lose any
sense of ownership of the code, or craftsmanly pride in what they have
produced.

For sure, this is a social issue more than a technical one, and a number
of underlying social issues in programming for cash are exposed, but I
see it partly as a legacy of poor tools. Back in the day, using RCS/CVS,
there were two ways to go: either check in every little change and deal
with the history becoming overloaded with "fixed typo" and similarly
pointless cruft, or carefully hone whatever you do to make it a work of
art before checking it in. Naturally, neither extreme has ever been
achieved for more than a dozen checkins so we end up with the worst of
both worlds: a history that provides little more than meaningless
statistics for managers to get excited about ("Woo so-and-so checked in
eleventy-thousand lines of code this year!" never mind half of those
were fixing his own mistakes), and lack of access to good differencing
tools when it matters most: making incremental changes.

SVN goes a long way to correcting this, if its branches are properly
utilised (by which I mean: heavily, with a lightweight structure in
place).  But unfortunately, it suffers from legacy in some of the same
ways CVS does:while a "long term goal" is to achieve DVCS this isn't
something that can be bolted on, much as repository-wide versioning
can't just be bolted on to RCS; and even moreso those coming to it too
often see it as another member of the CVS line to be treated in the same
way. The proper use of DVC is actually a radically different way of
thinking, where the code is not static but is interacted with at every
stage as a changing entity with all those changes visible. This makes
regression-type bugs difficult to introduce, makes many types of
refactorings unbelievably easier, encourages modular code and generally
seems to lead to much more polished code.


So in summary, I'm a verbose fanboy. And I'm probably too hard on SVN.
It's no coincidence that the Darcs and Haskell worlds have so much
overlap, which harks back to the point that I quoted. But don't let that
put you off, the un-learning curve for doing version control the wrong
way (CVS) is much less than that for programming the wrong way (Java).
But now I've probably turned off or at least confused the Java fans, so
I'll stop with my foot approaching my mouth.


Doran

Other related posts: