You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Peter Balogh <pe...@nemesys.hu> on 2011/11/28 16:53:11 UTC

svn patch adds extra 0A character at the end of the line

Hi,

I'm trying to apply patches with svn patch.
The patches were created on the same linux box, where I apply them.
After applying the following diff:
Index: 3.txt
===================================================================
--- 3.txt       (revision 27)
+++ 3.txt       (revision 28)
@@ -1 +1 @@
-3
\ No newline at end of file
+34
\ No newline at end of file

the pached file contains an extra 0A character after the last character.
Am I doing something wrong, or is it an svn patch issue?

Subversion package:
ii  subversion                                1.7.1-2+WANdisco
Source:
deb http://opensource.wandisco.com/ubuntu lucid svn17

Thank you for your help,
Best regards,
Peter Balogh


Re: svn patch adds extra 0A character at the end of the line

Posted by Balogh Péter <ba...@cit.hu>.
Hi,

It seems during a larger update, the client hangs, and never finishes. 
It's using a small amount of CPU according to top, but I can't see 
anything happening. The update usually takes a few minutes to complete, 
but on this occasion, it didn't finish after 6 hours.
Do you happen to know about any issue like this?

Thank you for your help,
Best regards,
Peter Balogh

On 2011.11.29. 10:04, Peter Balogh wrote:
> Hi Stefan,
>
> It's working, I'll do some more test, and let you know if any issue 
> comes up.
> Now I'll just have to wait until this patch makes it's way to the main 
> repository :)
>
> Thank you for your help,
> Best regards,
> Peter Balogh
>
> On 2011.11.28. 23:49, Stefan Sperling wrote:
>> On Mon, Nov 28, 2011 at 10:08:00PM +0100, Peter Balogh wrote:
>>> Hi Stefan,
>>>
>>> Let me know, I'll test it right away!
>> Can you try this updated patch please? Thanks.
>> It should fix your problem.
>>
>> svn diff 
>> https://svn.apache.org/repos/asf/subversion/branches/1.7.x@r1207511 
>> https://svn.apache.org/repos/asf/subversion/branches/1.7.x-svn-patch-eol-fixes@1207668 
>>
>


Re: svn patch adds extra 0A character at the end of the line

Posted by Peter Balogh <pe...@nemesys.hu>.
Hi Stefan,

It's working, I'll do some more test, and let you know if any issue 
comes up.
Now I'll just have to wait until this patch makes it's way to the main 
repository :)

Thank you for your help,
Best regards,
Peter Balogh

On 2011.11.28. 23:49, Stefan Sperling wrote:
> On Mon, Nov 28, 2011 at 10:08:00PM +0100, Peter Balogh wrote:
>> Hi Stefan,
>>
>> Let me know, I'll test it right away!
> Can you try this updated patch please? Thanks.
> It should fix your problem.
>
> svn diff https://svn.apache.org/repos/asf/subversion/branches/1.7.x@r1207511 https://svn.apache.org/repos/asf/subversion/branches/1.7.x-svn-patch-eol-fixes@1207668


Re: svn patch adds extra 0A character at the end of the line

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Nov 28, 2011 at 10:08:00PM +0100, Peter Balogh wrote:
> Hi Stefan,
> 
> Let me know, I'll test it right away!

Can you try this updated patch please? Thanks.
It should fix your problem.

svn diff https://svn.apache.org/repos/asf/subversion/branches/1.7.x@r1207511 https://svn.apache.org/repos/asf/subversion/branches/1.7.x-svn-patch-eol-fixes@1207668

Re: svn patch adds extra 0A character at the end of the line

Posted by Peter Balogh <pe...@nemesys.hu>.
Hi Stefan,

Let me know, I'll test it right away!
Can you send me a notification in private?
I don't usually watch the list.

Best regards,
Peter Balogh

On 2011.11.28. 22:02, Stefan Sperling wrote:
> On Mon, Nov 28, 2011 at 09:18:48PM +0100, Peter Balogh wrote:
>> Hi Stefan,
>>
>> I've just tried, and it didn't solve the issue :(
>> How can I help, to track this down?
> Hmmm... looking at your example patch I note that there's an invalid
> assumption I made when changing the diff parser to handle the '\ No
> newline at end of file' comments.
>
> I'll need to go back to the drawing board for these fixes to handle your
> case, too. Not before 1.7.2 though, sorry. I'll let you know when I have
> a new patch to try.


Re: svn patch adds extra 0A character at the end of the line

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Nov 28, 2011 at 09:18:48PM +0100, Peter Balogh wrote:
> Hi Stefan,
> 
> I've just tried, and it didn't solve the issue :(
> How can I help, to track this down?

Hmmm... looking at your example patch I note that there's an invalid
assumption I made when changing the diff parser to handle the '\ No
newline at end of file' comments.

I'll need to go back to the drawing board for these fixes to handle your
case, too. Not before 1.7.2 though, sorry. I'll let you know when I have
a new patch to try.

Re: svn patch adds extra 0A character at the end of the line

Posted by Peter Balogh <pe...@nemesys.hu>.
Hi Stefan,

I've just tried, and it didn't solve the issue :(
How can I help, to track this down?

Best regards,
Peter Balogh

On 2011.11.28. 20:16, Stefan Sperling wrote:
> On Mon, Nov 28, 2011 at 07:18:46PM +0100, Peter Balogh wrote:
>> Hi Stefan,
>>
>> I'll try to build a version of it tomorrow, and give it a try.
> Thank you! I created a new 1.7.x branch which combines fixes for
> both issues. The issues are closely related anyway.
> Can you please try this patch instead?
> svn diff ^/subversion/branches/1.7.x@r1207511 ^/subversion/branches/1.7.x-svn-patch-eol-fixes@r1207512
>
>> I would love to see it in 1.7.2, I've been waiting for the update
>> for weeks now, and it would be nice to have all our issues resolved
>> this year :)
> We'll see. 1.7.2 will be rolled tomorrow so it might be a little late
> for the patch fixes to pass review quickly enough. But they will be
> released eventually. I hope the combined branch makes review for other
> developers a bit easier.


Re: svn patch adds extra 0A character at the end of the line

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Nov 28, 2011 at 07:18:46PM +0100, Peter Balogh wrote:
> Hi Stefan,
> 
> I'll try to build a version of it tomorrow, and give it a try.

Thank you! I created a new 1.7.x branch which combines fixes for
both issues. The issues are closely related anyway.
Can you please try this patch instead?
svn diff ^/subversion/branches/1.7.x@r1207511 ^/subversion/branches/1.7.x-svn-patch-eol-fixes@r1207512

> I would love to see it in 1.7.2, I've been waiting for the update
> for weeks now, and it would be nice to have all our issues resolved
> this year :)

We'll see. 1.7.2 will be rolled tomorrow so it might be a little late
for the patch fixes to pass review quickly enough. But they will be
released eventually. I hope the combined branch makes review for other
developers a bit easier.

Re: svn patch adds extra 0A character at the end of the line

Posted by Peter Balogh <pe...@nemesys.hu>.
Hi Stefan,

I'll try to build a version of it tomorrow, and give it a try.
I would love to see it in 1.7.2, I've been waiting for the update for 
weeks now, and it would be nice to have all our issues resolved this year :)
We could start the new year by switching everywhere to 1.7 :)
I'll post here if it fixed the problem, or if it caused any new issue.

Best regards,
Peter Balogh

On 2011.11.28. 19:01, Stefan Sperling wrote:
> On Mon, Nov 28, 2011 at 05:16:56PM +0100, Stefan Sperling wrote:
>> This command outputs the patch to fix the problem in 1.7.1:
>> svn diff https://svn.apache.org/repos/asf//subversion/branches/1.7.x@r1206728 https://svn.apache.org/repos/asf//subversion/branches/1.7.x-issue3991@r1206745
> Ooops, that diff is for a similar but different problem. You need this one:
> svn diff ^/subversion/branches/1.7.x@1206722 ^/subversion/branches/1.7.x-issue3814@r1206725


Re: svn patch adds extra 0A character at the end of the line

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Nov 28, 2011 at 05:16:56PM +0100, Stefan Sperling wrote:
> This command outputs the patch to fix the problem in 1.7.1:
> svn diff https://svn.apache.org/repos/asf//subversion/branches/1.7.x@r1206728 https://svn.apache.org/repos/asf//subversion/branches/1.7.x-issue3991@r1206745

Ooops, that diff is for a similar but different problem. You need this one:
svn diff ^/subversion/branches/1.7.x@1206722 ^/subversion/branches/1.7.x-issue3814@r1206725

Re: svn patch adds extra 0A character at the end of the line

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Nov 28, 2011 at 04:53:11PM +0100, Peter Balogh wrote:
> Hi,
> 
> I'm trying to apply patches with svn patch.
> The patches were created on the same linux box, where I apply them.
> After applying the following diff:
> Index: 3.txt
> ===================================================================
> --- 3.txt       (revision 27)
> +++ 3.txt       (revision 28)
> @@ -1 +1 @@
> -3
> \ No newline at end of file
> +34
> \ No newline at end of file
> 
> the pached file contains an extra 0A character after the last character.
> Am I doing something wrong, or is it an svn patch issue?

This is a known issue. A fix exists and might just about make the 1.7.2
release if it gets enough review. Else, it will probably show up in 1.7.3.

This command outputs the patch to fix the problem in 1.7.1:
svn diff https://svn.apache.org/repos/asf//subversion/branches/1.7.x@r1206728 https://svn.apache.org/repos/asf//subversion/branches/1.7.x-issue3991@r1206745