Difference between revisions of "Darcs"

From HaskellWiki
Jump to navigation Jump to search
m (+cat)
(some quick doc)
Line 1: Line 1:
'''darcs''' is a revision control system, written in Haskell.
+
'''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 <tt>_darcs/prefs/boring</tt>
  +
  +
== Operations ==
  +
  +
=== Unknown items ===
  +
  +
*'''creating a item''': these will be "unknown".
  +
  +
*<tt>darcs add</tt>: turns an unknown item into an change
  +
  +
*<tt>darcs remove</tt>: creates an change to remove the item. The item is not deleted, but becomes unknown.
  +
  +
*<tt>darcs whatsnew -l</tt>: show changes and unknown items
  +
  +
=== Changes ===
  +
  +
*'''removing an item''': also creates a change to remove the item
  +
  +
*'''editing a file''' adds to the edit to the changes
  +
  +
*<tt>darcs whatsnew</tt>: show changes
  +
  +
*<tt>darcs mv</tt>: create a change to move an item
  +
  +
*<tt>darcs replace</tt>: create a change to replace text in a file
  +
  +
*<tt>darcs record</tt>: record changes as a patch
  +
  +
=== Patches ===
  +
  +
*<tt>darcs pull</tt>: pull patches from another repository
  +
  +
*<tt>darcs push</tt>: push patches to another repository
  +
  +
*<tt>darcs apply</tt>: get patches from an email bundle
  +
  +
== External link ==
   
 
* [http://darcs.net/ darcs]
 
* [http://darcs.net/ darcs]

Revision as of 00:38, 21 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

Operations

Unknown items

  • creating a item: these will be "unknown".
  • darcs add: turns an unknown item into an change
  • darcs remove: creates an change to remove the item. The item is not deleted, but becomes unknown.
  • darcs whatsnew -l: show changes and unknown items

Changes

  • removing an item: also creates a change to remove the item
  • editing a file adds to the edit to the changes
  • darcs whatsnew: show changes
  • darcs mv: create a change to move an item
  • darcs replace: create a change to replace text in a file
  • darcs record: record changes as a patch

Patches

  • darcs pull: pull patches from another repository
  • darcs push: push patches to another repository
  • darcs apply: get patches from an email bundle

External link