Eric Y. Kow writes:

 > Bram Cohen has come up with what he says is a better diff algorithm,
 > that it has made it into bazaar, and that he thinks all version control
 > systems should switch.
 > 
 > Any comments?  Is this relevant to us?

Ask Tom Lord <[EMAIL PROTECTED]> (IIRC), he's thought about different diff
algorithms it one heck of a lot, although mostly about diffs for
binary files.

It's definitely relevant for presentation purposes, which includes
merge output.  The point is that it gives diffs that make sense to
humans.

I'd try the ChangeLog test.  I suppose you've seen those ChangeLog
merges where the logs go "AX" vs "BCX" (each letter a log entry, X =
common rest of file).  You'd like a merge of the form

<<<<<<<
A
=======
B
C
>>>>>>>
X

But in an ordinary merge every blank line is taken as a match, so each
credit line is paired with another credit line, and sometimes, if
there are blank lines in the log itself, you'll get credit lines
paired with logs, and it's real ugly.  If Cohen's algorithm can give
better merges in that case, I would be very impressed.

It sounds like it does a noticably better job, worth investigating.
Something that somebody who is learning Haskell could use as a live
exercise in implementation. :-)

For patch theory purposes, though, AIUI Darcs does something quite
different.
_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to