D7830: revlog: reorder a conditionnal about revlogio

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Jan 11 12:03:00 EST 2020


marmoute created this revision.
Herald added a reviewer: indygreg.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  if we are using REVLOGV0, we will not use a rust based index. This small line
  movement make it clearer.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7830

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -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):



To: marmoute, indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list