Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: TortoiseMerge patch strips trailing line

Project highlights: :. Download .: :. Support .: :. FAQ .: :. Translations .: :. Donate .: :. Report Bug .:

tortoisesvn
Discussion topic

Back to topic list

Re: TortoiseMerge patch strips trailing line

Author Kim Gräsman <kim dot grasman at gmail dot com>
Full name Kim Gräsman <kim dot grasman at gmail dot com>
Date 2012-05-07 04:46:17 PDT
Message 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.n​et/projects/tortoise​svn/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 dot grasman at gmail dot 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

« Previous message in topic | 2 of 6 | Next message in topic »

Messages

Show all messages in topic

TortoiseMerge patch strips trailing line Kim Gräsman <kim dot grasman at gmail dot com> Kim Gräsman <kim dot grasman at gmail dot com> 2012-05-04 04:16:20 PDT
     Re: TortoiseMerge patch strips trailing line Kim Gräsman <kim dot grasman at gmail dot com> Kim Gräsman <kim dot grasman at gmail dot com> 2012-05-07 04:46:17 PDT
         Re: TortoiseMerge patch strips trailing line simonlarge Simon Large 2012-05-07 13:58:36 PDT
             Re: TortoiseMerge patch strips trailing line Kim Gräsman <kim dot grasman at gmail dot com> Kim Gräsman <kim dot grasman at gmail dot com> 2012-05-07 21:42:52 PDT
                 Re: TortoiseMerge patch strips trailing line jeanmarc Jean-Marc van Leerdam 2012-05-08 00:14:25 PDT
                     Re: TortoiseMerge patch strips trailing line Kim Gräsman <kim dot grasman at gmail dot com> Kim Gräsman <kim dot grasman at gmail dot com> 2012-05-08 01:41:58 PDT
Messages per page: