[PATCH 3 of 3 stable] mq: when adding headers in plain mode, separate them from message (issue4453)
Augie Fackler
raf at durin42.com
Tue Nov 25 09:43:55 CST 2014
On Mon, Nov 17, 2014 at 01:52:31AM +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski at unity3d.com>
> # Date 1416185323 -3600
> # Mon Nov 17 01:48:43 2014 +0100
> # Branch stable
> # Node ID 18220555396adc2bcbc7f3afa7542524f1bb151c
> # Parent f8909f21ae9f3589cc60ab4f2629a446df921c31
> mq: when adding headers in plain mode, separate them from message (issue4453)
These look good, queued for stable. Thanks!
>
> c87f2a5a6e49 did a clean-up in one direction ... but we want it in the other
> direction.
>
> diff --git a/hgext/mq.py b/hgext/mq.py
> --- a/hgext/mq.py
> +++ b/hgext/mq.py
> @@ -151,6 +151,8 @@ def inserthgheader(lines, header, value)
> return lines
>
> def insertplainheader(lines, header, value):
> + if lines and lines[0] and ':' not in lines[0]:
> + lines.insert(0, '')
> lines.insert(0, '%s: %s' % (header, value))
> return lines
>
> diff --git a/tests/test-mq-header-date.t b/tests/test-mq-header-date.t
> --- a/tests/test-mq-header-date.t
> +++ b/tests/test-mq-header-date.t
> @@ -311,6 +311,7 @@
> 0: [mq]: 1.patch - test
> ==== qref -d
> Date: 9 0
> +
> Four
>
> diff -r ... 4
> @@ -494,6 +495,7 @@
> ==== qref -u -d
> Date: 15 0
> From: john
> +
> Nine
>
> diff -r ... 9
> diff --git a/tests/test-mq-header-from.t b/tests/test-mq-header-from.t
> --- a/tests/test-mq-header-from.t
> +++ b/tests/test-mq-header-from.t
> @@ -250,6 +250,7 @@
> 0: [mq]: 1.patch - mary
> ==== qref -u
> From: jane
> +
> Four
>
> diff -r ... 4of
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list