Hi devs,
Since there is not official standard for diff/merge API I started to
write a simple one. Yo can find it on
https://github.com/xwiki/xwiki-commons/tree/feature-diff/xwiki-commons-coreā¦.
The first use case for it is to provide a diff/merge API for the
Extension Manager XAR merging conflict resolution UI.
It is mostly inspired from JRCS/java-diff-utils APIs and implemented
using java-diff-utils (
http://code.google.com/p/java-diff-utils/) for
the diff and JDiff (
http://www.qarks.com/web/en/products_jdiff.html)
for the multiline String merge. Theses are the most active independent
libraries I could find so far and it's not really what I would call
active library usually...
Would be nice to get some comments/suggestions on the API.
For the implementation side if you know some good diff/merge tool I
would be glad to get some other suggestions. I took a quick look at
various EDIs which obviously have this kind of tools but what I could
find is not really designed to be used easily outside of the EDI for
which they have been designed. Either its very tied to the EDI itself
or it's generic enough but trigger a whole bunch of dependencies while
we would use like 1% of the total.
Here are the various features I'm looking for in an ideal library:
* good 3 ways merge ("good" is not a detail, applying a patch on the
third version does not always give very good results)
* diff/patch API
* support of single line in 3 ways merge and diff
Thanks,
--
Thomas Mortagne