Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327785 - There are no changes for models showing in the Synchronize view with Team > Merge operation.
Summary: There are no changes for models showing in the Synchronize view with Team > ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Wojciech Galanciak CLA
QA Contact:
URL:
Whiteboard: 0.05
Keywords:
Depends on: 332612
Blocks: 332639
  Show dependency tree
 
Reported: 2010-10-14 10:35 EDT by Krzysztof Kazmierczyk CLA
Modified: 2011-01-25 11:48 EST (History)
4 users (show)

See Also:


Attachments
TestModelProjects (11.52 KB, application/x-zip-compressed)
2010-12-01 11:08 EST, Duc Luu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Kazmierczyk CLA 2010-10-14 10:35:29 EDT
Extracted from bug 315694. We do not know if it is possible to reproduce it in Eclipse itself. We reproduced it in RSA 7.5 (Eclipse 3.4 branch)

Steps to reproduce:
1. Create two files with models
2. Share project with repository
3. Create and switch to branch1
4. modify first model, commit changes
5. Switch to HEAD
6. Modify changes in second model
7. Merge changes

What is: synchronize view does not show any changes. You must restart product to see your changes
What should be: synchronize view shows changes.
Comment 1 Tomasz Zarna CLA 2010-11-02 04:48:46 EDT
This bug is not actually blocking bug 315694, there is a known workaround to see the changes, thus observe bug 315694. However, the fact is that we would like to see them both fixed in M4.
Comment 2 Krzysztof Kazmierczyk CLA 2010-11-11 07:01:31 EST
I have also observed, that the bug does not appear in RSA 8.0.1 (Eclipse 3.6.1)
Comment 3 Tomasz Zarna CLA 2010-11-15 05:41:35 EST
Krzysztof have you managed to find a bug that fixed the issue? It would be great if we would be able to point to a (fixed) bug in Eclipse or at least find a corresponding bug somewhere else if it wasn't an Eclipse bug. In the meantime you could ask the guy who reported the bug to verify if it's really fixed in RSA 8.0.1.
Comment 4 Krzysztof Kazmierczyk CLA 2010-11-30 09:15:21 EST
After talking last week with Duc, he told that for him the issue still appears in RSA 8.0.1. Duc, could you provide us the model (with files for ancestor, head and branch) for which the issue happens for you?
Comment 5 Tomasz Zarna CLA 2010-11-30 09:29:57 EST
Wojtek please verify Krzysztof's observation from comment 2.
Comment 6 Krzysztof Kazmierczyk CLA 2010-12-01 05:01:26 EST
We have just tried to reproduce this Bug with Wojtek on RSA 8.0.1 and the changes are displayed.
Comment 7 Tomasz Zarna CLA 2010-12-01 05:34:03 EST
One more thing you may try is to replace Team/CVS bundles in a RSA installation where the problem occurs (7.5.x) with those from RSA where the problem appears to be gone (8.0.1). Wojtek could you please do that?
Comment 8 Wojciech Galanciak CLA 2010-12-01 07:15:46 EST
I cannot reproduce the issue (at least using steps provided by Krzysztof in a description). I have tried to do that in RSA 7.5.3.

Plug-ins version:
org.eclipse.team.core - 3.4.2.r34x_20080115
org.eclipse.team.cvs.core - 3.3.101.r34x_20090115
Comment 9 Tomasz Zarna CLA 2010-12-01 10:44:43 EST
Merging on both 8.0.0.20100812_1404[1] and 7.5.4.20090918_1338 gave the same result: the Synchronize view displayed "No changes in 'CVS Merge [...]'.". I'll update to 8.0.1 as suggested in comment 2 and see what happens.

[1]  Eclipse Platform 3.6.0, I20100608-0911
Comment 10 Duc Luu CLA 2010-12-01 11:08:00 EST
Created attachment 184273 [details]
TestModelProjects

I tested with the 8.0.1.20101121_2139. The Team > Merge operation still shows "No changes in 'CVS Merge Root branch1 to branch1' (LogicalModel_TeamMergeProject)'

So, either the patch that you fix is not in my RSA 8.0.1 target or it is not functioning correctly. I have attached the 3 projects for you to retest if you have the environment setup. One project is before branch, one is in branch1 with changes to Package2.efx and the last project is in the cvs HEAD stream with a change to Package1.efx.
Comment 11 Krzysztof Kazmierczyk CLA 2010-12-02 08:15:24 EST
OK now I am able to reproduce The issue on both RSA 7.5.x and 8.x . It seems me and Wojtek had the changes for which the issue did not happen.
Comment 12 Wojciech Galanciak CLA 2010-12-03 09:10:55 EST
I can also reproduce this problem on both versions mentioned by Krzysztof.
The problem is caused by a lack of information about incoming changes in org.eclipse.team.internal.core.subscribers.DiffTreeStatistics. This class has a map which contains project states.

To force adding it to DiffTreeStatistics close project and then reopen it. This operation will trigger event which adds expected state to that map. For now I can propose it as a workaround. Of course I will continue investigation to find out why this event is not dispatched during merging operation for our example project which has particular model.
Comment 13 Tomasz Zarna CLA 2010-12-06 06:48:18 EST
It's too late to release a fix for M4, we would like to provide a fix at the very beginning of M5.
Comment 14 Wojciech Galanciak CLA 2010-12-15 06:35:59 EST
I think that this problem is solved by a fix for bug 332612.
Comment 15 Wojciech Galanciak CLA 2010-12-15 06:58:46 EST
org.eclipse.core.resources.mapping.ModelProvider.getMappings(IResource, ResourceMappingContext, IProgressMonitor) implemented in model provided by RSA causes that all elements which are part of logical model are refreshed. This action is performed before org.eclipse.team.internal.core.BackgroundEventHandler is attached to listen on changes in resouces. After we attached this handler only two events are thrown:
Event queued on Updating Synchronize view for CVS Merge 'Root_b1 to b1'.:resource: /bug327785-project/.project type: CHANGE depth: DEPTH_ZERO
Event queued on Updating Synchronize view for CVS Merge 'Root_b1 to b1'.:resource: /bug327785-project type: CHANGE depth: DEPTH_ZERO
These files are not a part of a model.

BackgroundEventHandler handles these events by calling accept on Subscriber. For a second event (for project) it checks if there is a variant for it in baseTree or remoteTree. There is not variant for it so it checks all children of this project. There we come to bug 332612. Without this fix none of project's children will be visited. With it, it will check all children which are part of model and they have variants in baseTree or remoteTree. In result, we will see changes in Sync View.
Comment 16 Tomasz Zarna CLA 2010-12-15 08:31:03 EST
(In reply to comment #14)
> I think that this problem is solved by a fix for bug 332612.

It did for me, verified in patched RSA 8.0.0.20100812_1404 and 7.5.4.20090918_1338. Nice job Wojtek! I will release the fix to HEAD today.
Comment 17 Tomasz Zarna CLA 2010-12-15 10:01:24 EST
Marking as FIXED. Feel free to reopen if you find any case for which fix from bug 332612 doesn't work.
Comment 18 Tomasz Zarna CLA 2011-01-25 11:48:20 EST
This bug was fixed bug bug 332612, which has been verified. Marking this one as verified as well.