Patchwork D7830: revlog: reorder a conditionnal about revlogio

login
register
mail settings
Submitter phabricator
Date Jan. 13, 2020, 3:06 p.m.
Message ID <1089a7956b7316eae10cc065543c23e6@localhost.localdomain>
Download mbox | patch
Permalink /patch/44276/
State Not Applicable
Headers show

Comments

phabricator - Jan. 13, 2020, 3:06 p.m.
marmoute updated this revision to Diff 19168.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7830?vs=19165&id=19168

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7830/new/

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




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

Patch

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):