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

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Nov 9 10:59:45 EST 2019


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

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



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


More information about the Mercurial-devel mailing list