[PATCH 1 of 2] localrepo: document format.maxchainlen

Gregory Szorc gregory.szorc at gmail.com
Mon Dec 21 08:15:55 UTC 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1450679264 28800
#      Sun Dec 20 22:27:44 2015 -0800
# Node ID f020dc8028046ac0b433c1e8f11bfc3781cdd8d3
# Parent  5df74b2f296df7f44a08106df4f9dd97a5aa726a
localrepo: document format.maxchainlen

This option has existed for several months. An upcoming patch will set
a default value for maxchainlen. It is probably a good idea to document
it so people know they can change it.

diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
--- a/mercurial/help/config.txt
+++ b/mercurial/help/config.txt
@@ -693,16 +693,30 @@ Example for ``~/.hgrc``::
 ``dotencode``
     Enable or disable the "dotencode" repository format which enhances
     the "fncache" repository format (which has to be enabled to use
     dotencode) to avoid issues with filenames starting with ._ on
     Mac OS X and spaces on Windows. Enabled by default. Disabling this
     option ensures that the on-disk format of newly created
     repositories will be compatible with Mercurial before version 1.7.
 
+``maxchainlen``
+    The maximum length of delta chains in revlogs as the number of entries.
+
+    A delta chain is a series of likely-compressed binary diffs that must be
+    read, decompressed, and applied to reconstruct the full content of a
+    revision. Longer chains result in smaller storage requirements but longer
+    read times. Shorter chains result in larger storage requirements but
+    faster read times.
+
+    Setting this value establishes a ceiling on the number of entries /
+    binary diffs in a delta chain. Other limits on delta chain length
+    are also enforced and may cause delta chains to be smaller than this
+    limit.
+
 ``graph``
 ---------
 
 Web graph view configuration. This section let you change graph
 elements display properties by branches, for instance to make the
 ``default`` branch stand out.
 
 Each line has the following format::
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -343,17 +343,16 @@ class localrepository(object):
 
     def _applyopenerreqs(self):
         self.svfs.options = dict((r, 1) for r in self.requirements
                                            if r in self.openerreqs)
         # experimental config: format.chunkcachesize
         chunkcachesize = self.ui.configint('format', 'chunkcachesize')
         if chunkcachesize is not None:
             self.svfs.options['chunkcachesize'] = chunkcachesize
-        # experimental config: format.maxchainlen
         maxchainlen = self.ui.configint('format', 'maxchainlen')
         if maxchainlen is not None:
             self.svfs.options['maxchainlen'] = maxchainlen
         # experimental config: format.manifestcachesize
         manifestcachesize = self.ui.configint('format', 'manifestcachesize')
         if manifestcachesize is not None:
             self.svfs.options['manifestcachesize'] = manifestcachesize
         # experimental config: format.aggressivemergedeltas


More information about the Mercurial-devel mailing list