diff mercurial/localrepo.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 f6eff9e4de80
children 90eddb679521
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Feb 27 10:49:25 2019 +0100
+++ b/mercurial/localrepo.py	Wed Feb 27 12:40:18 2019 +0100
@@ -752,10 +752,14 @@
                                      b'revlog.optimize-delta-parent-choice')
     options[b'deltabothparents'] = deltabothparents
 
-    lazydeltabase = ui.configbool(b'storage',
-                                  b'revlog.reuse-external-delta-parent')
+    lazydelta = ui.configbool(b'storage', b'revlog.reuse-external-delta')
+    lazydeltabase = False
+    if lazydelta:
+        lazydeltabase = ui.configbool(b'storage',
+                                      b'revlog.reuse-external-delta-parent')
     if lazydeltabase is None:
         lazydeltabase = not scmutil.gddeltaconfig(ui)
+    options[b'lazydelta'] = lazydelta
     options[b'lazydeltabase'] = lazydeltabase
 
     chainspan = ui.configbytes(b'experimental', b'maxdeltachainspan')