Next: GNU General Public License Up: Darcs 0.9.23 David's advanced Previous: Theory of patches Contents

#
Repository format

A repository consists of a working directory, which has within it a directory called `_darcs`. There must also be subdirectories within `_darcs` named `current` and `patches`. The `current` directory contains the version of the tree which has been recorded, while `patches` contains the actual patches which are in the repository.

WARNING! Viewing files in current is perfectly acceptable, but if you view them with an editor (e.g. vi or emacs), that editor may create temporary files in the `_darcs/current` dirctory, 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 repo. 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 repo, that repo 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 interperetation 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 4.

Next: GNU General Public License Up: Darcs 0.9.23 David's advanced Previous: Theory of patches Contents