1718 raise error.Abort(_('cannot amend while merging')) |
1718 raise error.Abort(_('cannot amend while merging')) |
1719 allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt) |
1719 allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt) |
1720 if not allowunstable and old.children(): |
1720 if not allowunstable and old.children(): |
1721 raise error.Abort(_('cannot amend changeset with children')) |
1721 raise error.Abort(_('cannot amend changeset with children')) |
1722 |
1722 |
|
1723 # Currently histedit gets confused if an amend happens while histedit |
|
1724 # is in progress. Since we have a checkunfinished command, we are |
|
1725 # temporarily honoring it. |
|
1726 # |
|
1727 # Note: eventually this guard will be removed. Please do not expect |
|
1728 # this behavior to remain. |
|
1729 if not obsolete.isenabled(repo, obsolete.createmarkersopt): |
|
1730 cmdutil.checkunfinished(repo) |
|
1731 |
1723 # commitfunc is used only for temporary amend commit by cmdutil.amend |
1732 # commitfunc is used only for temporary amend commit by cmdutil.amend |
1724 def commitfunc(ui, repo, message, match, opts): |
1733 def commitfunc(ui, repo, message, match, opts): |
1725 return repo.commit(message, |
1734 return repo.commit(message, |
1726 opts.get('user') or old.user(), |
1735 opts.get('user') or old.user(), |
1727 opts.get('date') or old.date(), |
1736 opts.get('date') or old.date(), |