Mercurial > hg
diff hgext/rebase.py @ 38666:a06b2b032557
revlog: introduce a isancestorrev() and use it in rebase
Differential Revision: https://phab.mercurial-scm.org/D3931
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 11 Jul 2018 16:29:23 -0700 |
parents | 731debab233f |
children | 572dff5c946e |
line wrap: on
line diff
--- a/hgext/rebase.py Wed Jul 11 16:37:30 2018 -0700 +++ b/hgext/rebase.py Wed Jul 11 16:29:23 2018 -0700 @@ -1291,13 +1291,7 @@ # use unfiltered changelog since successorrevs may return filtered nodes assert repo.filtername is None cl = repo.changelog - def isancestor(a, b): - # take revision numbers instead of nodes - if a == b: - return True - elif a > b: - return False - return cl.isancestor(cl.node(a), cl.node(b)) + isancestor = cl.isancestorrev dest = destmap[rev] oldps = repo.changelog.parentrevs(rev) # old parents