[PATCH] tests: unify test-diff-newlines

Adrian Buehlmann adrian at cadifra.com
Thu Sep 2 04:31:27 CDT 2010


On 01.09.2010 13:52, Martin Geisler wrote:
> 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...

I almost feared as much. Thanks for trying to import that.

>> -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?
> 

I've now pushed that change to
http://bitbucket.org/abuehl/mercurial-crew/changeset/bf840a3d1af2

Maybe you can pull it from there instead? (Feel free to rebase.)



More information about the Mercurial-devel mailing list