Difference between revisions of "Darcs"

From HaskellWiki
Jump to navigation Jump to search
(Adding other Darcs-related talks, slides. Mentioning slides ``The Myth and Reality of using Haskell in the Real World'' separately because of its more general Haskell-related topic)
m ((1) Assymmetric (6-9-shaped) quotation marks (2) Typographic corrections)
Line 75: Line 75:
 
* [http://en.wikibooks.org/wiki/Understanding_darcs Understanding darcs] - an illustrated wikibook about darcs and patch theory
 
* [http://en.wikibooks.org/wiki/Understanding_darcs Understanding darcs] - an illustrated wikibook about darcs and patch theory
 
* Implementation details of <code>darcs</code> show motivating examples for [[generalised algebraic datatype]]s. The motivations are described in David Roundy's slides [http://darcs.net/fosdem_talk/talk.pdf Implementing the darcs patch formalism and verifying it] (see p. 11, 13--14.). The talk mentions also the notions of [[phantom type]], and [[existential type]], and [[type witness]] (see p. 15).
 
* Implementation details of <code>darcs</code> show motivating examples for [[generalised algebraic datatype]]s. The motivations are described in David Roundy's slides [http://darcs.net/fosdem_talk/talk.pdf Implementing the darcs patch formalism and verifying it] (see p. 11, 13--14.). The talk mentions also the notions of [[phantom type]], and [[existential type]], and [[type witness]] (see p. 15).
* See [http://darcs.net/DarcsWiki/Talks also other talks] on darcs. One of them ([http://darcs.net/cufp_2005.pdf The Myth and Reality of using Haskell in the 'Real World]) discusses a more general topic: usefullness of Haskell (in real life) and in general, the power (lazy) functional programming.
+
* See [http://darcs.net/DarcsWiki/Talks also other talks] on darcs. One of them ([http://darcs.net/cufp_2005.pdf The Myth and Reality of using Haskell in the ‘Real World’]) discusses a more general topic: usefullness of Haskell (in real life) and in general, the power of (lazy) functional programming.
   
   

Revision as of 22:41, 22 August 2006

darcs is a peer-to-peer revision control system, written in Haskell.

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
  • Unknown items (files and directories)
  • Boring items: anything with a name matched in _darcs/prefs/boring

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.

Operations

Unknown items

  • darcs whatsnew -l: show changes and unknown items
  • creating a item: add item to the unknown items.
  • darcs add: convert the unknown item into a change to create the item and its contents
  • darcs remove: add a change to empty the item and delete it but keep it as an unknown item.

Changes

  • darcs whatsnew: show unrecorded changes
  • removing an item: add a change to remove the item
  • editing a 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

Patches

  • 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

Repositories

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

External link