equal
deleted
inserted
replaced
1448 old = repo['.'] |
1448 old = repo['.'] |
1449 if not old.mutable(): |
1449 if not old.mutable(): |
1450 raise util.Abort(_('cannot amend public changesets')) |
1450 raise util.Abort(_('cannot amend public changesets')) |
1451 if len(repo[None].parents()) > 1: |
1451 if len(repo[None].parents()) > 1: |
1452 raise util.Abort(_('cannot amend while merging')) |
1452 raise util.Abort(_('cannot amend while merging')) |
1453 if (not obsolete._enabled) and old.children(): |
1453 allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt) |
|
1454 if not allowunstable and old.children(): |
1454 raise util.Abort(_('cannot amend changeset with children')) |
1455 raise util.Abort(_('cannot amend changeset with children')) |
1455 |
1456 |
1456 # commitfunc is used only for temporary amend commit by cmdutil.amend |
1457 # commitfunc is used only for temporary amend commit by cmdutil.amend |
1457 def commitfunc(ui, repo, message, match, opts): |
1458 def commitfunc(ui, repo, message, match, opts): |
1458 return repo.commit(message, |
1459 return repo.commit(message, |