mercurial/commands.py
changeset 22952 8792ac090e3b
parent 22926 2d0b60b5abc0
child 22988 32b77aba2772
equal deleted inserted replaced
22951:6c86c673dde6 22952:8792ac090e3b
  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,