Skip to main content
diff options
authorLaurent Delaigue2017-01-05 10:42:42 -0500
committerLaurent Delaigue2017-01-20 09:50:26 -0500
commit96d17353eaae309c2d79a455cb9567bdfd37f9e8 (patch)
treea7cac974ce587820bbc93edbd2b1e5b728439d87 /plugins/
parent3bfee6cab3c79dbd51f2199b01eadcb5f6aa2ea2 (diff)
Merge algorithm refactoring
In order to address several bugs we faced on merging, a refactoring of the merge algorithm was made. The responsibility of IMerger is reduced to just merging one diff and telling which diffs are required to be merged prior to a given diff and which ones need to be merged in the same 'transaction'. It is now the responsibility of BatchMerger to merge all the necessary diffs in the right order when asked to merge one or several diffs. A new class ComputeDiffsToMerge encapsulates the logic of computing the diffs to merge and in which order. The Graph is no longer used to describe the dependencies between diffs, hence BreadthFirstIterator is no longer used for merging. Refined diffs are considered as 'to be merged in the same transaction' (logically resulting merges). Required diffs must be merged before (merge dependencies). Equivalent and implied diffs are dealt with like before. - Diffs have a new state MERGING to distinguish between an in-progress merge (MERGING) and an already executed merge (MERGED). - Implied merges need to be set to MERGED recursively - Diff ordering for implications needs to be checked recursively - Deterministic refinement order that does not rely on hash values - Simplified, common method for copyLeftToRight and copyRightToLeft Includes tests. Bug: 507177 Bug: 501574 Change-Id: Iad8bad7a4326d4fb297662264b4ad3737f508136 Also-by: Martin Fleck <> Signed-off-by: Laurent Delaigue <>
Diffstat (limited to 'plugins/')
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/ b/plugins/
index 606545ac6..e61131af5 100644
--- a/plugins/
+++ b/plugins/
@@ -10,6 +10,7 @@
* Philip Langer - Adds additional test classes
* Stefan Dirix - Adds additional test classes
* Michael Borkowski - Adds additional test classes
+ * Martin Fleck - Add ImplicationMergeTest, GraphTest
@@ -46,6 +47,7 @@ import;
@@ -64,6 +66,7 @@ import;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.resource.Resource;
@@ -98,8 +101,8 @@ import junit.textui.TestRunner;
MultiLineAttributeMergeTest.class, MonitorCancelTest.class, IdentifierEObjectMatcherTest.class,
MatchUtilFeatureContainsTest.class, RefineMergeTest.class, Bug484557ConflictTest.class,
Bug485266_MoveDeleteConflict_Test.class, ResourceAttachmentChangeBug492261.class,
- ComparisonScopeAdapterTest.class, EMFComparePredicatesTest.class,
- RankedAdapterFactoryRegistryTest.class, ComparisonUtilTest.class, })
+ RankedAdapterFactoryRegistryTest.class, ComparisonScopeAdapterTest.class,
+ EMFComparePredicatesTest.class, ImplicationsMergeTest.class, GraphTest.class, })
public class AllTests {
* Standalone launcher for all of compare's tests.

Back to the top