comparison hgext/evolve.py @ 1140:b7d85cd8ec7b

amend: allow the --logfile argument to work properly Though documented to work, using --logfile previously set the message option to that of the parent commit, and cause amend to abort with this message: abort: options --message and --logfile are mutually exclusive It's not clear why the 'edit' option is popped, but this option is only fetched in order to let the core commit command do the work.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 25 Oct 2014 22:25:42 -0400
parents 9cfbed50dfee
children ca17770d2ee9
comparison
equal deleted inserted replaced
1139:07ccf868dfe1 1140:b7d85cd8ec7b
1823 1823
1824 Returns 0 on success, 1 if nothing changed. 1824 Returns 0 on success, 1 if nothing changed.
1825 """ 1825 """
1826 opts = opts.copy() 1826 opts = opts.copy()
1827 edit = opts.pop('edit', False) 1827 edit = opts.pop('edit', False)
1828 log = opts.get('logfile')
1828 opts['amend'] = True 1829 opts['amend'] = True
1829 if not (edit or opts['message']): 1830 if not (edit or opts['message'] or log):
1830 opts['message'] = repo['.'].description() 1831 opts['message'] = repo['.'].description()
1831 _resolveoptions(ui, opts) 1832 _resolveoptions(ui, opts)
1832 _alias, commitcmd = cmdutil.findcmd('commit', commands.table) 1833 _alias, commitcmd = cmdutil.findcmd('commit', commands.table)
1833 return commitcmd[0](ui, repo, *pats, **opts) 1834 return commitcmd[0](ui, repo, *pats, **opts)
1834 1835