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

TortoiseMerge - ignore line endings with large files

From: Nate <nathan_at_adweb.com.au>
Date: Thu, 22 Jan 2009 15:03:03 +1100

Hi Guys,

I found some unexpected behavior in TortoiseMerge. I don't think it's been
reported before (I did a search) but if it has I apologise for the double up.

The behavior I'm seeing is:
If you diff two files with the ignore line endings option enabled then at
regular intervals after a difference the line will show as a difference but with
equals signs beside the line in each file.

To replicate:
Create two almost identical files. I used this code snippet.

using (System.IO.StreamWriter sw1 = new System.IO.StreamWriter(@"file1.txt"))
{
     using (System.IO.StreamWriter sw2 = new System.IO.StreamWriter(@"file2.txt"))
     {
         sw2.Write(Environment.NewLine);
         for (int i = 0; i < 500000; i++)
         {
             char letter = (char)((int)'a' + (i % 26));
             sw1.Write(letter + Environment.NewLine);
             sw2.Write(letter + Environment.NewLine);
         }
     }
}

Load the two files in TortoiseMerge and turn on the ignore line endings option.

You should see the behaviour on lines 43691, 87381, 174763, 218453, ..., 480597
It appears to happen at alternating intervals of 43691 and 87382 lines.

It's not a problem for me at the moment. I can ignore it now that I know about
it, but I thought I should let you know just in case the cause of the behavior
could cause problems somewhere else in the program.

cheers,
Nathan

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=1042693

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-01-22 05:03:36 CET

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

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