Mercurial > hg-stable
changeset 21714:635a8201e356
qfold: allow to specify '--message/'--logfile' and '--edit' at the same time
Before this patch, 'hg qfold' disallows to specify
'--message/'--logfile' and '--edit' at the same time.
'hg qfold' has disallowed such combination since Mercurial 0.9.2, but
this restriction seems not to be reasonable for recent Mercurial,
because all other commands creating new changeset allow it.
This patch allows 'hg qfold' to specify '--message/'--logfile' and
'--edit' at the same time like other commands creating new changeset.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sun, 01 Jun 2014 00:08:33 +0900 |
parents | 7a51bced398b |
children | 3eb43b706174 |
files | hgext/mq.py tests/test-mq-qfold.t |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Sun Jun 01 00:08:32 2014 +0900 +++ b/hgext/mq.py Sun Jun 01 00:08:33 2014 +0900 @@ -2546,9 +2546,6 @@ q.checklocalchanges(repo) message = cmdutil.logmessage(ui, opts) - if opts.get('edit'): - if message: - raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) parent = q.lookup('qtip') patches = []
--- a/tests/test-mq-qfold.t Sun Jun 01 00:08:32 2014 +0900 +++ b/tests/test-mq-qfold.t Sun Jun 01 00:08:33 2014 +0900 @@ -174,10 +174,11 @@ $ hg tip --template "{files}\n" aa -(test that editor is not invoked before transaction starting) +(test that editor is not invoked before transaction starting, +and that combination of '--edit' and '--message' doesn't abort execution) $ rm -f .hg/last-message.txt - $ HGEDITOR="sh $TESTTMP/editor.sh" hg qfold -e p3 + $ HGEDITOR="sh $TESTTMP/editor.sh" hg qfold -e -m MESSAGE p3 refresh interrupted while patch was popped! (revert --all, qpush to recover) abort: emulating unexpected abort [255]