changeset 51032:774c00348f9f

revlog: skip opener option to pass chunk_cache_size value 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:02:29 +0200
parents 133f5a54ed9d
children cd16b6895f62
files mercurial/localrepo.py mercurial/revlog.py
diffstat 2 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Oct 10 10:02:21 2023 +0200
+++ b/mercurial/localrepo.py	Tue Oct 10 10:02:29 2023 +0200
@@ -1087,7 +1087,7 @@
     # experimental config: format.chunkcachesize
     chunkcachesize = ui.configint(b'format', b'chunkcachesize')
     if chunkcachesize is not None:
-        options[b'chunkcachesize'] = chunkcachesize
+        data_config.chunk_cache_size = chunkcachesize
 
     deltabothparents = ui.configbool(
         b'storage', b'revlog.optimize-delta-parent-choice'
--- a/mercurial/revlog.py	Tue Oct 10 10:02:21 2023 +0200
+++ b/mercurial/revlog.py	Tue Oct 10 10:02:29 2023 +0200
@@ -628,8 +628,6 @@
         else:
             new_header = REVLOG_DEFAULT_VERSION
 
-        if b'chunkcachesize' in opts:
-            self.data_config.chunk_cache_size = opts[b'chunkcachesize']
         if b'maxchainlen' in opts:
             self.delta_config.max_chain_len = opts[b'maxchainlen']
         if b'deltabothparents' in opts: