|
Re: Automatically accept all non-conflicting changes [message #1749608 is a reply to message #1749606] |
Thu, 08 December 2016 15:13 |
|
Hi Vlad,
You could also look at how the MergeAllNonConflictingAction is implemented and use the same kind of implementation from your side, as that doesn't really require an UI action if you're trying to call the programmatically.
You'll basically be using the MergeNonConflictingRunnable by telling it what is editable, what the registry of mergers is, and which comparison to merge in whatever direction. You can also what we do in the tests to merge and check if it went well, for example in org.eclipse.emf.compare.tests.merge.TwoWayBatchMergingTest.batchMergeAndAssertEquality(Resource, Resource, Direction) .
Laurent Goubet
Obeo
|
|
|
|
Re: Automatically accept all non-conflicting changes [message #1749948 is a reply to message #1749631] |
Wed, 14 December 2016 09:03 |
|
Hi,
What do you mean exactly by "local changes are lost" ? Seems to me like the "local" changes shouldn't even be touched when using "ACCEPT" mode, as that means we'll only accept the remote changes. However, that is for Three-way comparisons, in which we have a common ancestor model to use as reference in order to determine what's remote and what's local. In case of a 2-way comparison, all changes are local (the right side is used as a reference) and there cannot be conflicts (there can only be conflicts if there is a common ancestor available). Accepting all changes in such a case will just make your left (local) model a copy of the right (remote) one.
Laurent Goubet
Obeo
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03623 seconds