equal
deleted
inserted
replaced
1374 elif p == nullrev: |
1374 elif p == nullrev: |
1375 c.append(self.node(r)) |
1375 c.append(self.node(r)) |
1376 return c |
1376 return c |
1377 |
1377 |
1378 def descendant(self, start, end): |
1378 def descendant(self, start, end): |
|
1379 """True if revision 'end' is an descendant of revision 'start' |
|
1380 |
|
1381 A revision is considered as a descendant of itself.""" |
1379 if start == nullrev: |
1382 if start == nullrev: |
1380 return True |
1383 return True |
1381 elif start == end: |
1384 elif start == end: |
1382 return True |
1385 return True |
1383 for i in self.descendants([start]): |
1386 return start in self._commonancestorsheads(start, end) |
1384 if i == end: |
|
1385 return True |
|
1386 elif i > end: |
|
1387 break |
|
1388 return False |
|
1389 |
1387 |
1390 def commonancestorsheads(self, a, b): |
1388 def commonancestorsheads(self, a, b): |
1391 """calculate all the heads of the common ancestors of nodes a and b""" |
1389 """calculate all the heads of the common ancestors of nodes a and b""" |
1392 a, b = self.rev(a), self.rev(b) |
1390 a, b = self.rev(a), self.rev(b) |
1393 ancs = self._commonancestorsheads(a, b) |
1391 ancs = self._commonancestorsheads(a, b) |