# HG changeset patch # User Matt Harbison # Date 1414290342 14400 # Node ID b7d85cd8ec7bd5a4ba5a61d156745269a999450b # Parent 07ccf868dfe1720fcf1faa1eeb7f8b11273d8f25 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. diff -r 07ccf868dfe1 -r b7d85cd8ec7b README --- a/README Wed Oct 22 15:05:54 2014 -0700 +++ b/README Sat Oct 25 22:25:42 2014 -0400 @@ -57,6 +57,10 @@ Changelog ========= +5.0.1 -- + +- amend: fix --logfile argument + 5.0.0 -- 2014-10-22 - drop compat with Mercurial pre 3.2 diff -r 07ccf868dfe1 -r b7d85cd8ec7b hgext/evolve.py --- a/hgext/evolve.py Wed Oct 22 15:05:54 2014 -0700 +++ b/hgext/evolve.py Sat Oct 25 22:25:42 2014 -0400 @@ -1825,8 +1825,9 @@ """ opts = opts.copy() edit = opts.pop('edit', False) + log = opts.get('logfile') opts['amend'] = True - if not (edit or opts['message']): + if not (edit or opts['message'] or log): opts['message'] = repo['.'].description() _resolveoptions(ui, opts) _alias, commitcmd = cmdutil.findcmd('commit', commands.table) diff -r 07ccf868dfe1 -r b7d85cd8ec7b tests/test-amend.t --- a/tests/test-amend.t Wed Oct 22 15:05:54 2014 -0700 +++ b/tests/test-amend.t Sat Oct 25 22:25:42 2014 -0400 @@ -97,3 +97,9 @@ $ HGUSER=newbie hg amend -U $ hg parents --template '{rev} {author}\n' 7 newbie + +Check that --logfile works + $ echo "logfile message" > logfile.txt + $ hg amend -l logfile.txt + $ hg log -r . -T "{desc}\n" + logfile message