[Haskell-cafe] helping you contribute to darcs (poll results so far)

Jeremy Shaw jeremy at n-heptane.com
Wed Aug 6 14:28:58 EDT 2008

At Wed, 6 Aug 2008 10:48:03 +0100,
Ian Lynagh wrote:

> I've just had a quick read of
>     http://citeseer.ist.psu.edu/prakash92undoing.html
> AFAICS this only really deals with the case where there are no
> conflicts, and doesn't talk about merging.

AFAIK, the papers do not talking about merging.

They cover conflicts in the case where you want to remove/reorder an
older patch which conflicts with a newer one. But, they do not cover
conflicts happening during a merge.

Based on those papers, and no knowledge of how darcs actually works I
can only assume a merge works something like this:

 1. find the common patches in both repos and reorder them to be at
 the beginning.

 2. in some order apply the rest of the patches. When a conflict
 occurs, put some conflict markers in the file. 

Obviously, there are some big gaps in my understanding :)

It is my hope that the framework and lemmas in those papers could be
extended to include merging, etc. But, that assumes that the darcs
patch theory and their multiple selective undo are sufficiently
similar, which is beyond my knowledge.

I have implemented some of the ideas from those papers here:


Assuming the two systems are sufficiently similar, I would be
interested in extending it to support darcs style merging. It seems
like having a small (~200 lines) file which implements the core
concepts of darcs patch theory in simplified context might be a useful
way to learn about it ?

Since I don't know the darcs internals or patch theory, I don't have a
concept of how much is still missing (from those papers and my code),
and I am not sure what parts of the darcs patch theory are giving
people trouble. So, if this stuff is not valuable, I will not be
suprised. But, if it is at all valuable, I would feel stupid not
sharing it :)


More information about the Haskell-Cafe mailing list