Patchwork D7349: index: use `index.get_rev` in `rebase.successorrevs`

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 5:20 a.m.
Message ID <668d05221f57a1a1f4e7aa9c79b2339e@localhost.localdomain>
Download mbox | patch
Permalink /patch/43033/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 5:20 a.m.
marmoute updated this revision to Diff 17850.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7349?vs=17772&id=17850

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7349/new/

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1643,10 +1643,11 @@ 
 def successorrevs(unfi, rev):
     """yield revision numbers for successors of rev"""
     assert unfi.filtername is None
-    nodemap = unfi.changelog.nodemap
+    get_rev = unfi.changelog.index.get_rev
     for s in obsutil.allsuccessors(unfi.obsstore, [unfi[rev].node()]):
-        if s in nodemap:
-            yield nodemap[s]
+        r = get_rev(s)
+        if r is not None:
+            yield r
 
 
 def defineparents(repo, rev, destmap, state, skipped, obsskipped):