# HG changeset patch # User Gregory Szorc # Date 2019-01-09 23:33:44 # Node ID d8fe67db5234d9ac32b18432f89839d75574fded # Parent 4f0ae5c64c1b7c3261e2633c0e009c4412bcb3df internals: minor rewriting of revlogs documentation In preparation for formalizing revlog version 2. Differential Revision: https://phab.mercurial-scm.org/D5558 diff --git a/mercurial/help/internals/revlogs.txt b/mercurial/help/internals/revlogs.txt --- a/mercurial/help/internals/revlogs.txt +++ b/mercurial/help/internals/revlogs.txt @@ -11,8 +11,8 @@ Metadata includes the hash of the revisi links to its *parent* entries. The collective metadata is referred to as the *index* and the revision data is the *data*. -Revision data is stored as a series of compressed deltas against previous -revisions. +Revision data is stored as a series of compressed deltas against +ancestor revisions. Revlogs are written in an append-only fashion. We never need to rewrite a file to insert nor do we need to remove data. Rolling back in-progress @@ -35,9 +35,6 @@ This integer is logically divided into 2 significant half of the integer is the format/version short. The other short holds feature flags that dictate behavior of the revlog. -Only 1 bit of the format/version short is currently used. Remaining -bits are reserved for future use. - The following values for the format/version short are defined: 0 @@ -53,15 +50,24 @@ 57005 (0xdead) beyond 32-bit header. The feature flags short consists of bit flags. Where 0 is the least -significant bit, the following bit offsets define flags: +significant bit. The bit flags vary by revlog version. + +Version 0 revlogs have no defined flags and the presence of a flag +is considered an error. + +Version 1 revlogs have the following flags at the specified bit offsets: 0 Store revision data inline. 1 Generaldelta encoding. -2-15 - Reserved for future use. +Version 2 revlogs have the following flags at the specified bit offsets: + +0 + Store revision data inline. +1 + Generaldelta encoding. The following header values are common: