|Developer(s)||Eric Kow (and others)|
|Initial release||March 3, 2003|
|Stable release||2.8.4 / February 7, 2013|
|Operating system||Unix, GNU/Linux, BSD, Apple Mac OS X, MS Windows|
Darcs is a distributed revision 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, HTTP, 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.
On the filesystem, 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:
- line changes
- file and directory creation and deletion
- file and directory moving
- word substitution (typically used in code refactoring, for instance rename all occurrences of ‘foo’ to ‘bar’ in a given file)
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.
Darcs evolved out of David Roundy's efforts to design a new patch format for GNU arch in June 2002. These discussions didn't lead to any code being committed to Arch, but did lead to his theory of patches. After writing an initial version of Darcs in C++, the Haskell version was written in Autumn 2002 and released to the public in April 2003. Darcs 2.0 as released in April 2008 and introduced a more robust repository format and a new patch semantics called darcs-2, aimed at minimizing exponential merge issues. The current line of development contains many optimizations and new features, maintaining the same repository format.
Darcs has been criticized on the grounds of performance. The worst of these issues was the Darcs 1.x merge algorithm that, in the worst case, could do exponential work to merge some conflicts. Although the issue was not completely corrected in Darcs 2, exponential merges have been minimized. Bugs still remain in which the merging of recursive conflicts fails.
See also 
- "Changelog", Darcs
- Roundy 2005, p. 2: ‘One of the problems I had with the initial C++ darcs was that I had no unit testing code. Within two weeks of the first darcs record, I started using QuickCheck to test the patch functions, and the same day I fixed a bug that was discovered by QuickCheck. QuickCheck makes it very easy to define properties that functions must have, which are then tested with randomly generated data.’
- Roundy, David (2008‐10‐21), "changes the acronym's meaning", Darcs (Commit), Joyful.
- "Two", Darcs.
- Marlow, Simon (March 7, 2007), "Current status of Darcs", Darcs users (mailing list), OSUOSL.
- Fendt, Robert (January 9, 2009), "DVCS Round-Up: One System to Rule Them All?", Developer Network 1, Linux Foundation.
- "ConflictsFAQ", Wiki, Darcs.
- "Issue 1520 Irrefutable pattern failed for pattern Data.Maybe.Just a2", Bug Tracker, Darcs.
|Wikibooks has a book on the topic of: Understanding Darcs|
- Official website
- Manual, Darcs.
- wiki, Darcs.
- Roundy, David (2006), "Formalism" (PDF), FOSDEM (talk), Darcs, archived from the original on
- Roundy, David (Nov 23, 2004), Stosberg, Mark, ed., Darcs’ origins and ideas (interview), OS dir.
- Darcs Web, AR: Blitiri. Tool to serve darcs repositories via [HTTP]
- Lynagh, Ian (October 30, 2006), An Algebra of Patches (PDF), LI: Earth.
- "What makes Camp and Darcs unique?" (video), Camp (presentation), Haskell.
- Patch-Tag: Project Hosting for Darcs.
- Darcs Den: Project Hosting for Darcs.