equal
deleted
inserted
replaced
244 change = 'p1(p1())' |
244 change = 'p1(p1())' |
245 old = scmutil.revsingle(repo, change) |
245 old = scmutil.revsingle(repo, change) |
246 |
246 |
247 wlock = repo.wlock() |
247 wlock = repo.wlock() |
248 try: |
248 try: |
|
249 if not old.state().mutable: |
|
250 raise util.Abort(_("can not rewrite immutable changeset %s") % old) |
249 |
251 |
250 # commit current changes as update |
252 # commit current changes as update |
251 # code copied from commands.commit to avoid noisy messages |
253 # code copied from commands.commit to avoid noisy messages |
252 ciopts = dict(opts) |
254 ciopts = dict(opts) |
253 ciopts['message'] = opts.get('note') or ('amends %s' % old.hex()) |
255 ciopts['message'] = opts.get('note') or ('amends %s' % old.hex()) |