Patchwork D3942: rebase: use revnums (not nodes) for set of extinct revisions

login
register
mail settings
Submitter phabricator
Date July 13, 2018, 12:23 p.m.
Message ID <c67d12f287c267de32ce884a5c2aa740@localhost.localdomain>
Download mbox | patch
Permalink /patch/32833/
State Not Applicable
Headers show

Comments

phabricator - July 13, 2018, 12:23 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG20a30bb8f276: rebase: use revnums (not nodes) for set of extinct revisions (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3942?vs=9579&id=9585

REVISION DETAIL
  https://phab.mercurial-scm.org/D3942

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1855,22 +1855,22 @@ 
     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:
             # no successor
             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