Developer(s) | Guillaume Hoffmann (and others) |
---|---|
Initial release | March 3, 2003 |
Stable release |
2.12.1 / September 5, 2016
|
Repository | hub |
Written in | Haskell |
Operating system | Unix, Linux, BSD, Apple OS X, MS Windows |
Type | Version control |
License | GNU GPL |
Website | darcs |
Darcs is a distributed version control system created by David Roundy. Key features include the ability to choose which changes to accept from other repositories, interaction with either other local (on-disk) repositories or remote repositories via SSH, , or email, and an unusually interactive interface. The developers also emphasize the use of advanced software tools for verifying correctness: the expressive type system of the functional programming language Haskell enforces some properties, and randomized testing via QuickCheck verifies many others. The name is a recursive acronym for Darcs Advanced Revision Control System.
Darcs treats patches as first-class citizens. For the user, a repository can be seen as a set of patches, where each patch is not necessarily ordered with respect to other patches, i.e. the set of patches is only a partially ordered set. In many cases patches can be independently transmitted between various repositories.
Many branching, merging, and cherry-picking operations that would require additional commands with snapshot-based systems like Git or Mercurial can be directly done with Darcs with the usual "pull" and "push" commands. In terms of user interface, this means that Darcs has fewer commands. These commands are more interactive: one can choose more precisely which patches they want to exchange with remote repositories.
The patches of a repository are linearly ordered. Darcs automatically calculates whether patches can be reordered (an operation called commutation), and how to do it. These calculations implement a so-called "patch theory".
A Darcs patch can contain changes of the following kinds:
The notion of dependency between patches is defined syntactically. Intuitively, a patch B depends on another patch A if A provides the content that B modifies. This means that patches that modify different parts of the code are considered, by default, independent. To address cases when this is not desirable, Darcs enables the user to specify explicit dependencies between patches.