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

Re: TortoiseMerge patch strips trailing line

From: Kim Gräsman <kim.grasman_at_gmail.com>
Date: Mon, 7 May 2012 13:46:15 +0200

Hello,

We tried this on a colleague's machine, but via TortoiseSVN 1.6.16's
"Apply patch" command, and didn't see the problem.

I'm using TortoiseMerge from here:
http://sourceforge.net/projects/tortoisesvn/files/Tools/1.6.7/

Could it be that this is fixed in later revs of TortoiseSVN, but just
not released as a standalone TortoiseMerge?

Thanks,
- Kim

On Fri, May 4, 2012 at 1:16 PM, Kim Gräsman <kim.grasman_at_gmail.com> wrote:
> 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=2958255

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-05-07 13:46:27 CEST

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