Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Logical model support for merge operations

On Mon, Jul 21, 2014 at 5:18 PM, Laurent Goubet <laurent.goubet@xxxxxxx> wrote:
FYI, I just updated https://git.eclipse.org/r/#/c/14966/ along with the three next ones https://git.eclipse.org/r/#/c/30189/ https://git.eclipse.org/r/#/c/30190/ and https://git.eclipse.org/r/#/c/30191/ . All these concern unit tests, the last one being the one that shows the difference between "git" merging that will conflict on simple text files and "ignore" model mergers.

Basically, the two first ones introduce tests that show the use of model mergers to merge the content of files through EGit's org.eclipse.egit.core.synchronize.GitSubscriberMergeContext . These merges would have different results if launched through git/jgit (would fail in conflicts even for simple text files).

The last one, 30191, tries to merge through a org.eclipse.egit.core.op.MergeOperation.MergeOperation(Repository, String). The result of the test will be :

1- if none of the other reviews are merge, the test fails (unexpected failure on what should be an auto-mergeable conflict)
2- once https://git.eclipse.org/r/22674 is merged, the test will fail because the auto-staging hook tries to take responsibility for an IFile.delete() call and throws an exception out since the index is already locked.
3- once https://git.eclipse.org/r/22670 is merged, the test passes : the new merging strategy introduced by 22674 has taken responsibility for merging the auto-mergeable conflict and a deletion in the same "model", updating the index along the way, and 22670 has made sure that the auto-staging hook does not fail the merge with no reason.

More tests will come to cover all the possible routes, but at least these demonstrate the basic need and solution.

could you also describe how to manually test merging models with your patches,
a typical example would be nice to manually try your changes.

--
Matthias

Back to the top