Bug 16936 - Compare with patch requires "Ignore Whitespace" to be turned off
Summary: Compare with patch requires "Ignore Whitespace" to be turned off
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 F2   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-22 13:52 EDT by Veronika Irvine CLA
Modified: 2002-06-04 05:09 EDT (History)
1 user (show)

See Also:


Attachments
patch for TableTree (1.04 KB, text/plain)
2002-05-22 13:52 EDT, Veronika Irvine CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Veronika Irvine CLA 2002-05-22 13:52:27 EDT
Windows 2000
Eclipse F1
In the attached patch, I need to check off "Ignore Whitespace option before 
patch can be applied.

This does not seem correct given the patch.

The patch is against org.eclipse.swt/Eclipse SWT Custom 
Widgets/common/org/eclipse/swt/custom
Comment 1 Veronika Irvine CLA 2002-05-22 13:52:58 EDT
Created attachment 953 [details]
patch for TableTree
Comment 2 Andre Weinand CLA 2002-05-23 04:16:23 EDT
Veronika, by 'check off "Ignore Whitespace" option' do you mean that the option 
had to be 'off' in order to allow a match?

If yes, then thats a bug.
If no, then the problem is that the file in the repository had been checked in 
as binary and that cvs creates incorrect patch file when comparing a binary 
file with a text file. In fact this seems to be the case here: your attachment 
shows an empty line after every non empty source line.
In order for patch to handle this case you have to turn on "Ignore whitespace". 
Comment 3 Veronika Irvine CLA 2002-05-23 08:51:49 EDT
By "checked off" I meant that Ignore Whitespace was enabled.

Is there a bug report against the fact that patch does not generate the correct 
result for comparing text and binary files?
Comment 4 Andre Weinand CLA 2002-05-23 09:40:57 EDT
Yes, I filed bug #11563. However VCM won't fix it so we will have to live with 
this problem as long as we have text files in binary mode in the repository.
May be we can convert the files in the repository?
Comment 5 Veronika Irvine CLA 2002-05-23 09:53:31 EDT
And what about a patch generated on Linux that can be applied on Windows?  Do 
we have the same line delimiter problem?  Can we not do something smarter about 
knowing the line delimiter for platforms and binary files?
Comment 6 Michael Valenta CLA 2002-05-23 10:04:25 EDT
Andre, there are two issues here. The first is that compare should handle both 
CR and CR/LF as line temrinators on all platforms (and convert all line 
terminators to the platform line terminator). The second is that CVS should NOT 
generate patches containing CR/CR/LF. If you already handle the first case then 
reassign this bug to VCM. Otherwise, we'll reopen bug 11563.
Comment 7 Andre Weinand CLA 2002-05-28 05:40:02 EDT
Changed patch so that 'Ignore whitespace' option is no longer required to 
enable the workaround for #11563.
Patch already handles CR, LF, and CR/LF, so it works across platforms.
Since #11563 has been reopened I close this one.
Comment 8 Erich Gamma CLA 2002-06-02 17:49:40 EDT
pls verify
Comment 9 Dani Megert CLA 2002-06-03 05:38:28 EDT
Need to clear resolution due to bugzilla bug (it changed the resolution to NEW)
Comment 10 Dani Megert CLA 2002-06-03 05:41:26 EDT
Marking bug as fixed again (due to bugzilla bug)