FYI: Very useful text diff/merging library

34 views
Skip to first unread message

Jens Alfke

unread,
Sep 21, 2014, 12:17:31 PM9/21/14
to mobile-c...@googlegroups.com
I just ran across this in a thread on another mailing list — google-diff-match-patch is a library* for performing diff and patch operations on plain text:

Two texts can be diffed against each other, generating a list of patches. These patches can then be applied against a third text. If the third text has edits of its own, this version of patch will apply its changes on a best-effort basis, reporting which patches succeeded and which failed.

In other words, this can be used to merge conflicts in natural-language strings, using the common ancestor revision as a reference. Could be very useful in replicated wikis, CMS's, or lots of other applications where multiple users can edit a piece of text.

—Jens

* "Currently available in Java, JavaScript, Dart, C++, C#, Objective C, Lua and Python". Apache licensed :)

Zack Gramana

unread,
Sep 21, 2014, 12:36:01 PM9/21/14
to <mobile-couchbase@googlegroups.com>
Or in an implementation of differential synch!

https://neil.fraser.name/writing/sync/
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/18BB2150-D6AE-4F4C-95D8-10EBC6780A1D%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages