mercurial/revlog.py
changeset 44513 e7fff9c3cdac
parent 44501 87b327de772c
child 44515 6c906eaedd0d
--- a/mercurial/revlog.py	Tue Feb 18 18:32:55 2020 +0100
+++ b/mercurial/revlog.py	Tue Feb 18 15:19:11 2020 +0100
@@ -618,12 +618,19 @@
             and NodemapRevlogIO is not None
         )
 
+        use_rust_index = False
+        if rustrevlog is not None:
+            if self.nodemap_file is not None:
+                use_rust_index = True
+            else:
+                use_rust_index = self.opener.options.get(b'rust.index')
+
         self._io = revlogio()
         if self.version == REVLOGV0:
             self._io = revlogoldio()
         elif devel_nodemap:
             self._io = NodemapRevlogIO()
-        elif rustrevlog is not None and self.opener.options.get(b'rust.index'):
+        elif use_rust_index:
             self._io = rustrevlogio()
         try:
             d = self._io.parseindex(indexdata, self._inline)