Merge Mode in EMFCompare + EGit [message #1721638] |
Thu, 28 January 2016 20:42 |
Luis Mendes Messages: 7 Registered: August 2015 Location: Denmark |
Junior Member |
|
|
Hello,
my name is Luis and I'm new to EMFCompare and it's integration with EGit.
I'm currently working with EMFCompare, and EGit, for the comparison (and conflict resolution) of EMF model instances of a domain specific meta-model (ecore). The files for comparison are serialized in XML format.
It all works fine until the point where EGit detects the existence of a conflict during a Git merge. In this use case , I launch the EMFCompare framework via Team >> Model Merge Tool (with EMFCompare), and after confirming that the merge mode is "Use HEAD of conflicting file" I get the following exception in the console:
!ENTRY org.eclipse.emf.compare.ide 4 0 2016-01-28 21:15:18.766
!MESSAGE Unable to load the resource with the uri platform:/resource/Collaboration_C2/Build_model_instance.xml from the storage Build_model_instance.xml
!STACK 0
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Element type "features" must be followed by either attribute specifications, ">" or "/>".
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:195)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
at org.eclipse.emf.compare.ide.internal.utils.NotLoadingResourceSet.loadFromStorage(NotLoadingResourceSet.java:254)
at org.eclipse.emf.compare.ide.internal.utils.NotLoadingResourceSet.load(NotLoadingResourceSet.java:416)
at org.eclipse.emf.compare.ide.internal.utils.NotLoadingResourceSet.load(NotLoadingResourceSet.java:383)
at org.eclipse.emf.compare.ide.internal.utils.NotLoadingResourceSet.create(NotLoadingResourceSet.java:155)
at org.eclipse.emf.compare.ide.ui.internal.logical.ComparisonScopeBuilder.createScope(ComparisonScopeBuilder.java:494)
at org.eclipse.emf.compare.ide.ui.internal.logical.ComparisonScopeBuilder.create(ComparisonScopeBuilder.java:275)
at org.eclipse.emf.compare.ide.ui.internal.logical.EMFSynchronizationCompareAdapter.asCompareInput(EMFSynchronizationCompareAdapter.java:39)
at org.eclipse.emf.compare.egit.ui.internal.merge.ModelGitMergeEditorInput.prepareCompareInput(ModelGitMergeEditorInput.java:357)
at org.eclipse.emf.compare.egit.ui.internal.merge.ModelGitMergeEditorInput.prepareInput(ModelGitMergeEditorInput.java:198)
at org.eclipse.compare.CompareEditorInput.run(CompareEditorInput.java:484)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.xml.sax.SAXParseExceptionpublicId: platform:/resource/Collaboration_C2/Build_model_instance.xml; systemId: platform:/resource/Collaboration_C2/Build_model_instance.xml; lineNumber: 501; columnNumber: 1; Element type "features" must be followed by either attribute specifications, ">" or "/>".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.seekCloseOfStartTag(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
... 13 more
Despite the above exception, the EMFCompare UI is launched but the compared versions have an enormous amount of differences and missing elements, most likely caused by the aforementioned parsing exception. The only possible explanation I can come up with, although I'm not sure, is EMFCompare not considering/fetching the HEAD version but the worskpace version which has indeed been pre-merged by git and has th "<<<<<<<<" plus ">>>>>>" strings of characters on conflicting lines, in this case, of the model instance file. My questions at this point are:
1) Did any of you experienced such behavior? I'm expecting that when selecting the Merge mode "Use HEAD", EMFCompare would fetch the HEAD commit version of the conflicting file and not the workspace/pre-merged version.
2) Do you know of anything I can do to overcome this behavior ? Since I don't want to use the pre-merged version of EGit for the comparison.
3) If this is a misbehavior/bug how can I contribute in anyway ?
I'm using EMFCompare 3.2 with EGit 4.2 on an Eclipse Mars platform instance.
Thank you very much in advance for your time.
Best regards,
Luis Mendes
|
|
|
Re: Merge Mode in EMFCompare + EGit [message #1721741 is a reply to message #1721638] |
Fri, 29 January 2016 15:58 |
|
Hi,
Some of our modifications to EGit so that it takes into account other mergers instead of considering everything as text are still pending, and the official release contributed to the eclipse repository thus don't include them.
We provide custom packages including all of our modifications for download. Take a look at the collaborative modeling initiative page for info on how to retrieve them. If you already have an eclipse installation with a lot of plugins, consider the "Updating your Eclipse installation" section to simply use an update site and install the necessary plugins. Otherwise, you might want to simply retrieve one of the ready-to-use packages.
Please keep us informed of your progress and tell us if it still doesn't work when using these.
Laurent Goubet
Obeo
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02558 seconds