From HaskellWiki
Jump to navigation Jump to search

darcs is a peer-to-peer revision control system, written in Haskell. It is the standard RCS of the Haskell community.

Understanding darcs

You can think of a darcs repository as containing these things:

  • Patches: a patch is a collection of changes that forms the unit of synchronisation with other repositories
  • Unrecorded changes to known files and directories
  • Unmanaged items (files and directories)
  • Boring items: anything with a name matched in _darcs/prefs/boring
  • The unrevert cache of changes

Note that some projects are keen on making sure all derivative items are "boring" rather than merely unknown items that will show up with darcs wh -l. Other projects less so.


Unmanaged items

  • darcs whatsnew -l: show changes to managed files, and unmanaged items
  • creating a item: add item to the unmanaged items.
  • darcs add: convert the unmanaged item into a change to create the item and its contents
  • darcs remove: add a change which empties the item and deletes it, but keep it as an unmanaged item.


  • darcs whatsnew: show unrecorded changes
  • removing a managed item: add a change to remove the item
  • editing a managed file: add a change for the edit
  • darcs mv: add a change to move an item
  • darcs replace: add a change to replace text in a file
  • darcs record: record changes to add a patch
  • darcs unrecord: remove a patch by turning back it into unrecorded changes
  • darcs amend-record: replace a patch with one with added changes
  • darcs revert: remove changes and put them in the unrevert cache. Warning: you will lose the previous contents of the unrevert cache.
  • darcs unrevert: take changes out of the unrevert cache and add them to the unrecorded changes.


  • darcs changes: show patches
  • darcs send --output=FILE: make an email bundle from patches
  • darcs send --to=ADDRESS: send an email bundle from patches
  • darcs pull: add patches from another repository
  • darcs push: add patches from this repository to another repository
  • darcs apply: add patches from an email bundle
  • darcs rollback: add a patch that is the inverse of an existing patch
  • darcs obliterate: remove a patch. Warning: if the patch doesn't exist elsewhere, you will lose that work.
  • darcs tag: add a tag for the current set of patches


  • darcs initialize: create a new empty repository
  • darcs get: create a new empty repository and add patches from another repository

External links