-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement merge with basic conflict handling (LeftToRIght & RightToLeft) #9
Comments
Another remark related to my tests: when renaming a concept which is used on a view, in the list of differences, I get a change on the concept (expected), but also a change on |
See #10 |
@Phillipus I've implemented a basic merge operation which works as intended. Still to be done:
|
I've finally tested coArchi 2 and looked at how
RefreshModelAction
handles merge. When some conflicts are detected at git level, or if a successful git merge led to an invalid model, the merge is managed byMergeHandler#handle3WayMerge()
, mainly through these lines of code:From my tests, this leads to local (ie. Left) changes being discarded because only changes done on the remote end (ie. Right) are applied to the Common Ancestor and then saved as the Left model. So it seems we have to implement the following (loosely based on this code and this one too):
and(fromSide(DifferenceSource.LEFT), not(hasConflict(ConflictKind.REAL)))
) and applying them to common Ancestor (usingBatchMerger.copyAllLeftToRight()
)and(fromSide(DifferenceSource.RIGHT), not(hasConflict(ConflictKind.REAL)))
) and applying them to common Ancestor (usingBatchMerger.copyAllRightToLeft()
)BatchMerger.copyAllLeftToRight()
for "our" orBatchMerger.copyAllRightToLeft()
for "their".The text was updated successfully, but these errors were encountered: