User can use several packages to work with Darcs. The darcsum package (available from author's site) implements native support for Darcs, reflecting it ideology. Besides this, there are also Darcs support modules for VC (described in Work with VC) and for DVC (described in Work DVC) packages.
In this part I'll describe the darcsum package. Package implements user interface, similar to interface of PCL-CVS package. There are also some distinctions in work due differences between CVS and Darcs.
To install package you need download it from site, and put it to place, where Emacs can find it. And after this, you need to add following string to initialization file:
(require 'darcsum)
All work with package is performed in the *darcs*
buffer, that is created by M-x
darcsum-whatsnew
command. On the picture below you can see example of work with this
buffer. Many commands, available in this buffer, is coincide with commands of PCL-CVS
package. Commands could be performed on current change (at point where cursor is
located), or on all marked changes1. You can mark file (or remove mark from marked
file) with m
key, which call the darcsum-toggle-mark
function. User can move between
changes with arrow keys, or with darcsum-next-line
(n
) and darcsum-previous-line
(p
)
functions.
Usually user work using following scenario: after obtaining of changes, you preview
concrete changes, mark needed, and then perform commands on them. You can view changes
with darcsum-toggle
command, that bound to RET
key.
You can commit selected changes in repository with the darcsum-record
command (c
or R
keys). When you execute this command, a new buffer will created, where you can enter
short (first line of buffer) and long (all other strings) description for this change.
After you enter this information, you can confirm changes with C-c C-c
key binding.
You can remove changes from *darcs*
buffer with darcsum-remove
command (r
key), or move
them to another darcsum buffer with darcsum-move
command (M
key). You can also undo
changes with darcsum-revert
command, that bound to U
key.
There are several commands, that could be used to view and apply changes: darcsum-diff
(=
key) show result of diff
command, darcsum-ediff
(e
key) show changes with
Ediff, and darcsum-ediff-merge
(E
) allow to perform three-way merge of changes with Ediff.
To update buffer with changes, you can use darcsum-redo
function, that will execute darcs
whatsnew
command and display changes in buffer. To finish work with package, you can use
darcsum-quit
function, bound to q
key.
You can customize package using standard functions of Emacs. Simply run M-x
customize-group darcsum
, and you can see all settings. You can specify location of darcs
executable, and faces, that are used to display data in *darcs*
buffer.
You can also make customization using the darcsum-mode-hook
, that will called when
darcsum-mode
will set for buffer.
1. Darcs can operate not only on changed files, but also on specific change, allow to do partial commit of change.
Last change: 05.03.2013 16:54