Darcs: Difference between revisions

From HaskellWiki
Line 15: Line 15:


=== Unknown items ===
=== Unknown items ===
*<tt>darcs whatsnew -l</tt>: show changes and unknown items


*'''creating a item''': these will be "unknown".
*'''creating a item''': these will be "unknown".
Line 22: Line 24:
*<tt>darcs remove</tt>: creates an change to remove the item but keeps it as an unknown item.
*<tt>darcs remove</tt>: creates an change to remove the item but keeps it as an unknown item.


*<tt>darcs whatsnew -l</tt>: show changes and unknown items
=== Changes ===


=== Changes ===
*<tt>darcs whatsnew</tt>: show changes


*'''removing an item''': creates a change to remove the item
*'''removing an item''': creates a change to remove the item


*'''editing a file''' adds to the edit to the changes
*'''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 mv</tt>: create a change to move an item
Line 39: Line 39:


=== Patches ===
=== Patches ===
*<tt>darcs changes</tt>: show patches


*<tt>darcs pull</tt>: get patches from another repository
*<tt>darcs pull</tt>: get patches from another repository

Revision as of 01:05, 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

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: these will be "unknown".
  • darcs add: turns an unknown item into a change
  • darcs remove: creates an change to remove the item but keeps it as an unknown item.

Changes

  • darcs whatsnew: show changes
  • removing an item: creates a change to remove the item
  • editing a file adds to the edit to the 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 changes: show patches
  • darcs pull: get patches from another repository
  • darcs push: put patches in another repository
  • darcs apply: get patches from an email bundle
  • darcs rollback: adds a patch that is the inverse of an existing patch
  • darcs obliterate: removes a patch. Warning: if the patch doesn't exist elsewhere, you will lose that work.

Repositories

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

External link