[PATCH] tests: unify test-diff-newlines

Martin Geisler mg at aragost.com
Wed Sep 1 06:52:49 CDT 2010


Adrian Buehlmann <adrian at cadifra.com> writes:

> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1283240629 -7200
> # Node ID 97ccbc50faa46dd9d6c78793281d044d1ae8f289
> # Parent  c1ed7fee1afdd3b01f961c2dfe31fbf05256cd1f
> tests: unify test-diff-newlines
>
> @@ -1,8 +1,18 @@
> -#!/bin/sh
> +  $ hg init
>  
> -hg init
> -python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a

Hmm, it seems this change managed to confuse patchbomb as well...

> -hg ci -Ama -d '1 0'
> -echo clean diff >> a
> -hg ci -mb -d '2 0'
> -hg diff -r0 -r1
> +  $ python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a
> +  $ hg ci -Ama -d '1 0'
> +  adding a
> +
> +  $ echo clean diff >> a
> +  $ hg ci -mb -d '2 0'
> +
> +  $ hg diff -r0 -r1
> +  diff -r 107ba6f817b5 -r 310ce7989cdc a
> +  --- a/a	Thu Jan 01 00:00:01 1970 +0000
> +  +++ b/a	Thu Jan 01 00:00:02 1970 +0000
> +  @@ -1,2 +1,3 @@
> +   confuse str.splitlines
> +   embedded
> newline
> +  +clean diff
> +

As far as I can tell, the email contains a newline here where it should
contain a \r. So I get this error when I try to import it:

  applying patch from stdin
  abort: bad hunk #1 @@ -1,8 +0,0 @@
   (8 8 1 0)

How does the mail look for the rest of you?

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list