Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Delaigue2017-01-05 10:42:42 -0500
committerLaurent Delaigue2017-01-20 09:50:26 -0500
commit96d17353eaae309c2d79a455cb9567bdfd37f9e8 (patch)
treea7cac974ce587820bbc93edbd2b1e5b728439d87 /plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite
parent3bfee6cab3c79dbd51f2199b01eadcb5f6aa2ea2 (diff)
downloadorg.eclipse.emf.compare-96d17353eaae309c2d79a455cb9567bdfd37f9e8.tar.gz
org.eclipse.emf.compare-96d17353eaae309c2d79a455cb9567bdfd37f9e8.tar.xz
org.eclipse.emf.compare-96d17353eaae309c2d79a455cb9567bdfd37f9e8.zip
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 <mfleck@eclipsesource.com> Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java
index 606545ac6..e61131af5 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java
@@ -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
*******************************************************************************/
package org.eclipse.emf.compare.tests.suite;
@@ -46,6 +47,7 @@ import org.eclipse.emf.compare.tests.merge.FeatureMaps2wayMergeTest;
import org.eclipse.emf.compare.tests.merge.FeatureMaps3wayMergeTest;
import org.eclipse.emf.compare.tests.merge.FeatureMapsConflictsMergeTest;
import org.eclipse.emf.compare.tests.merge.FeatureMapsPseudoConflictsMergeTest;
+import org.eclipse.emf.compare.tests.merge.ImplicationsMergeTest;
import org.eclipse.emf.compare.tests.merge.IndividualMergeOutOfScopeValuesTest;
import org.eclipse.emf.compare.tests.merge.IndividualMergeTest;
import org.eclipse.emf.compare.tests.merge.MultiLineAttributeMergeTest;
@@ -64,6 +66,7 @@ import org.eclipse.emf.compare.tests.scope.ComparisonScopeAdapterTest;
import org.eclipse.emf.compare.tests.scope.DefaultComparisonScopeTest;
import org.eclipse.emf.compare.tests.utils.EMFComparePredicatesTest;
import org.eclipse.emf.compare.tests.utils.EqualityHelperTest;
+import org.eclipse.emf.compare.tests.utils.GraphTest;
import org.eclipse.emf.compare.tests.utils.MatchUtilFeatureContainsTest;
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