# HG changeset patch # User Martin von Zweigbergk # Date 1531347121 25200 # Node ID 20a30bb8f276f9b037cecd44fce49d67b0c7d5eb # Parent 0f8599afb92f6ca2ce0e1fbc3e4ca76b4961d2b2 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 diff -r 0f8599afb92f -r 20a30bb8f276 hgext/rebase.py --- 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