Home » Modeling » Compare » EGit and EMFCompare, set logical merge as the default merging strategy for a specific file extension
|EGit and EMFCompare, set logical merge as the default merging strategy for a specific file extension [message #1451265]
||Thu, 23 October 2014 15:15
| Mirjan Merruko
Registered: April 2014
I would like to use EMF Compare with EGit in order to version control some GMF-based diagram files.
I've noticed that the mergetool can be used if there is a file that is marked as being in conflict. I tried triggering this by making a file in two branches be in conflict and merge them, git marks my file with the markers "<<<<<<< HEAD", "=======", ">>>>>>> some commit message" in the places where the conflict occurs and then the mergetool option is enabled in the team context menu.
I suspect that this has to do with me not registering or otherwise setting the logical merge stategy as the default one for my custom file extension. I've checked the specification for the logical merge http://wiki.eclipse.org/EMF_Compare/Specifications/LogicalMergeCommandLine, and found some source code about it through gerrit (which seems very hard to navigate though), but it seemed to me that this is still work in progress and that there isn't something concrete yet.
My questions are :
1. Is it possibe to use the merge tool through EGit, for every diff and not only the ones which show a conflict?
2. Is there a suggested workflow for this situation? I checked the tutorial but it looks unintuitive to me that you would need to compare and merge before doing the EGit merge, although this seems quite reasonable. I admit that I don't really understand the workflow that well.
3. If there is some work on this already, can I contribute in any way to help move this forward ?
Thanks in advance for your time.
[Updated on: Thu, 23 October 2014 15:31]
Report message to a moderator
|Re: EGit and EMFCompare, set logical merge as the default merging strategy for a specific file exten [message #1451394 is a reply to message #1451265]
||Thu, 23 October 2014 19:24
| Mikael Barbero
Registered: July 2009
Thank you for your feedback. Here are my answers
#1 Is it possibe to use the merge tool through EGit, for every diff and not only the ones which show a conflict?
There is actually a way to make EMF Compare be used to merge model with EGit. Unfortunately, all enhancements that have been submitted to EGit to make it work are not integrated yet (see https://git.eclipse.org/r/#/q/status:open+project:egit/egit+owner:%22Laurent+Goubet+%253Claurent.goubet%2540obeo.fr%253E%22,n,z for the complete list). So you have no chance to make it work with the official release of EGit.
But for our own testing, we build the master branch of EGit every night along with the contributions mentioned above. The update site can be found here http://download.eclipse.org/modeling/emf/compare/updates/egit-logical/nightly/ or as a zip http://download.eclipse.org/modeling/emf/compare/updates/egit-logical/nightly/org.eclipse.egit.repository-3.6.0-SNAPSHOT.zip (updated every night or so).
With this version of EGit + EMF Compare, you should be able to ask to EGit to do some merge / rebase etc... without having any conflict marker in your models anymore. Either EMF Compare manage to do a model merge, either there are some conflicts that need to be resolved manually (with EMF Compare as the merge tool).
Please note that we are still actively working on that support. So it may be wise to test all of this with the latest nightly version of EMF Compare (http://download.eclipse.org/modeling/emf/compare/updates/nightly/latest/) so you will benefit from any bug fix regarding this support.
#2 Is there a suggested workflow for this situation? I checked the tutorial but it looks unintuitive to me that you would need to compare and merge before doing the EGit merge, although this seems quite reasonable. I admit that I don't really understand the workflow that well.
The workflow should not be different from the standard usage of EGit (and does not require to do a compare and merge before doing an EGit merge). The tutorial only walk through the comparison workflow as, at the time it has been written, logical model merge was not supported We will address the lack of documentation on this part in the next few weeks.
#3 If there is some work on this already, can I contribute in any way to help move this forward ?
First, thank you very much for your help proposal. This is well appreciated. One of the thing that we lack the most is some testings on various use cases. So, it would be very helpful if you can test it and report any bug (on this forum or the bugzilla) you may find with as much details as you can gather. Also, as soon as we will have updated the documentation / tutorial, any proof reading and feedback will be very helpful !
Hope you will have enough information to go ahead.
[Updated on: Thu, 23 October 2014 20:02]
Report message to a moderator
Current Time: Sat Feb 27 01:37:27 GMT 2021
Powered by FUDForum
. Page generated in 0.01517 seconds