equal
deleted
inserted
replaced
31 from . import ( |
31 from . import ( |
32 ancestor, |
32 ancestor, |
33 error, |
33 error, |
34 mdiff, |
34 mdiff, |
35 parsers, |
35 parsers, |
|
36 pycompat, |
36 templatefilters, |
37 templatefilters, |
37 util, |
38 util, |
38 ) |
39 ) |
39 |
40 |
40 _pack = struct.pack |
41 _pack = struct.pack |
941 a, b = self.rev(a), self.rev(b) |
942 a, b = self.rev(a), self.rev(b) |
942 try: |
943 try: |
943 ancs = self.index.commonancestorsheads(a, b) |
944 ancs = self.index.commonancestorsheads(a, b) |
944 except (AttributeError, OverflowError): # C implementation failed |
945 except (AttributeError, OverflowError): # C implementation failed |
945 ancs = ancestor.commonancestorsheads(self.parentrevs, a, b) |
946 ancs = ancestor.commonancestorsheads(self.parentrevs, a, b) |
946 return map(self.node, ancs) |
947 return pycompat.maplist(self.node, ancs) |
947 |
948 |
948 def isancestor(self, a, b): |
949 def isancestor(self, a, b): |
949 """return True if node a is an ancestor of node b |
950 """return True if node a is an ancestor of node b |
950 |
951 |
951 The implementation of this is trivial but the use of |
952 The implementation of this is trivial but the use of |