[darcs-devel] complicated merger example...more confusion

David Roundy droundy at darcs.net
Tue May 10 05:11:04 PDT 2005


On Mon, May 09, 2005 at 12:56:22AM -0700, Tupshin Harper wrote:
> If somebody could walk me through how this set of patches is actually
> applied and why 3 rmfiles of the same file are not a problem, it would
> greatly help me bridge the gap between theory and practice.

Merger patches are a royal pain, and there's really no way of understanding
(for complicated ones) what they'll do without groking the unwind code in
PatchCommute.  Basically, the code tries (alas, not always successfully) to
reconstruct how the merger might have been created, and then unapply all
the involved patches.

I don't know that anyone but me understands this stuff, and it's buggy to
boot.  And I don't remember it very well, and am working to replace it with
something simpler (and less buggy, we hope).

The way to go about understanding mergers is to think about them in terms
of how they are/were created, which is pretty simple.  If you merge two
conflicting patches, you get a merger.  If you merge a lot of conflicting
patches, you get a really nasty-looking merger.  I guess you also have to
understand merger commutation, which isn't quite as hard as the unwind, but
isn't trivial either.

This merger would probably take me an hour to figure out, which I think is
an hour I'd be better off spending on the conflictors code (which will
replace the merger code--hopefully sooner rather than later).
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list