Show More
@@ -1291,13 +1291,7 b' def defineparents(repo, rev, destmap, st' | |||||
1291 | # use unfiltered changelog since successorrevs may return filtered nodes |
|
1291 | # use unfiltered changelog since successorrevs may return filtered nodes | |
1292 | assert repo.filtername is None |
|
1292 | assert repo.filtername is None | |
1293 | cl = repo.changelog |
|
1293 | cl = repo.changelog | |
1294 | def isancestor(a, b): |
|
1294 | isancestor = cl.isancestorrev | |
1295 | # take revision numbers instead of nodes |
|
|||
1296 | if a == b: |
|
|||
1297 | return True |
|
|||
1298 | elif a > b: |
|
|||
1299 | return False |
|
|||
1300 | return cl.isancestor(cl.node(a), cl.node(b)) |
|
|||
1301 |
|
1295 | |||
1302 | dest = destmap[rev] |
|
1296 | dest = destmap[rev] | |
1303 | oldps = repo.changelog.parentrevs(rev) # old parents |
|
1297 | oldps = repo.changelog.parentrevs(rev) # old parents |
@@ -1679,6 +1679,12 b' class revlog(object):' | |||||
1679 |
|
1679 | |||
1680 | A revision is considered an ancestor of itself.""" |
|
1680 | A revision is considered an ancestor of itself.""" | |
1681 | a, b = self.rev(a), self.rev(b) |
|
1681 | a, b = self.rev(a), self.rev(b) | |
|
1682 | return self.isancestorrev(a, b) | |||
|
1683 | ||||
|
1684 | def isancestorrev(self, a, b): | |||
|
1685 | """return True if revision a is an ancestor of revision b | |||
|
1686 | ||||
|
1687 | A revision is considered an ancestor of itself.""" | |||
1682 | return self.isdescendantrev(b, a) |
|
1688 | return self.isdescendantrev(b, a) | |
1683 |
|
1689 | |||
1684 | def ancestor(self, a, b): |
|
1690 | def ancestor(self, a, b): |
General Comments 0
You need to be logged in to leave comments.
Login now