[PATCH 6 of 6] qfold: allow to specify '--message/'--logfile' and '--edit' at the same time

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Jun 4 19:51:57 CDT 2014



On 05/31/2014 08:26 AM, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1401548913 -32400
> #      Sun Jun 01 00:08:33 2014 +0900
> # Node ID 48a96e394db7fd57e1da192812da35928555bddf
> # Parent  10efb4225739e586a7f5de4c1882c880c40292e0
> qfold: allow to specify '--message/'--logfile' and '--edit' at the same time

Patches 1, 4, 5 and 6 have been pushed in the clowncopter.

Nice UI consistency enforcement, thanks

(queued)


>
> 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.
>
> diff --git a/hgext/mq.py b/hgext/mq.py
> --- a/hgext/mq.py
> +++ b/hgext/mq.py
> @@ -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 = []
> diff --git a/tests/test-mq-qfold.t b/tests/test-mq-qfold.t
> --- a/tests/test-mq-qfold.t
> +++ b/tests/test-mq-qfold.t
> @@ -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]
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list