revlog: reorder a conditionnal about revlogio
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 06 Jan 2020 08:08:06 +0100
changeset 44054 612225e994ff
parent 44053 894c91c2e363
child 44055 7f67f53492f7
revlog: reorder a conditionnal about revlogio if we are using REVLOGV0, we will not use a rust based index. This small line movement make it clearer. Differential Revision: https://phab.mercurial-scm.org/D7830
mercurial/revlog.py
--- a/mercurial/revlog.py	Fri Jan 10 15:47:39 2020 -0800
+++ b/mercurial/revlog.py	Mon Jan 06 08:08:06 2020 +0100
@@ -592,10 +592,10 @@
         self._storedeltachains = True
 
         self._io = revlogio()
-        if rustrevlog is not None and self.opener.options.get(b'rust.index'):
-            self._io = rustrevlogio()
         if self.version == REVLOGV0:
             self._io = revlogoldio()
+        elif rustrevlog is not None and self.opener.options.get(b'rust.index'):
+            self._io = rustrevlogio()
         try:
             d = self._io.parseindex(indexdata, self._inline)
         except (ValueError, IndexError):