equal
deleted
inserted
replaced
1402 def isancestor(self, a, b): |
1402 def isancestor(self, a, b): |
1403 """return True if node a is an ancestor of node b |
1403 """return True if node a is an ancestor of node b |
1404 |
1404 |
1405 The implementation of this is trivial but the use of |
1405 The implementation of this is trivial but the use of |
1406 commonancestorsheads is not.""" |
1406 commonancestorsheads is not.""" |
1407 return a in self.commonancestorsheads(a, b) |
1407 a, b = self.rev(a), self.rev(b) |
|
1408 return self.descendant(a, b) |
1408 |
1409 |
1409 def ancestor(self, a, b): |
1410 def ancestor(self, a, b): |
1410 """calculate the "best" common ancestor of nodes a and b""" |
1411 """calculate the "best" common ancestor of nodes a and b""" |
1411 |
1412 |
1412 a, b = self.rev(a), self.rev(b) |
1413 a, b = self.rev(a), self.rev(b) |