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

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.

Regards,

Laurent

On 21/07/2014 11:40, Laurent Goubet wrote:
Hi Robin,

On 18/07/2014 23:05, Robin Rosenberg wrote:
----- Ursprungligt meddelande -----
Från: "Laurent Goubet" <laurent.goubet@xxxxxxx>
Till: egit-dev@xxxxxxxxxxx
Skickat: fredag, 18 jul 2014 17:15:43
Ämne: Re: [egit-dev] Logical model support for merge operations

Hi Travis,

The changes needed into JGit for this support have now been merged, but
all changes regarding EGit are still pending.

On that matter, I was working on unit tests to try and demonstrate what
we are doing, and what some of these are needed. However, even though I
can now write them (had quite a lot of trouble with maven getting in the
way), they depend on unrelated changes.
This happens sometimes. If that unrelated change is not wanted, it would
block submission, otherwise it's sort-of ok, though not perfect. The more
dependent patches you have, the slower progress will be. If you are in a hurry,
create independent patches.

We have fallen back to providing custom builds of EGit enhanced with these pending patchs for now, so that our clients can test the model support and use it in their own workflows, which also mean that they can raise bugs against it, triggering more work that will eventually become reviews on the project. Even though I had managed to avoid it so far, with 11 reviews I was bound to come to a scenario where I need to create a new review re-using utilities or functionalities introduced by two unrelated ones (since I try to keep the dependencies to a minimum).

Trying to make this new change independent (or dependent on a single "line" of changes) will introduce a lot of duplication between reviews, which will need yet another one to remove the duplication afterwards... Seems suboptimal as it will also create more work for the reviewers.

I'll try nonetheless.

Laurent


_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/egit-dev

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr";>Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard


Back to the top