Mercurial > hg-stable
changeset 38673:20a30bb8f276
rebase: use revnums (not nodes) for set of extinct revisions
There is no need to convert extinct revisions to nodeids.
Differential Revision: https://phab.mercurial-scm.org/D3942
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 11 Jul 2018 15:12:01 -0700 |
parents | 0f8599afb92f |
children | a50482254b0a |
files | hgext/rebase.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Wed Jul 11 15:01:47 2018 -0700 +++ b/hgext/rebase.py Wed Jul 11 15:12:01 2018 -0700 @@ -1855,14 +1855,15 @@ assert repo.filtername is None cl = repo.changelog nodemap = cl.nodemap - extinctnodes = set(cl.node(r) for r in repo.revs('extinct()')) + extinctrevs = set(repo.revs('extinct()')) for srcrev in rebaseobsrevs: srcnode = cl.node(srcrev) # XXX: more advanced APIs are required to handle split correctly successors = set(obsutil.allsuccessors(repo.obsstore, [srcnode])) # obsutil.allsuccessors includes node itself successors.remove(srcnode) - if successors.issubset(extinctnodes): + succrevs = {nodemap[s] for s in successors if s in nodemap} + if succrevs.issubset(extinctrevs): # all successors are extinct obsoleteextinctsuccessors.add(srcrev) if not successors: @@ -1870,7 +1871,6 @@ obsoletenotrebased[srcrev] = None else: dstrev = destmap[srcrev] - succrevs = [nodemap[s] for s in successors if s in nodemap] for succrev in succrevs: if cl.isancestorrev(succrev, dstrev): obsoletenotrebased[srcrev] = succrev