Английская Википедия:Darcs

Материал из Онлайн справочника
Версия от 17:49, 24 февраля 2024; EducationBot (обсуждение | вклад) (Новая страница: «{{Английская Википедия/Панель перехода}} {{Infobox software | name = Darcs | logo = Darcs-logo.png | logo size = | logo alt = darcs logo | logo caption = | author = David Roundy | developer = Guillaume Hoffmann, et al. | released = {{start date and age|2003|3|3}}<ref name="darcs-changelog">{{cite web |title=Changelog for darcs |url=https://hackage.haskell.org/package/darcs/changelog |work=Hackage |access-date=2018-06-24...»)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)
Перейти к навигацииПерейти к поиску

Шаблон:Infobox software 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, 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.Шаблон:Sfn The name is a recursive acronym for Darcs Advanced Revision Control System.[1]

Model

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:

  • 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 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 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.[2] The current development strategy focuses on implementing optimizations and adding new features, while maintaining the same repository format.

Shortcomings

Darcs has been criticized on the grounds of performance.[3][4] One of the most notable challenges related to the merge algorithm in Darcs 1.x, which could do exponential work to merge some conflicts. Although it was not completely corrected in Darcs 2,[5] the frequency of exponential merges has been reduced. Bugs still remain in which merging of recursive conflicts fails.[6]

The revision control system Pijul solves those complexity problems by making conflicts and their resolutions first class citizens which can commute with other changes.

See also

Шаблон:Portal

References

Шаблон:Reflist Шаблон:Refbegin

Шаблон:Refend

External links

Шаблон:Wikibooks

Шаблон:Version control software Шаблон:Haskell programming