hgext/histedit.py
changeset 17759 9c7497cd39fd
parent 17758 5863f0e4cd3a
child 17760 1b8e820ef19d
--- a/hgext/histedit.py	Thu Oct 11 08:36:50 2012 +0200
+++ b/hgext/histedit.py	Thu Sep 27 13:59:48 2012 +0200
@@ -156,6 +156,7 @@
 from mercurial import repair
 from mercurial import scmutil
 from mercurial import util
+from mercurial import obsolete
 from mercurial import merge as mergemod
 from mercurial.i18n import _
 
@@ -508,7 +509,15 @@
         if mapping:
             movebookmarks(ui, repo, mapping, topmost, ntm)
             # TODO update mq state
-        cleanupnode(ui, repo, 'replaced', mapping)
+        if obsolete._enabled:
+            markers = []
+            for prec, succs in mapping.iteritems():
+                markers.append((repo[prec],
+                                tuple(repo[s] for s in succs)))
+            if markers:
+                obsolete.createmarkers(repo, markers)
+        else:
+            cleanupnode(ui, repo, 'replaced', mapping)
 
     cleanupnode(ui, repo, 'temp', tmpnodes)
     os.unlink(os.path.join(repo.path, 'histedit-state'))