pick: use scmutil.cleanupnodes()
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 22 Jan 2019 10:32:44 -0800
changeset 4371 9a218768bac5
parent 4370 45c0415e45b9
child 4372 5345be014f2c
pick: use scmutil.cleanupnodes() A side-effect is that `pick` should now also move bookmarks.
hgext3rd/evolve/cmdrewrite.py
--- a/hgext3rd/evolve/cmdrewrite.py	Tue Jan 22 09:45:25 2019 -0800
+++ b/hgext3rd/evolve/cmdrewrite.py	Tue Jan 22 10:32:44 2019 -0800
@@ -1468,7 +1468,8 @@
         if pickstate:
             pickstate.delete()
         newctx = repo[newnode] if newnode else pctx
-        obsolete.createmarkers(repo, [(origctx, (newctx,))], operation="pick")
+        replacements = {origctx.node(): [newctx.node()]}
+        scmutil.cleanupnodes(repo, replacements, operation="pick")
 
         if newnode is None:
             ui.warn(_("note: picking %d:%s created no changes to commit\n") %