equal
deleted
inserted
replaced
567 |
567 |
568 lock = repo.lock() |
568 lock = repo.lock() |
569 try: |
569 try: |
570 wlock = repo.wlock() |
570 wlock = repo.wlock() |
571 try: |
571 try: |
|
572 if old.phase() == phases.public: |
|
573 raise util.Abort(_("can not rewrite immutable changeset %s") |
|
574 % old) |
|
575 if not repo.revs('%d and (::.)', old): |
|
576 raise error.Abort(_('cannot amend non ancestor changeset')) |
572 tr = repo.transaction('amend') |
577 tr = repo.transaction('amend') |
573 try: |
578 try: |
574 if old.phase() == phases.public: |
|
575 raise util.Abort(_("can not rewrite immutable changeset %s") |
|
576 % old) |
|
577 oldphase = old.phase() |
579 oldphase = old.phase() |
578 # commit current changes as update |
580 # commit current changes as update |
579 # code copied from commands.commit to avoid noisy messages |
581 # code copied from commands.commit to avoid noisy messages |
580 ciopts = dict(opts) |
582 ciopts = dict(opts) |
581 ciopts.pop('message', None) |
583 ciopts.pop('message', None) |