Community
Participate
Working Groups
performThreeWayMerge in MergeContext makes use of Compare's IStreamMerger to merge. Somehow the line endings get messed up after the merge. Repro steps (using 3.2 M3): 1. Check out a project from CVS twice into the same workspace (using a different name for the second one). 2. Turn on model merging Window>Preferences>Team>CVS>Work In Progress 3. Make a change in any file in Project1. Create a patch of your change from Project1 and apply it to Project2. 4. Commit changes to Project2. 5. Update Project1. If you compare the file you just updated in Project1 with the latest from HEAD, you will see that there are changes in the line endings. (Or you can also try to Clean Timestamps and notice that it doesn't work).
Created attachment 30783 [details] Patch to IStreamMerger Here's a patch to IStreamMerger that makes it use the platform line ending instead of just '\n'. This may not be the proper behavior either though. It may be better to use whatever line ending is used in the incoming streams or, if they are not the same, use the Eclipse platform new file line ending.
Moving to Compare. Andre, was there a reason that the outgoing line-ending of the TextStreamMerge was just '\n'? P.S. The patch is for TextStreamMerger, not IStreamMerger
modified patch released and tests adapted
Start verifying...
The patch improves the situation but still has problems when the files are checked out with a line delimiter that's different from System.getProperty("line.separator").
This is true (as stated in comment 1). The purpose of the patch was to make the TextStreamMerger usable on non-*nix platforms for most users.
It does not appear that this is in the M4 test candidate build. The compare.map file has not been updated.
In build now.