change (diff) detection between multiple versions of a document
140 views
Skip to first unread message
Baba Pakruddin
unread,
Apr 11, 2017, 10:15:02 AM4/11/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Diff Match Patch
Hallo,
In google diff_match_patch we can compare two documents and get the difference. I am trying to calculate the diff's for multiple versions of a document.
Ex. Doc.name -- version -- Diff
abc -- v1 - v1 and v2
abc -- v2 - v1 and v3
abc - v3
can anyone explain the logic to do above example to store the example.
Thanks in advance.
Baba
askebi...@gmail.com
unread,
Dec 8, 2018, 2:33:22 AM12/8/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Diff Match Patch
I'm not 100% sure what you were asking. But I similarly needed to figure out a way to store the diff between multiple versions, preferably the delta text, since it doesn't include "equal" sections and is thus more space efficient. And it turned out I just needed to store the delta both ways for each of them, and then at least one full copy of some point in the chain.
Fletcher Penney
unread,
Dec 8, 2018, 10:55:07 AM12/8/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to diff-mat...@googlegroups.com
Technically, you only need to store the delta in one direction. It can easily be applied "forward", and then can be adjusted by recalculating offsets in order to be applied "backward". The calculation to do this is pretty quick, so should not add too much processing time and would cut storage space for the diffs in half if that is a concern.