[darcs-users] Re: the readability of darcs native change format (was: Re: SchwernLikesDarcs SchwernHatesDarcs)

David Roundy droundy at abridgegame.org
Fri Apr 1 12:55:27 UTC 2005


On Sun, Mar 20, 2005 at 06:41:32AM +0100, Benedikt Schmidt wrote:
> Adding some markers for the start of a new hunk and of changes to a new
> file would be nice.
> 
> Looking for @,--- and +++ as in the output of diff -u is faster than
> looking for "hunk" and reading the filename.

Would a different colorization of new filenames be sufficient--perhaps new
filenames (i.e. when we change files) could be in red or green? I am more
comfortable marking things with colorization, so that what we output to the
screen is the same as the internal patch format.

Even this would be a bit of a pain, since darcs currently outputs each
primitive patch separately.  We'd have to make showComP check whether each
two consecutive patches modify the same file, and if that is the case,
print the second one without emphasizing its filename.  Which probably
means a second version of showPatch, or an additional boolean argument to
showPatch--or, I suppose, a Maybe FileName argument to ShowPatch.

> While there is some discussion about the diffs, is there something special
> about the darcs diff algorithm? It seems like the number of inserts and
> deletes is minimal and then some care is taken to minimize the number of
> hunks. I'm working on some performance improvements to the diff code and
> wondering if results mostly identical to gnu diff are ok. I got some diff
> code mostly running and I'm starting to replace Lcs.lhs and make_holey
> soon. Btw, I'm looking forward to the performance testing script.

The only fundamental issue with the diff generation is that if you do it
too weirdly a conflict resolution doesn't end up counting as a conflict
resolution.  This is really a problem with how darcs recognizes conflict
resolution, and isn't really either solved or solvable with smart diffing
code, we just make it less likely.  So in short, just try to make
nice-looking diffs.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list