Note:
This page is primarily intended for developers of Mercurial.
Dirstate
Internals of the directory state cache.
Contents
1. Introduction
Mercurial tracks various information about the working directory (the dirstate):
- what revision(s) are currently checked out
- what files have been copied or renamed
- what files are controlled by Mercurial
For each file that Mercurial controls, we record the following information:
- its size
- its mode
- its modification time
- its "state"
The states that are tracked are:
- n - normal
- a - added
- r - removed
- m - 3-way merged
With this information, we can quickly determine what files in the working directory have changed.
Here's a real example of a dirstate of a clone of the Mercurial repository itself: