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.

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.

Isaac Jones 2004-04-12