EmacsWiki: Da Rcs (original) (raw)

Darcs (David’s Advanced Revision Control System) is yet another DVC (Distributed Version Control) system featuring both decentralization and ease of learning and use.

Darcs’s author is David Roundy and it is written in Haskell. It is GPLed and is known to work on GNU/linux, MacOS X, FreeBSD, and Microsoft Windows (both natively or through Cygwin) platforms. It is patch-based, using an interesting theory of patches which contributes to some of its still unique (but influential) features, although these don’t all map well onto support in Emacs. It is often considered the easiest DVCS to use, even for non-experts.

Project information

Home page and wiki: http://darcs.net/

Manual: http://darcs.net/manual/darcs.html

Emacs modes for Darcs (largely a circular reference which should be rationalized, but may be more up-to-date): http://darcs.net/RelatedSoftware/Emacs

Downloads: http://darcs.net/Binaries

You can contact Darcs people on #darcs at irc://irc.freenode.net (if the channel is too quiet, try at #emacs at irc://irc.freenode.net).

Darcs modes

VC-based

There are two VC implementations for Darcs available at

They seem to differ particularly in how they treat “revisions” for VC. The first one is available from MELPA, while the raison d’être of the latter is copyright assignment to the FSF, so it is the one to contribute to if you want to try to get support into Emacs. It probably works with Emacs as far back as version 21 and maybe still darcs1.

VC intrinsically still doesn’t support patch-based systems like Darcs properly (and changes to generalize it have been rejected).

Not VC-based

Conflict merging

Here’s some code for using ediff to merge conflicts based on the conflict markers

(defun darcs-resolve-conflict () (interactive) (darcs-convert-conflict-markers) (smerge-ediff))

(defun darcs-convert-conflict-markers () (goto-char (point-min)) (while (re-search-forward "^v v v v v v v\n\(\(?:.\n\)?\)=============\n\(\(?:.\n\)?\)[*]\{13\}\n\(\(?:.\n\)?\)^ ^ ^ ^ ^ ^ ^\n" nil t) (replace-match "<<<<<<< first\n\2||||||| initial\n\1=======\n\3>>>>>>> second")))


CategoryVersionControl