Darcs
   HOME

TheInfoList



OR:

Darcs is a
distributed version control In software development, distributed version control (also known as distributed revision control) is a form of version control in which the complete codebase, including its full history, is mirrored on every developer's computer. Compared to centr ...
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 HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
, or email, and an unusually interactive interface. The developers also emphasize the use of advanced software tools for verifying correctness: the expressive
type system In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a ''type'' (for example, integer, floating point, string) to every '' term'' (a word, phrase, or other set of symbols). Usu ...
of the
functional programming language In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that map ...
Haskell Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
enforces some properties, and randomized testing via
QuickCheck QuickCheck is a software library, a combinator library, originally written in the programming language Haskell, designed to assist in software testing by generating test cases for test suites – an approach known as property testing. Softwar ...
verifies many others. The name is a
recursive acronym A recursive acronym is an acronym that refers to itself, and appears most frequently in computer programming. The term was first used in print in 1979 in Douglas Hofstadter's book '' Gödel, Escher, Bach: An Eternal Golden Braid'', in which Hofs ...
for Darcs Advanced Revision Control System.


Model

Darcs treats patches as
first-class citizen In a given programming language design, a first-class citizen is an entity which supports all the operations generally available to other entities. These operations typically include being passed as an argument, returned from a function, and ass ...
s. 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 mathematics, especially order theory, a partial order on a Set (mathematics), set is an arrangement such that, for certain pairs of elements, one precedes the other. The word ''partial'' is used to indicate that not every pair of elements need ...
. 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 Git () is a distributed version control system that tracks versions of files. It is often used to control source code by programmers who are developing software collaboratively. Design goals of Git include speed, data integrity, and suppor ...
or
Mercurial Mercurial is a distributed revision control tool for software developers. It is supported on Microsoft Windows, Linux, and other Unix-like systems, such as FreeBSD and macOS. Mercurial's major design goals include high performance and scalabi ...
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: * 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. Since version 2.10, Darcs uses patience diff by default.


History

Darcs evolved out of David Roundy's efforts to design a new patch format for
GNU arch GNU arch software is a distributed revision control system that is part of the GNU Project and licensed under the GNU General Public License. It is used to keep track of the changes made to a source tree and to help programmers combine and other ...
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 in C++, the
Haskell Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
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 exponential merge conflicts. The current development strategy focuses on implementing optimizations and adding new features, while maintaining the same repository format.


Shortcomings

Darcs has been criticized for its performance issues. 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, the frequency of exponential merges did show noticeable reductions. Bugs still remain in which merging of recursive conflicts fails..


See also

* Comparison of version control software


References

*


External links

* {{Haskell programming Cross-platform free software Distributed version control systems Free software programmed in Haskell Free version control software