Difference between revisions of "Darcs"
Jump to navigation
Jump to search
(→Operations: std. tense, terminology) |
|||
Line 18: | Line 18: | ||
*<tt>darcs whatsnew -l</tt>: show changes and unknown items |
*<tt>darcs whatsnew -l</tt>: show changes and unknown items |
||
− | *'''creating a item''': |
+ | *'''creating a item''': add item to the unknown items. |
− | *<tt>darcs add</tt>: |
+ | *<tt>darcs add</tt>: convert the unknown item into a change to add the item and its contents |
− | *<tt>darcs remove</tt>: |
+ | *<tt>darcs remove</tt>: add a change to remove the item but keep it as an unknown item. |
=== Changes === |
=== Changes === |
||
Line 28: | Line 28: | ||
*<tt>darcs whatsnew</tt>: show unrecorded changes |
*<tt>darcs whatsnew</tt>: show unrecorded changes |
||
− | *'''removing an item''': |
+ | *'''removing an item''': add a change to remove the item |
− | *'''editing a file''' |
+ | *'''editing a file''' add a change for the edit |
− | *<tt>darcs mv</tt>: |
+ | *<tt>darcs mv</tt>: add a change to move an item |
− | *<tt>darcs replace</tt>: |
+ | *<tt>darcs replace</tt>: add a change to replace text in a file |
− | *<tt>darcs record</tt>: record changes |
+ | *<tt>darcs record</tt>: record changes to add a patch |
=== Patches === |
=== Patches === |
||
Line 48: | Line 48: | ||
*<tt>darcs apply</tt>: add patches from an email bundle |
*<tt>darcs apply</tt>: add patches from an email bundle |
||
− | *<tt>darcs rollback</tt>: |
+ | *<tt>darcs rollback</tt>: add a patch that is the inverse of an existing patch |
− | *<tt>darcs obliterate</tt>: |
+ | *<tt>darcs obliterate</tt>: remove a patch. ''Warning: if the patch doesn't exist elsewhere, you will lose that work.'' |
=== Repositories === |
=== Repositories === |
||
Line 56: | Line 56: | ||
*<tt>darcs initialize</tt>: create a new empty repository |
*<tt>darcs initialize</tt>: create a new empty repository |
||
− | *<tt>darcs get</tt>: create a new empty repository and |
+ | *<tt>darcs get</tt>: create a new empty repository and add patches from another repository |
== External link == |
== External link == |
Revision as of 03:21, 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: add item to the unknown items.
- darcs add: convert the unknown item into a change to add the item and its contents
- darcs remove: add a change to remove the item 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
Patches
- darcs changes: show 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.
Repositories
- darcs initialize: create a new empty repository
- darcs get: create a new empty repository and add patches from another repository