diff mercurial/revlog.py @ 41819:688fc33e105d

storage: introduce a `revlog.reuse-external-delta` config This option goes a bit further and provides a way to get the same behavior as the `re-delta-all` optimisation from `hg debugupgraderepo`. The effect of the option is a bit hard to test as we do not have multiple diff algorithm at hand. However, we at least make sure the code path run.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 27 Feb 2019 12:40:18 +0100
parents 37ead13fb3d4
children afd37ed731f1
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Feb 27 10:49:25 2019 +0100
+++ b/mercurial/revlog.py	Wed Feb 27 12:40:18 2019 +0100
@@ -410,7 +410,10 @@
             self._maxchainlen = opts['maxchainlen']
         if 'deltabothparents' in opts:
             self._deltabothparents = opts['deltabothparents']
-        self._lazydeltabase = bool(opts.get('lazydeltabase', False))
+        self._lazydelta = bool(opts.get('lazydelta', True))
+        self._lazydeltabase = False
+        if self._lazydelta:
+            self._lazydeltabase = bool(opts.get('lazydeltabase', False))
         if 'compengine' in opts:
             self._compengine = opts['compengine']
         if 'maxdeltachainspan' in opts: