index: use `index.get_rev` in `rebase.successorrevs`
The code is slightly updated in the process for simplicity.
Differential Revision: https://phab.mercurial-scm.org/D7349
--- a/hgext/rebase.py Sat Nov 09 13:23:52 2019 +0100
+++ b/hgext/rebase.py Sat Nov 09 13:23:53 2019 +0100
@@ -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):