[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

TortoiseMerge patch strips trailing line

From: Kim Gräsman <kim.grasman_at_gmail.com>
Date: Fri, 4 May 2012 13:16:19 +0200

Hi all,

I just noticed that applying a patch through TortoiseMerge strips
trailing blank lines from the target files.

For example, I have a file a.txt, committed to SVN;

--
This is a.txt.
Its last line is blank.
--
I make a change to a.txt, generate a patch with svn diff and then
revert my local changes;
--
This is a.txt.
some change
Its last line is blank.
--
$ svn diff a.txt > change.patch
$ svn revert a.txt
Now I use TortoiseMerge to re-apply change.patch to a.txt.
Unfortunately my trailing blank line disappears. Here's a.txt after
patching:
--
This is a.txt.
some change
Its last line is blank.
--
I'm using TortoiseMerge standalone, version TortoiseMerge 1.6.7, Build
18415 - 32 Bit , 2010/01/22 17:55:06.
I would expect it to preserve trailing blank lines, as that seems to
be considered good style by a number of tools. SVN diff even complains
"No newline at end of file" after applying the patch.
Is this a bug or am I misusing something?
Thanks,
- Kim
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2957610
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-05-04 14:14:40 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.