[PATCH 2 of 9] heredoctest: do not append extra newline character to continuation line

Mads Kiilerich mads at kiilerich.com
Sun Sep 28 10:18:24 CDT 2014


On 09/28/2014 04:17 PM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1411884815 -32400
> #      Sun Sep 28 15:13:35 2014 +0900
> # Node ID b665907351a96e88e84841fd97b9ddceec9c476e
> # Parent  62ea66130006851da1973c55c6bfcb5bfbb7f856
> heredoctest: do not append extra newline character to continuation line
>
> Trailing newline characters are kept in lines.

In which cases will this make a difference? When was the extra newline 
shown?

/Mads

> diff --git a/tests/heredoctest.py b/tests/heredoctest.py
> --- a/tests/heredoctest.py
> +++ b/tests/heredoctest.py
> @@ -10,7 +10,7 @@ while lines:
>           snippet = l[4:]
>           while lines and lines[0].startswith('... '):
>               l = lines.pop(0)
> -            snippet += "\n" + l[4:]
> +            snippet += l[4:]
>           c = compile(snippet, '<heredoc>', 'single')
>           try:
>               exec c in globalvars
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list