A repository consists of a working directory, which has within it a
directory called _darcs
. There must also be a subdirectory within
_darcs
named patches
. The patches
directory contains
the actual patches which are in the repository. There must also be a
pristine tree, which may either be a directory containing a cache of
the version of the tree which has been recorded, or a stub, and may be
named either ``current'' or ``pristine''.
WARNING! Viewing files in the pristine cache is perfectly
acceptable, but if you view them with an editor (e.g. vi or Emacs), that
editor may create temporary files in the pristine tree
(_darcs/pristine/
or _darcs/current/
), which will temporarily
cause your repository to be inconsistent. So don't record any
patches while viewing files in _darcs/current with an editor! A better
plan would be to restrict yourself to viewing these files with a pager such
as more or less.
Also within _darcs
is the inventory
file, which lists all the
patches that are in the repository. Moreover, it also gives the order of the
representation of the patches as they are stored. Given a source of patches,
i.e. any other set of repositories which have between them all the patches
contained in a given repository, that repository can be reproduced based on only the
information in the inventory
file. Under those circumstances, the
order of the patches specified in the inventory
file would be
unimportant, as this order is only needed to provide context for the
interpretation of the stored patches in this repository.
There is a very special patch which may be stored in patches
which
is called `pending'. This patch describes any changes which have not yet
been recorded, and cannot be determined by a simple diff. For example, file
additions or renames are placed in pending until they are recorded.
Similarly, token replaces are stored in pending until they are recorded.
The _darcs
directory also contains a directory called
``prefs
'', which is described in Chapter .
darcs-stable 2007-06-16