Darcs and source code management

In the last years we’ve seen many SCM trying to replace SVN (which in turn replaced CVS in many places). Git, Mercurial are two examples of that. I never really looked into them as they mostly sounded like “SVN with this” or “SVN with that”. 

Then I discovered darcs and I never went back. Sure, XCode has no integration with darcs, but one can live without that. What made me switch from SVN to darcs is the “theory of patches” it is based on. It makes redundant most concepts like branches, revision and even tags are different (they are an empty patch depending on all patches that were in the repository already). This way it is really easy to branch (if XCode had any integration, it would make its snapshot feature incredibly powerful) and merge back. I also found it easy to handle conflicts (except on project.pbxproj files, be careful with those).

For Cocoa developers (like us) it is also really welcome that darcs puts only ONE directory (called _darcs) in the main project folder (unlike svn putting a .svn folder everywhere) so you are unlikely to mess things up, for example by copying nibs to localize them or things like that (which was plaguing me as PDFKey Pro is localized in many languages and I kept doing the same mistakes over and over with SVN).

Currently, a Darcs GUI for Mac OS X is in the works, is called Darcheology. It is already quite neat but is in dire need of contributors, so if you got some spare time, it is surely worth to take a look at it!

5 Responses to “Darcs and source code management”

  1. Jason Foreman Says:

    Git and Mercurial (and don’t forget Bazaar), are definitely not “SVN with this or that”. In fact, they are probably more like “Darcs with this or that”. They all share a distributed style similar to Darcs. Git uses a paradigm probably quite similar to the “theory of patches” as well, wherein it stores changes in content, rather than a history of files. Darcs has been around longer than any of the current generation of ‘mainstream’ DVCS though.

    Last I tried to use it, Darcs had some rather severe performance problems. Maybe it has improved over the past couple years and deserves another look. But I would encourage you to not write off Git (or others) as being too like SVN. They are certainly not. Linus’ Google Tech Talk about Git, while not particularly techical, is quite entertaining and will certainly prove that Git tried to be as unlike SVN as possible.

  2. Michele Says:

    @Jason

    I didn’t know about Bazaar at all. Although I didn’t spend much time with Git or Mercurial, it looks like they are not based on the concept that a repository is identified exclusively by the set of its patches, which is the main difference between darcs and SVN from my point of view.

  3. Jean-Daniel Says:

    Note that removing all the .svn folders and replace them by a centralized directory is in the TODO list for SVN 1.5 (or 1.6 I don’t remeber).

  4. Michele Says:

    That is surely a good thing! Not a good reason to switch back, but probably one reason less for those who wanted to switch away from SVN. My advice still goes on trying Darcs 😉

  5. Programmer Says:

    Why do they even bother with SVN improvement? It should be globally deprecated, it is just a subset of a modern VCS anyway. It doesn’t do enough well to warrant any effort. It’s not even needed to save lazy people from having to move their repo since every modern VCS has an easy way to import SVN repos.

    Just let it die already.