comparison mercurial/revlog.py @ 44054:612225e994ff

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 06 Jan 2020 08:08:06 +0100
parents de5d34ca01bd
children b9e174d4ed11
comparison
equal deleted inserted replaced
44053:894c91c2e363 44054:612225e994ff
590 self._sparserevlog = False 590 self._sparserevlog = False
591 591
592 self._storedeltachains = True 592 self._storedeltachains = True
593 593
594 self._io = revlogio() 594 self._io = revlogio()
595 if rustrevlog is not None and self.opener.options.get(b'rust.index'):
596 self._io = rustrevlogio()
597 if self.version == REVLOGV0: 595 if self.version == REVLOGV0:
598 self._io = revlogoldio() 596 self._io = revlogoldio()
597 elif rustrevlog is not None and self.opener.options.get(b'rust.index'):
598 self._io = rustrevlogio()
599 try: 599 try:
600 d = self._io.parseindex(indexdata, self._inline) 600 d = self._io.parseindex(indexdata, self._inline)
601 except (ValueError, IndexError): 601 except (ValueError, IndexError):
602 raise error.RevlogError( 602 raise error.RevlogError(
603 _(b"index %s is corrupted") % self.indexfile 603 _(b"index %s is corrupted") % self.indexfile