##// END OF EJS Templates
rust-cpython: using the new bindings from Python...
Georges Racinet -
r41150:536c8353 default
parent child Browse files
Show More
@@ -97,6 +97,11 b' REVIDX_KNOWN_FLAGS'
97 97 REVIDX_RAWTEXT_CHANGING_FLAGS
98 98
99 99 parsers = policy.importmod(r'parsers')
100 try:
101 from . import rustext
102 rustext.__name__ # force actual import (see hgdemandimport)
103 except ImportError:
104 rustext = None
100 105
101 106 # Aliased for performance.
102 107 _zlibdecompress = zlib.decompress
@@ -779,12 +784,17 b' class revlog(object):'
779 784 for r in revs:
780 785 checkrev(r)
781 786 # and we're sure ancestors aren't filtered as well
782 if util.safehasattr(parsers, 'rustlazyancestors'):
783 return ancestor.rustlazyancestors(
784 self.index, revs,
785 stoprev=stoprev, inclusive=inclusive)
786 return ancestor.lazyancestors(self._uncheckedparentrevs, revs,
787 stoprev=stoprev, inclusive=inclusive)
787
788 if rustext is not None:
789 lazyancestors = rustext.ancestor.LazyAncestors
790 arg = self.index
791 elif util.safehasattr(parsers, 'rustlazyancestors'):
792 lazyancestors = ancestor.rustlazyancestors
793 arg = self.index
794 else:
795 lazyancestors = ancestor.lazyancestors
796 arg = self._uncheckedparentrevs
797 return lazyancestors(arg, revs, stoprev=stoprev, inclusive=inclusive)
788 798
789 799 def descendants(self, revs):
790 800 return dagop.descendantrevs(revs, self.revs, self.parentrevs)
General Comments 0
You need to be logged in to leave comments. Login now