[darcs-users] Fwd: Towards a conflict-free revision control system.

Trent W. Buck trentbuck at gmail.com
Wed Jan 21 01:09:30 UTC 2009


Kari Hoijarvi <hoijarvi at seas.wustl.edu> writes:

> Dan Pascu wrote:
>> On Friday 16 January 2009, Kari Hoijarvi wrote:
>>> For example whitespace formatting patches would simply go away.
>> Are you suggesting here to deliberately ignore explicit indentation
>> changes made by the user?
>
> Yes, in the sense that microsoft intentional programming environment
> did it'
>
> Program is stored as a tree, and the IDE pretty prints it, the way you
> choose to.

I believe Smalltalk and Factor do something like this.

To handle arbitrary source formats in this way (which is what Darcs
would need to do), you need two steps:

  - a READ procedure, which converts the working tree into a normal
    form.  For example, a C language READ might utilize gccxml, and a
    ReStructured Text READ would use rst2xml.

  - a SHOW procedure, which converts the internal representation (normal
    form) to something the user can edit without going insane.

Each user can then customize SHOW so that the working tree uses their
preferred "style", e.g. literal tabs vs. spaces.

This is a non-trivial task to implement.  In particular, if your READ
procedure has a bug, you can easily get completely screwed.  I spoke
once to someone who tried to use lint (with svn, IIRC) for this purpose,
and they discovered that it would break some of their more complex cpp
macros.



More information about the darcs-users mailing list