Mercurial > hg
changeset 18082:40f0c0748cfc
transplant: replace incancestors uses with ancestors
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 17 Dec 2012 15:08:06 -0800 |
parents | f88c60e740a1 |
children | 717c692fa449 |
files | hgext/transplant.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/transplant.py Mon Dec 17 15:13:51 2012 -0800 +++ b/hgext/transplant.py Mon Dec 17 15:08:06 2012 -0800 @@ -94,7 +94,8 @@ parentrev = repo.changelog.rev(parent) if hasnode(repo, node): rev = repo.changelog.rev(node) - reachable = repo.changelog.incancestors([parentrev], rev) + reachable = repo.changelog.ancestors([parentrev], rev, + inclusive=True) if rev in reachable: return True for t in self.transplants.get(node): @@ -103,7 +104,8 @@ self.transplants.remove(t) return False lnoderev = repo.changelog.rev(t.lnode) - if lnoderev in repo.changelog.incancestors([parentrev], lnoderev): + if lnoderev in repo.changelog.ancestors([parentrev], lnoderev, + inclusive=True): return True return False