| 
| Ignore Whitespace works incorrectly for comparison? [message #337043] | Thu, 23 July 2009 11:25 |  | 
| Eclipse User  |  |  |  |  | Hi, 
 I had encountered some problem with comparision of 2 files (or 2
 revisions).
 
 This happens if files have different line ending (one is Unix, second is
 Windows).
 
 Let's assume I have the first file as
 ---------------
 if(A)
 {
 doA()
 }
 if(B)
 {
 doB()
 }
 if(C)
 {
 doC()
 }
 
 do(D)
 ----------------
 
 This files have Unix-style line termination.
 
 Second one is
 -----------------
 if(A)
 {
 doA()
 }
 
 if(C)
 {
 doC()
 }
 
 if(E)
 {
 doE()
 }
 
 do(D)
 ------------------
 This file uses Windows-style line ending
 
 If you try to compare these files with Eclipse, you will see that it
 marked whole file as one big change. If you turn on whitespace ignoring,
 it will still show some hard-to-understand difference, whereas Beyond
 Compare (I suppose and most others) will show that
 if(B)
 {
 doB()
 }
 was deleted and
 if(E)
 {
 doE()
 }
 was inserted.
 
 Is't this a bug? In any case, I suppose comparision should be improved in
 this case...
 
 Dmitry
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04249 seconds