Darcs

Monday 1 November 2004This is nearly 20 years old. Be careful.

Darcs is a source code control system, but with a different feel from most. Where most systems (CVS, Subversion, Perforce, ClearCase, Arch, and so on) use client/server topologies, Darcs is purely peer-to-peer. With Darcs, every working tree is a repository, on an equal footing with every other repository. And connectivity between repositories is as easy and as varied as accessing files: you can use the file system, FTP, a web server, or even email, it doesn’t matter. Changes flow from one repository to another via the “push”, “pull”, or “send” commands. There is no central authority.

I’ve recently started using Darcs for personal projects, and it fits that need admirably. I don’t have to run a server, I don’t have to checkout before I can make changes, and I can set up repositories on other computers as backups. I can even create a repository on a thumb drive!

I don’t how well Darcs will scale up to large projects, or many developers, but for my personal use, it’s perfect.

Comments

[gravatar]
I don't know a lot about Arch, but I thought it was quite similar. As far as I know, there's no requirement for a central server... (?)
[gravatar]
I stand corrected. I had misunderstood Arch, but have been reading more, and it does seem very similar in architecture to darcs. Thanks.
[gravatar]
Code Co-op is also a distributed version control system. I used it five or six years ago when it was on version one (it's at 4.5 now) and my partner and I would email the changesets it generated to each other. It was a pretty good solution to the problem of not being able to run a CVS server.
[gravatar]
I'm personally a fan of another distributed source control system: Monotone. It uses it's own "netsync" protocol for synchronizing databases between two peers. You can run a dedicated netsync server if you want, but the entire tree is still synced to clients. It's definitely nice having access to the entire source history on my laptop even when I don't have a WiFi connection.
[gravatar]
I'm surprised that you imply that you need a server for Subversion - you don't. Subversion quite happily supports repositories accessed via a file: URL. I'm using a Subversion repository on a USB memory key for my personal prohects. I plug it into a PC, do svn checkout, work, svn commit, and everything is back on my repository. If I forget to commit, I can simply treat 2 PCs as 2 separate changes, and merge (I assume this would work fine, although I haven't needed to try it yet). It's a very nice environment. (And I could put the SVN binaries on the key as well, if I wanted a completely portable setup...)
[gravatar]
Your entry makes it sounds like darcs has to work in a distributed fashion, which isn't true. You can still set up a central server and have several people with the ability to 'push' changes there. There is an example in the 'best practices' section of the manual. (Arch is the same way: It's distributed, but you can still work with a central server if you'd like to).
[gravatar]
True, you can set it up this way, but it doesn't change the fact that everybody's working tree is a full repository. Your topology isn't so much client/server as it is a hub and spoke replication model, with a server at the hub, and all the "clients" at the spokes.

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.