| Darcs | |
|---|---|
![]() | |
| Original author | David Roundy |
| Developers | Guillaume Hoffmann, et al. |
| Initial release | March 3, 2003; 22 years ago (2003-03-03)[1] |
| Stable release | |
| Written in | Haskell |
| Operating system | Unix,Linux,BSD,ApplemacOS,MSWindows |
| Type | Version control |
| License | GPL-2.0-or-later |
| Website | darcs |
| Repository | |
Darcs is adistributed version control system created byDavid 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 viaSSH,HTTP, or email, and an unusually interactive interface. The developers also emphasize the use of advanced software tools for verifying correctness: the expressivetype system of thefunctional programming languageHaskell enforces some properties, and randomized testing viaQuickCheck verifies many others.[3] The name is arecursive acronym forDarcs Advanced Revision Control System.[4]
Darcs treats patches asfirst-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 apartially 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 likeGit orMercurial 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 patchB depends on another patchA ifA provides the content thatB 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.
Since version 2.10, Darcs uses patience diff[citation needed] by default.
Darcs evolved out of David Roundy's efforts to design a new patch format forGNU arch in June 2002. These discussions didn't lead to any code being committed to Arch, but did lead to the conception of the theory of patches. After writing an initial version of Darcs inC++, theHaskell version was written in Autumn 2002 and released to the public in April 2003. Darcs 2.0 was released in April 2008 and introduced a more robust repository format, as well as a new patch semantic called "darcs-2", aimed at minimizing exponentialmerge conflicts.[5] The current development strategy focuses on implementing optimizations and adding new features, while maintaining the same repository format.
Darcs has been criticized for its performance issues.[6][7] This includes challenges related to the merge algorithms of Darcs 1.x, which showed exponential work to merge certain conflicts. Although not resolved completely in the subsequent versions of Darcs,[8] the frequency of exponential merges did show noticeable reductions.
Bugs still remain in which merging of recursive conflicts fails.[9]
{{citation}}: CS1 maint: work parameter with ISBN (link)