diff -r 9d1a8829f959 -r 6be2a7ca4b1d mercurial/revlog.py --- a/mercurial/revlog.py Tue May 04 14:16:26 2021 +0200 +++ b/mercurial/revlog.py Tue May 04 14:18:06 2021 +0200 @@ -1063,7 +1063,7 @@ checkrev(r) # and we're sure ancestors aren't filtered as well - if rustancestor is not None: + if rustancestor is not None and self.index.rust_ext_compat: lazyancestors = rustancestor.LazyAncestors arg = self.index else: @@ -1150,7 +1150,7 @@ if common is None: common = [nullrev] - if rustancestor is not None: + if rustancestor is not None and self.index.rust_ext_compat: return rustancestor.MissingAncestors(self.index, common) return ancestor.incrementalmissingancestors(self.parentrevs, common) @@ -1370,7 +1370,7 @@ return self.index.headrevs() except AttributeError: return self._headrevs() - if rustdagop is not None: + if rustdagop is not None and self.index.rust_ext_compat: return rustdagop.headrevs(self.index, revs) return dagop.headrevs(revs, self._uncheckedparentrevs)