Proposal for DaisyMerge (N-Diff/Merge library based on DaisyDiff)

99 views
Skip to first unread message

Kostis Kapelonis

unread,
Jan 21, 2011, 11:06:17 AM1/21/11
to dais...@googlegroups.com
Hello all

I got involved in DaisyDiff over the last year because I wanted to use
it as a basis for document comparison where multiple people change an
HTML/XML document and then
their changes are merged. (Think the track changes feature of Microsoft Word)

I have searched a lot for an open-source library that would allow me
to diff AND merge HTML files, and didn't find something effective. In
the end I created something on my own.
I am ready to release my code as open-source, but I would like to ask
your opinion first.

My code (which is based on daisydiff) does the following.

1. Takes as input an original HTML (pristine version)
2. Takes as input 1,2,3 or N modified files that are based on pristine version
3. Finds the differences for each file (daisydiff is used here)
4. Performs a merge of the N files into a SINGLE html file that
contains ALL changes present in the N documents.

The last step is of course the critical one (and contains most of my code)

Example 1 (trivial):
See screenshot simple-merge.png

Here two reviewers take the original file. One is adding some words at
the end of the sentence and the other replaces the first word.
The expected result as shown contains both changes in a single sentence

Example 2: (formatting changes)
See screenshot formatting-merge.png

My code can detect formatting changes (e.g. bold, italics, lists,
tables) and not only pure text. In that case it is smart enough that
it creates a superset of all tags affecting a text segment. For
example if one reviewer makes the text bold, and the other one makes
it italic
the result is text that is bold and italic as well.

As you notice in the screenshot the word "original" is both bold and
italics. See also the tooltip.

Example 3 (conflicts)
I have also created an alternative output mode where changes that
happen in the same position are shown as conflicts with a special
background colour. This is similar to conflicts in revision control
systems such as svn or cvs. This mode can be turned or or off with a
single switch.
See screenshot conflict-merge.png

Here I am using 3 reviewers (the code can take N reviewers really)

I am thinking of releasing this code either a separate google code
project or as part of DaisyDiff (if Guy permits it).
I will use the same licence (Apache)

What do you think?
Does anybody have an interest on this library?

If my examples were not clear, please say so and I will elaborate.

I am including as a zip file all the html files used in the examples.

Kostis

simple-merge.png
formatting-merge.png
conflict-merge.png
daisymerge.zip

Guy Van den Broeck

unread,
Jan 21, 2011, 1:28:17 PM1/21/11
to dais...@googlegroups.com
Hi Kostis,

Congratulations, I think it looks very cool. But I personally don't have a use for it (I also don't have a use for DaisyDiff anymore).
I'd be happy if you released it within the same project as DaisyDiff. I think both tools can benefit from the exposure the other one gets. And it's a good motivation to revamp the website.
But I'm also ok with it if you want it to be a seperate project.
 
Cheers,


2011/1/21 Kostis Kapelonis <kkap...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "DaisyDiff" group.
To post to this group, send email to dais...@googlegroups.com.
To unsubscribe from this group, send email to daisydiff+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/daisydiff?hl=en.


Kostis Kapelonis

unread,
Jan 7, 2013, 5:01:00 PM1/7/13
to dais...@googlegroups.com
Hello Paules

The code is not public yet. It needs major reworking and I also need
to remove some internal stuff. Unfortunately I don't have time for
this now. If you are patient I may release it in Summer 2013. But even
that is not certain since it is not only my call.

Kostis

On Mon, Jan 7, 2013 at 10:00 PM, Paules <pau...@gmail.com> wrote:
> Hi Kostis,
> I find this quite interesting. I am trying to track changes over different
> revisions of an Etherpad document. However, I have the problem that Etherpad
> creates revisions at every 3-4 seconds. So it's like every three characters
> of a user's input are in one revision. When I take a Daisy Diff, I only see
> those characters being changed. But I want my "change events" to be about 30
> seconds long such that the Diffs have more information for humans. If I
> merge the Events in the Etherpad database for the same user within a 30
> seconds span, it can be that another was writing during those 30 seconds
> too. Hence, I have interleaving events. When I take the Diff of the revision
> of t=0s and t=30s the changes of the other users appear too.
>
> Therefore, I am looking for something that merges two Diffs at the end, but
> does not highlight the changes of the other users. So imagine in your
> example that would be another Comment 1.2 "Bla bla. This is the original
> sentence that we wrote" which happened after Comment 1 and before Comment 2.
> In that case the changes of Comment 1 and 2 should appear like in your
> simple merge- example, but the result would be + "Bla bla. That is the
> original sentence that we wrote" without highlighting "Bla bla.".
>
> I am actually not merging events where people write in the same line. So I
> hope merging the two diffs would not lead to inconsistencies. I am not sure
> though. Is your code online somewhere? I would be very glad to look at it!
>
> Best regards
> Paules
> --
> You received this message because you are subscribed to the Google Groups
> "DaisyDiff" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/daisydiff/-/XgJqz9ZrHLwJ.

vaibhav shukla

unread,
Oct 1, 2013, 3:41:02 AM10/1/13
to dais...@googlegroups.com
Hi, this is great stuff. However, I was trying to find out a way if instead of conflicting merge, we can show the changes side by side in two different HTML report, one original, where the difference is highlighted with red, the other revised, where the revised changes are highlighted in green. Is there any way I could achieve this using DaisyDiff or DaisyMerge??  Or may be a toggle button, which toggles between red and green differences?? Please suggest if that is possible?

Santhosh Kumar

unread,
Jul 18, 2019, 12:21:04 PM7/18/19
to DaisyDiff
Hi kostis,   
The library which you designed is fabulous and congratulations!!.
I would like to use the library and i am curious to know that is it available for me?
Thanks.

Kostis Kapelonis

unread,
Jul 29, 2019, 5:51:20 PM7/29/19
to dais...@googlegroups.com
No, I never released it in public.

Customer never approved such action (it was a contract)

Kostis
> --
> You received this message because you are subscribed to the Google Groups "DaisyDiff" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to daisydiff+...@googlegroups.com.
> To post to this group, send email to dais...@googlegroups.com.
> Visit this group at https://groups.google.com/group/daisydiff.
> To view this discussion on the web visit https://groups.google.com/d/msgid/daisydiff/edaacac7-7dcb-428d-a2b7-621d9cbb6652%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Santhosh Kumar

unread,
Aug 23, 2019, 5:08:42 AM8/23/19
to dais...@googlegroups.com
Ok kostis.
Nice to get your response.
May i know how i can merge more than two files for html comparision.can you give me some hints or references to do.
I believe you will help me.
Thanks.
Reply all
Reply to author
Forward
0 new messages