Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Mirjan Merruko is currently offline Mirjan MerrukoFriend
Messages: 5
Registered: April 2014
Location: Helsinki
Junior Member
Hi,

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.

Best Regards,
Mirjan Merruko

[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 Go to previous messageGo to next message
Mikael Barbero is currently offline Mikael BarberoFriend
Messages: 55
Registered: July 2009
Member
Hi Mirjan,

Thank you for your feedback. Here are my answers

Quote:
#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.

Quote:
#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 Wink We will address the lack of documentation on this part in the next few weeks.

Quote:
#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.

Best regards,
Mikael Barbero

--
Obeo

[Updated on: Thu, 23 October 2014 20:02]

Report message to a moderator

Re: EGit and EMFCompare, set logical merge as the default merging strategy for a specific file exten [message #1453672 is a reply to message #1451394] Mon, 27 October 2014 09:47 Go to previous messageGo to next message
Mirjan Merruko is currently offline Mirjan MerrukoFriend
Messages: 5
Registered: April 2014
Location: Helsinki
Junior Member
Hi Mikael,

Thank you for the quick response, I really appreciate it. It is quite likely that I'll try to use the nightly builds as otherwise I can't see how I can get this done, and I'll report any bugs that I might find.

With regards to the documentation of course if I can help in any way let me know through a personal message, I'll be available.

Best Regards,
Mirjan Merruko
Re: EGit and EMFCompare, set logical merge as the default merging strategy for a specific file exten [message #1457450 is a reply to message #1453672] Fri, 31 October 2014 10:38 Go to previous message
Mirjan Merruko is currently offline Mirjan MerrukoFriend
Messages: 5
Registered: April 2014
Location: Helsinki
Junior Member
Hi Mikael,

I've found that it's impossible to apply three-way merging. I've filed a bug report here https://bugs.eclipse.org/bugs/show_bug.cgi?id=449212 . I'll keep trying this out and report any findings through bugzilla.

Best Regards,
Mirjan Merruko
Previous Topic:EMF Compare - Logical Model :: Loading dependent models
Next Topic:Help me to fix reset list of command execution
Goto Forum:
  


Current Time: Fri Nov 16 05:28:59 GMT 2018

Powered by FUDForum. Page generated in 0.03502 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top