index: use `index.get_rev` in `histedit.adjustreplacementsfrommarkers`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 09 Nov 2019 13:23:54 +0100
changeset 43568 418ca164d44c
parent 43567 0fea03924990
child 43569 43e722fc2909
index: use `index.get_rev` in `histedit.adjustreplacementsfrommarkers` Differential Revision: https://phab.mercurial-scm.org/D7353
hgext/histedit.py
--- a/hgext/histedit.py	Sat Nov 09 13:23:54 2019 +0100
+++ b/hgext/histedit.py	Sat Nov 09 13:23:54 2019 +0100
@@ -2447,7 +2447,7 @@
         return oldreplacements
 
     unfi = repo.unfiltered()
-    nm = unfi.changelog.nodemap
+    get_rev = unfi.changelog.index.get_rev
     obsstore = repo.obsstore
     newreplacements = list(oldreplacements)
     oldsuccs = [r[1] for r in oldreplacements]
@@ -2458,7 +2458,7 @@
     succstocheck = list(seensuccs)
     while succstocheck:
         n = succstocheck.pop()
-        missing = nm.get(n) is None
+        missing = get_rev(n) is None
         markers = obsstore.successors.get(n, ())
         if missing and not markers:
             # dead end, mark it as such