comparison mercurial/revlog.py @ 51426:def497c75351

rust: disable the RustIndex without persistent nodemap See rational inline.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 23 Feb 2024 03:45:07 +0100
parents a0d88b021a98
children 3cf9e52f5e27
comparison
equal deleted inserted replaced
51425:d361d7bfb7dc 51426:def497c75351
1676 and force_nodemap 1676 and force_nodemap
1677 and parse_index_v1_nodemap is not None 1677 and parse_index_v1_nodemap is not None
1678 ) 1678 )
1679 1679
1680 use_rust_index = False 1680 use_rust_index = False
1681 if rustrevlog is not None: 1681 if rustrevlog is not None and self._nodemap_file is not None:
1682 if self._nodemap_file is not None: 1682 # we would like to use the rust_index in all case, especially
1683 use_rust_index = True 1683 # because it is necessary for AncestorsIterator and LazyAncestors
1684 else: 1684 # since the 6.7 cycle.
1685 # Using the CIndex is not longer possible, as the 1685 #
1686 # `AncestorsIterator` and `LazyAncestors` classes now require 1686 # However, the performance impact of inconditionnaly building the
1687 # a Rust index for instantiation. 1687 # nodemap is currently a problem for non-persistent nodemap
1688 use_rust_index = True 1688 # repository.
1689 use_rust_index = True
1689 1690
1690 self._parse_index = parse_index_v1 1691 self._parse_index = parse_index_v1
1691 if self._format_version == REVLOGV0: 1692 if self._format_version == REVLOGV0:
1692 self._parse_index = revlogv0.parse_index_v0 1693 self._parse_index = revlogv0.parse_index_v0
1693 elif self._format_version == REVLOGV2: 1694 elif self._format_version == REVLOGV2: