HomePhabricator

dirstate-v2: Introduce a docket file

Authored by SimonSapin.

Description

dirstate-v2: Introduce a docket file

.hg/dirstate now only contains some metadata to point to a separate data file
named .hg/dirstate.{}.d with a random hexadecimal identifier. For now every
update creates a new data file and removes the old one, but later we’ll
(usually) append to an existing file.

Separating into two files allows doing the "write to a temporary file then
atomically rename into destination" dance with only a small docket file,
without always rewriting a lot of data.

Differential Revision: https://phab.mercurial-scm.org/D11088

Details