[darcs-users] break line, combine lines, add/delete whitespace as patch primitives?

Adam Megacz adam at megacz.com
Wed May 5 10:28:37 UTC 2004

Kevin Smith <yarcs at qualitycode.com> writes:
> That would work if darcs could automatically detect that it should use
> one of the new primitive types. I don't think they would be helpful if
> they required manual operation like the token-replace patch does.

Clearly.  But it's unambiguous -- Darcs should use the simplest diff
possible, where "add linebreak" or "remove linebreak" is "simpler"
than deleting two lines and adding one (or deleting one and adding

> As an alternative for this case, what about being able to treat a file
> as a stream of "words", rather than a stream of lines? I'm not sure
> exactly what the delimiters would be, or how this mode would be
> chosen, but this would certainly benefit many text files.

This starts moving closer to the tree transform.  Ideally (if we all
had infinite time to spend implementing this stuff) you could give
darcs a grammar for C++ and it would understand that adding
parenthesis around an expression that doesn't need them is a "benign"
change that could be ignored (or better yet, re-ordered) if it caused
a conflict with a non-benign change.

  - a

More information about the darcs-users mailing list