1680 raise error.Abort(_('cannot amend while merging')) |
1680 raise error.Abort(_('cannot amend while merging')) |
1681 allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt) |
1681 allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt) |
1682 if not allowunstable and old.children(): |
1682 if not allowunstable and old.children(): |
1683 raise error.Abort(_('cannot amend changeset with children')) |
1683 raise error.Abort(_('cannot amend changeset with children')) |
1684 |
1684 |
1685 newextra = extra.copy() |
|
1686 newextra['branch'] = branch |
|
1687 extra = newextra |
|
1688 # commitfunc is used only for temporary amend commit by cmdutil.amend |
1685 # commitfunc is used only for temporary amend commit by cmdutil.amend |
1689 def commitfunc(ui, repo, message, match, opts): |
1686 def commitfunc(ui, repo, message, match, opts): |
1690 return repo.commit(message, |
1687 return repo.commit(message, |
1691 opts.get('user') or old.user(), |
1688 opts.get('user') or old.user(), |
1692 opts.get('date') or old.date(), |
1689 opts.get('date') or old.date(), |