changeset 51036:83ce99f5e7f2

revlog: skip opener options to pass lazy_delta values We can directly set the option in the config object now.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 10 Oct 2023 10:03:01 +0200
parents 6ccb07b9eeeb
children d900f74456cc
files mercurial/localrepo.py mercurial/revlog.py
diffstat 2 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Oct 10 10:02:53 2023 +0200
+++ b/mercurial/localrepo.py	Tue Oct 10 10:03:01 2023 +0200
@@ -1107,10 +1107,10 @@
         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
+        if lazydeltabase is None:
+            lazydeltabase = not scmutil.gddeltaconfig(ui)
+    delta_config.lazy_delta = lazydelta
+    delta_config.lazy_delta_base = lazydeltabase
 
     chainspan = ui.configbytes(b'experimental', b'maxdeltachainspan')
     if 0 <= chainspan:
--- a/mercurial/revlog.py	Tue Oct 10 10:02:53 2023 +0200
+++ b/mercurial/revlog.py	Tue Oct 10 10:03:01 2023 +0200
@@ -630,10 +630,6 @@
 
         if b'maxchainlen' in opts:
             self.delta_config.max_chain_len = opts[b'maxchainlen']
-        if b'lazydelta' in opts:
-            self.delta_config.lazy_delta = bool(opts[b'lazydelta'])
-        if self._lazydelta and b'lazydeltabase' in opts:
-            self.delta_config.lazy_delta_base = opts[b'lazydeltabase']
         if b'compengine' in opts:
             self.feature_config.compression_engine = opts[b'compengine']
         comp_engine_opts = self.feature_config.compression_engine_options