D5558: internals: minor rewriting of revlogs documentation

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Fri Jan 11 00:32:27 UTC 2019


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  In preparation for formalizing revlog version 2.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5558

AFFECTED FILES
  mercurial/help/internals/revlogs.txt

CHANGE DETAILS

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 @@
 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 @@
 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 @@
    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:
 



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list