Monday, October 13, 2008

First impressions of darcs

This week, I've been playing around with the relatively little known distributed version control system, darcs. (That stands for David's Advanced Revision Control System.)

Darcs is based on David Roundy's, its creator, theory of patches. Simply put, darcs' fundamental type is a difference between two trees, a patch.

Creating a simple repo was quick and painless with "darcs initialize". I recorded a few patches easily, and was feeling quite happy about the fast pace with which darcs went about its business. Then, I decided to review my work. Apparently, darcs has no concept of a revision number; every "commit" is just a patch. This makes selecting patches to review rather difficult since everything is relative to the current state of the repo. Perhaps this isn't a problem in practice, though, because advanced patch matching (with regular expressions) is provided. Another thing I disliked was the lack of history in merging between repos. Although it is simple to do, no evidence besides the author's name in the log indicates that the patch was pulled.

Obviously, this is just a first step into the exciting darcs world; I'll continue to use it for some of my projects, and report back later.


kowey said...

Hi! I am the editor of the Darcs Weekly News posting (on the darcs-users mailing list and my blog). May I link to your post in our next edition of DWN? Thanks!

(I occasionally like to search for darcs in Google blogsearch, which is how I found your post :-)

Also some comments: I tend to just use the patch name to search for patches, just grabbing a sufficiently unique snippet of the name (patch names tend to be different enough that this works well in practise). You can also identify patches uniquely by a patch-hash (see darcs changes --xml).

Also, you are right in that darcs does not treat merging as a special event. In principle you could set up a posthook to automatically write to a file (which you could tend version control).


Benjamin Peterson said...


Sure! I would be honored.

Thanks for you comments on patches. That's very helpful.

kowey said...

You are now featured in darcs weekly news #9. Thanks!

Kamyar Inanloo said...

The other shortcoming is dars has no standard web interface like mercurial and fossil. Also, darcs does not provide anything for Windows/IIS! I need something to install on IIS and use it as repositry server and web interface at the same time. I used loggerhead for bazaar easily. I also wrote a ISAPI extension for fossil. What about darcs?