Bug 46977 - Comparing/merging two local files screws up the content
Summary: Comparing/merging two local files screws up the content
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Andre Weinand CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-19 10:16 EST by Pascal Rapicault CLA
Modified: 2003-11-19 16:07 EST (History)
3 users (show)

See Also:


Attachments
Picture of the bogus file content (301.60 KB, application/octet-stream)
2003-11-19 12:28 EST, Pascal Rapicault CLA
no flags Details
fixed compare plugin (600.50 KB, application/octet-stream)
2003-11-19 16:07 EST, Andre Weinand CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2003-11-19 10:16:30 EST
I200311190010 + equinox runtime

To reproduce:
- on /home/eclipse, get the v20031118 of org.eclipse.core.runtime
- on /home/technology, get the HEAD of 
org.eclipse/equinox/org.eclipse.core.runtime

In each project (in the resource perspective) select the folder 
src/org/eclipse/core/runtime/jobs and compare each others.

Using the comparison, copy the modification of the one from eclipse into the 
one from equinox and save.

Now if you open the file that has been modified, you will notice that the 
content is all messed up.
Comment 1 Veronika Irvine CLA 2003-11-19 12:10:50 EST
I am not using the equinox runtime and I see this with I20031119.  I have seen 
it on Windows and GTK.
Comment 2 Andre Weinand CLA 2003-11-19 12:17:53 EST
Since I couldn't reproduce the problem: in what way is the content messed up?
Sould you please attach an example?
Thanks.
Comment 3 Pascal Rapicault CLA 2003-11-19 12:28:33 EST
Created attachment 6865 [details]
Picture of the bogus file content

The file is only displayed in a strange when loaded in eclipse. If I open the
file with notepad, I do not see the problem.
It sounds like an encoding problem.
Comment 4 Pascal Rapicault CLA 2003-11-19 12:30:24 EST
There is a typo the instruction :-(
From the equinox repo, you need to get the content of 
org.eclipse.core.runtime.osgi. Then the path to the file is correct.
Comment 5 Andre Weinand CLA 2003-11-19 12:44:14 EST
Indeed, this looks like a UTF-16 file.
Thanks a lot.
I'm investigating...
Comment 6 John Arthorne CLA 2003-11-19 13:40:31 EST
We had the same problem this morning... We found the following workaround to
solve the problem:

- change the encoding of the editor to UTF16
- Copy contents of file to clipboard
- delete the file
- create a new file with the same name
- paste from clipboard

We found closing editors, etc, did not fix the problem.
Comment 7 Andre Weinand CLA 2003-11-19 13:41:59 EST
released a fix for M5
Comment 8 Pascal Rapicault CLA 2003-11-19 15:40:50 EST
Is it in I200319111200?
Comment 9 Andre Weinand CLA 2003-11-19 16:05:47 EST
No, but it should be in the 3:30 EST rebuild.
But I have attached the fixed compare plugin.
Please let me know whether it fixes the problem.
Comment 10 Andre Weinand CLA 2003-11-19 16:07:57 EST
Created attachment 6873 [details]
fixed compare plugin