Login | Register
My pages Projects Community openCollabNet

Discussions > users > TortoiseMerge patch strips trailing line

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

tortoisesvn
Discussion topic

Back to topic list

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-04 04:16:20 PDT
Message 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 | 1 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: