mercurial/commands.py
changeset 18909 3a72c89a83ec
parent 18906 ef7068173a22
child 18955 f3245f22771c
equal deleted inserted replaced
18908:779e3d9b7a1d 18909:3a72c89a83ec
  1313             raise util.Abort(_('cannot amend recursively'))
  1313             raise util.Abort(_('cannot amend recursively'))
  1314 
  1314 
  1315         old = repo['.']
  1315         old = repo['.']
  1316         if old.phase() == phases.public:
  1316         if old.phase() == phases.public:
  1317             raise util.Abort(_('cannot amend public changesets'))
  1317             raise util.Abort(_('cannot amend public changesets'))
  1318         if len(old.parents()) > 1:
       
  1319             raise util.Abort(_('cannot amend merge changesets'))
       
  1320         if len(repo[None].parents()) > 1:
  1318         if len(repo[None].parents()) > 1:
  1321             raise util.Abort(_('cannot amend while merging'))
  1319             raise util.Abort(_('cannot amend while merging'))
  1322         if (not obsolete._enabled) and old.children():
  1320         if (not obsolete._enabled) and old.children():
  1323             raise util.Abort(_('cannot amend changeset with children'))
  1321             raise util.Abort(_('cannot amend changeset with children'))
  1324 
  1322