mercurial/commands.py
changeset 28359 f6b5b041c6c9
parent 28324 549ff28a345f
child 28391 73905484ef70
--- a/mercurial/commands.py	Wed Mar 02 10:42:58 2016 +0000
+++ b/mercurial/commands.py	Sun Feb 14 07:35:50 2016 +0000
@@ -1720,6 +1720,15 @@
         if not allowunstable and old.children():
             raise error.Abort(_('cannot amend changeset with children'))
 
+        # Currently histedit gets confused if an amend happens while histedit
+        # is in progress. Since we have a checkunfinished command, we are
+        # temporarily honoring it.
+        #
+        # Note: eventually this guard will be removed. Please do not expect
+        # this behavior to remain.
+        if not obsolete.isenabled(repo, obsolete.createmarkersopt):
+            cmdutil.checkunfinished(repo)
+
         # commitfunc is used only for temporary amend commit by cmdutil.amend
         def commitfunc(ui, repo, message, match, opts):
             return repo.commit(message,