hgext/histedit.py
changeset 33350 b320ff822c7e
parent 33349 28f75a1695fb
child 33351 154298576d44
--- a/hgext/histedit.py	Sat Jul 08 16:50:31 2017 -0700
+++ b/hgext/histedit.py	Sat Jul 08 16:50:31 2017 -0700
@@ -1171,13 +1171,17 @@
                     for n in succs[1:]:
                         ui.debug(m % node.short(n))
 
-    safecleanupnode(ui, repo, tmpnodes)
-
     if not state.keep:
         if mapping:
             movebookmarks(ui, repo, mapping, state.topmost, ntm)
             # TODO update mq state
-        safecleanupnode(ui, repo, mapping)
+    else:
+        mapping = {}
+
+    for n in tmpnodes:
+        mapping[n] = ()
+
+    safecleanupnode(ui, repo, mapping)
 
     state.clear()
     if os.path.exists(repo.sjoin('undo')):