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

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 3:59 p.m.
Message ID <b3907339e67ebee6661bb23c070fcb95@localhost.localdomain>
Download mbox | patch
Permalink /patch/43089/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 3:59 p.m.
Closed by commit rHG3e8796aa0809: index: use `index.get_rev` in `rebase.successorrevs` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

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

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):