diff mercurial/revlogutils/deltas.py @ 41824: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 189e06b2d719
children 566daffc607d
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py	Wed Feb 27 10:49:25 2019 +0100
+++ b/mercurial/revlogutils/deltas.py	Wed Feb 27 12:40:18 2019 +0100
@@ -916,7 +916,7 @@
                     and currentbase != base
                     and self.revlog.length(currentbase) == 0):
                 currentbase = self.revlog.deltaparent(currentbase)
-            if currentbase == base:
+            if self.revlog._lazydelta and currentbase == base:
                 delta = revinfo.cachedelta[1]
         if delta is None:
             delta = self._builddeltadiff(base, revinfo, fh)