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

Re: TortoiseMerge - ignore line endings with large files

From: Nate <nathan_at_adweb.com.au>
Date: Fri, 23 Jan 2009 11:23:03 +1100

Stefan Küng wrote:
> Nate wrote:
>> 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.
>
> Are you sure that the lines shown as different are exactly the same? If
> you have 'ignore whitespaces' enabled, then the lines will show as
> different but with the equal sign.
>
> Do you have maybe two files which show the problem so I can reproduce
> this? If yes, please zip them before sending, otherwise mail clients
> tend to mess with text files...
>
> Stefan
>

Hi Stefan,

I thought the code snippet I provided would be sufficient to recreate
the files i'm using. This time I've attached a zip of the two files for you.

I've tested with all three whitespace options and it doesn't make any
difference.

Nate

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

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2009-01-23 01:23:13 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.