# HG changeset patch # User Pierre-Yves David # Date 1696925030 -7200 # Node ID 027bc364524b3c2aab304841fd8c6ee9abe45425 # Parent 683b96c416d8a150655d2acb9831858da882b225 revlog: skip opener options to pass mmap_index_threshold value We can directly set the option in the config object now. diff -r 683b96c416d8 -r 027bc364524b mercurial/localrepo.py --- a/mercurial/localrepo.py Tue Oct 10 10:03:42 2023 +0200 +++ b/mercurial/localrepo.py Tue Oct 10 10:03:50 2023 +0200 @@ -1118,7 +1118,7 @@ mmapindexthreshold = ui.configbytes(b'experimental', b'mmapindexthreshold') if mmapindexthreshold is not None: - options[b'mmapindexthreshold'] = mmapindexthreshold + data_config.mmap_index_threshold = mmapindexthreshold withsparseread = ui.configbool(b'experimental', b'sparse-read') srdensitythres = float( diff -r 683b96c416d8 -r 027bc364524b mercurial/revlog.py --- a/mercurial/revlog.py Tue Oct 10 10:03:42 2023 +0200 +++ b/mercurial/revlog.py Tue Oct 10 10:03:50 2023 +0200 @@ -610,7 +610,6 @@ * force_nodemap: force the usage of a "development" version of the nodemap code """ - mmapindexthreshold = None opts = self.opener.options if b'changelogv2' in opts and self.revlog_kind == KIND_CHANGELOG: @@ -628,9 +627,9 @@ else: new_header = REVLOG_DEFAULT_VERSION - if self._mmaplargeindex and b'mmapindexthreshold' in opts: - mmapindexthreshold = opts[b'mmapindexthreshold'] - self.data_config.mmap_index_threshold = mmapindexthreshold + mmapindexthreshold = None + if self._mmaplargeindex: + mmapindexthreshold = self.data_config.mmap_index_threshold if b'sparse-revlog' in opts: self.delta_config.sparse_revlog = bool(opts[b'sparse-revlog']) if self.delta_config.sparse_revlog: