[darcs-devel] Any answers for IsiSetup's concerns?

David Roundy daveroundy at gmail.com
Sat Dec 22 14:26:13 UTC 2007

On Dec 21, 2007 8:30 PM, John Meacham <john at repetae.net> wrote:
> I always thought it would be nice if darcs could have primitive objects
> that were more interesting than the flat file.
> Like, you could have a 'set' which is represented on disk as a file with
> one element per line, where darcs knows that its contents are a simple
> line delimited set (in the matchematical sense) and the actual ordering
> of the lines, or duplicate entries don't matter. so patches that simply
> add the same value, or reorder lines, or delete the same value can be
> treated intelligently rather than just marked as conflicting or adding
> duplicate entries (or erronious single ones).
> I am not sure if I am interested in this feature for theoretical or
> practical reasons...

I agree that this sort of thing would be fun, but I think it'd be
nicer (maybe just from a code standpoint) to treat the objects as
files, but have more interesting patch types.  I think it's an
important user-interface feature that the files in any identical
repository are identical, so I'd amend your set to be a *sorted* set.
We could definitely have "set" patches that add or remove elements
from a sorted set.  These would commute with each other much more
easily than hunk patches, and would achieve much of what you describe.
 Whether they would actually be useful, I don't know.  Most often when
we want something like that, what we really want is for *part* of a
file to be treated as an ordered set (e.g. lists of files in a
makefile), and I'm not so certain how nicely that would behave.

I definitely hope after darcs 2 is out to have a chance to play with
more interesting patch types.  I'll start out with just a
character-oriented chunk patch (like hunks, but with characters),
which I suspect will be more friendly when working on LaTeX files than
line-based hunks.


More information about the darcs-devel mailing list