comparison hgext/evolve.py @ 741:892a6d708c8f

amend: drop the deprecated note option We plan to get closer to the commit --amend implementation dropping this deprecated option helps.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 15 Oct 2013 16:20:17 +0200
parents fa049c1d9445
children 760d01a549a6
comparison
equal deleted inserted replaced
740:eeaacbb688df 741:892a6d708c8f
1376 lockmod.release(lock, wlock) 1376 lockmod.release(lock, wlock)
1377 1377
1378 @command('amend|refresh', 1378 @command('amend|refresh',
1379 [('A', 'addremove', None, 1379 [('A', 'addremove', None,
1380 _('mark new/missing files as added/removed before committing')), 1380 _('mark new/missing files as added/removed before committing')),
1381 ('n', 'note', '', _('use text as commit message for this update (DEPRECATED)')),
1382 ('e', 'edit', False, _('invoke editor on commit messages')), 1381 ('e', 'edit', False, _('invoke editor on commit messages')),
1383 ] + walkopts + commitopts + commitopts2, 1382 ] + walkopts + commitopts + commitopts2,
1384 _('[OPTION]... [FILE]...')) 1383 _('[OPTION]... [FILE]...'))
1385 def amend(ui, repo, *pats, **opts): 1384 def amend(ui, repo, *pats, **opts):
1386 """combine a changeset with updates and replace it with a new one 1385 """combine a changeset with updates and replace it with a new one
1418 # commit current changes as update 1417 # commit current changes as update
1419 # code copied from commands.commit to avoid noisy messages 1418 # code copied from commands.commit to avoid noisy messages
1420 ciopts = dict(opts) 1419 ciopts = dict(opts)
1421 ciopts.pop('message', None) 1420 ciopts.pop('message', None)
1422 ciopts.pop('logfile', None) 1421 ciopts.pop('logfile', None)
1423 ciopts['message'] = opts.get('note') or ('amends %s' % old.hex()) 1422 ciopts['message'] = 'amends %s' % old.hex()
1424 e = cmdutil.commiteditor 1423 e = cmdutil.commiteditor
1425 def commitfunc(ui, repo, message, match, opts): 1424 def commitfunc(ui, repo, message, match, opts):
1426 return repo.commit(message, opts.get('user'), opts.get('date'), 1425 return repo.commit(message, opts.get('user'), opts.get('date'),
1427 match, editor=e) 1426 match, editor=e)
1428 revcount = len(repo) 1427 revcount = len(repo)