mercurial/revlog.py
changeset 51039 027bc364524b
parent 51038 683b96c416d8
child 51040 8ed03f773eac
--- 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: