openETCS / toolchain

WP7: Top Level Project for the toolchain
26 stars 30 forks source link

Find a save way for XML merging #355

Closed jastram closed 8 years ago

jastram commented 10 years ago

Currently, all openETCS artifacts are managed as files via git. This may lead to editing conflicts. Almost all artifacts right now are XML files (Papyrus, ProR, DataDicitonary...) As part of looking for a long-term strategy, we need to understand whether the file-based approach can scale, which would require robust merge capabilities of XML files.

The objective of this issue is to:

jastram commented 10 years ago

@astante already did some basic research. Note that he wrote it in German, which I just ran through Google translate:

Hello Michael,

git , and other SCM tools use a relatively simple "line by line comparison" algorithm (longest common sequence ( LCS ) ) . This approach fails as in case of hierarchical files:

http://useless-factor.blogspot.de/2008/01/matching-diffing-and-merging-xml.html or http://www.scribd.com/doc/14482474/XML-diff-survey

is very well described.

Git can instruct for certain files to another merge tool to use (see: http://git-scm.com/book/en/Customizing-Git-Git-Attributes ) .

Tools xml Diffen / can merge : http://diffxml.sourceforge.net/ short list : http://www.manageability.org/blog/stuff/open-source-xml-diff-in-java/view

Unfortunately I have no experience with xml merge / diff tool which is why I have no experience to that effect.

Files , of which we know that that can be corrupted by the merge quite sure you should exclude from automatic diff in git : http://lug.mtu.edu/kernel/software/scm/git/docs/v1.7.1/ gitattributes.html ( generating diff text)

My suggestion would be , until we have a final solution, we should use the implicit merge ( git pull ) for the ReqIF and also prevent the uml files. To do this , I think you only put one . Gitattributes file with the current setting .

jastram commented 10 years ago

I don't have the bandwidth for this, re-assigning to @cecilebraun

MatthieuPERIN commented 9 years ago

The merging of XML file is an actual research area .... I don't think there is an "on shelter" industrial-grade piece of code that do that right now for all th eXML files, maybe for some specific XML format (UML, ReqIf ?, ..)

jastram commented 8 years ago

This issue is not assigned to a backlog item, and there are no resources for resolving this: Closing.