1388 return False |
1388 return False |
1389 |
1389 |
1390 def commonancestorsheads(self, a, b): |
1390 def commonancestorsheads(self, a, b): |
1391 """calculate all the heads of the common ancestors of nodes a and b""" |
1391 """calculate all the heads of the common ancestors of nodes a and b""" |
1392 a, b = self.rev(a), self.rev(b) |
1392 a, b = self.rev(a), self.rev(b) |
|
1393 ancs = self._commonancestorsheads(a, b) |
|
1394 return pycompat.maplist(self.node, ancs) |
|
1395 |
|
1396 def _commonancestorsheads(self, *revs): |
|
1397 """calculate all the heads of the common ancestors of revs""" |
1393 try: |
1398 try: |
1394 ancs = self.index.commonancestorsheads(a, b) |
1399 ancs = self.index.commonancestorsheads(*revs) |
1395 except (AttributeError, OverflowError): # C implementation failed |
1400 except (AttributeError, OverflowError): # C implementation failed |
1396 ancs = ancestor.commonancestorsheads(self.parentrevs, a, b) |
1401 ancs = ancestor.commonancestorsheads(self.parentrevs, *revs) |
1397 return pycompat.maplist(self.node, ancs) |
1402 return ancs |
1398 |
1403 |
1399 def isancestor(self, a, b): |
1404 def isancestor(self, a, b): |
1400 """return True if node a is an ancestor of node b |
1405 """return True if node a is an ancestor of node b |
1401 |
1406 |
1402 The implementation of this is trivial but the use of |
1407 The implementation of this is trivial but the use of |