mercurial/commands.py
changeset 22952 8792ac090e3b
parent 22926 2d0b60b5abc0
child 22988 32b77aba2772
--- a/mercurial/commands.py	Tue Oct 14 13:23:52 2014 -0700
+++ b/mercurial/commands.py	Tue Oct 14 13:25:13 2014 -0700
@@ -1450,7 +1450,8 @@
             raise util.Abort(_('cannot amend public changesets'))
         if len(repo[None].parents()) > 1:
             raise util.Abort(_('cannot amend while merging'))
-        if (not obsolete._enabled) and old.children():
+        allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt)
+        if not allowunstable and old.children():
             raise util.Abort(_('cannot amend changeset with children'))
 
         # commitfunc is used only for temporary amend commit by cmdutil.amend