SCM ? What about darcs ?

How I Learned to Stop Worrying and Love the SCM.

Since almost 2 weeks i am trying to understand why i should not consider darcs superior to svn. Strange question ?

For at least two years and ten months, i am using subversion on a daily basis. It is really powerful. Especially regarding a lot of tricks you can find in it (special award to svn:externals). But, even if it is a really good super CVS SCM, i think CVS-like system are almost doomed.

OK, last sentence was only to open a discussion and is purposely provocative!

CVS-like SCM requires dedicated server or special mechanisms to be used in intranet/extranet environment. I am speaking of pserver, svnserve, ssh, webdav/deltav/apache. All of these are complicated to setup and always represent a source of security problems (giving ssh access to a computer is NEVER a good idea, even if you restrict the command set that should be used). It also makes choices for you (try to use svn/dav with lighttpd). These SCM are not "internet" enabled by definition. Just to take an example, i am always fearing that one of the forge around get badly compromised by any black hat willing to show his power (alioth, savannah). I think the compromission will come from a SSH access or an attack against apache.

CVS-like SCM doesn't fit well for mobile user. They are centralized and commit can only be made when you can reach the central repository. This cause problem for people with occasional access to the network. The most simple example in subversion: modify a file, try to rename this file! You can't if you don't force the operation. When you are connected, you commit and then move the file.

CVS-like SCM doesn't help people to submit partial change to upstream author. Yes, this is the point of OSS. Enabling everyone to take your source, modify it and contribute a patch. This is a really good thing. But, with CVS-like repository, you must trust enough the user to add it to your project and give him the right to commit. There is no possibility to only accept one patch easily: there are nothing made for this in CVS and Subversion.

OK, now let's compare all this to darcs:

  • only need FTP/HTTP/File/SSH to be deployed in intranet/extranet (i.e. a simple server, without write permission -- this is a good thing),
  • anyone who can access your archive, can fetch your code and modify its local copy,
  • darcs made easy to name local patch, explain what you been made in it, and send it to upstream author (using mail or write access).

In fact, all this are also done in other new generation SCM like arch, cogito, mercurial et al. I start reallly thinking about this when the upstream author of Perl-NetDBUS just send me the URL of his mercurial online archive. Well i have also started to think about it, one week before, when i was wondering how to put my OCaml source code on my website.

Darcs is also superior by the fact that:

  • there is only a few commands
  • you are guided when you commit with human style question (yep, no more "$> command nuke-the-world-and-hope-that-nothing-bad-happens")
  • there is real reflexion of what a SCM should be ("theory of patches")

After using it for a few time i was really impressed by the learning curve. I really begin to feel the power of this tools after one week, compared to 2 months for subversion.

I am also impressed that this tool is written in Haskell (one point for GHC, OCaml will follow you).

For now, i will continue to test this tool, but i really do think that this will be great experiment (until i discover that it is only another crappy things).

Thanks to darcs developper!

They posted on the same topic

Trackback URL : http://sylvain.le-gall.net/blog/index.php?trackback/12

This post's comments feed