[darcs-users] Internals question: How to apply a merger patch?

David Roundy droundy at abridgegame.org
Sat Dec 6 14:49:18 UTC 2003


On Fri, Dec 05, 2003 at 11:54:15PM -0800, Kevin Smith wrote:
> And for the first merger patch that I hit, it seems to be true. However, 
> for the merger patch in "Let_us_make...", darcs seems to have put them 
> in the opposite order. I base this statement on way that the following 
> patch (named "Resolve_merge...") resolves the conflict. It removes all 
> the lines from the upper part of the conflict notice, which would be the 
> lines associated with the line 107 patch that didn't already remove them.
> 
> Any ideas?

in mangle_unravelled_hunks there is a second sort:

        case sort $ map (make_chunk l) newfs of

which is probably what's throwing you off.  The order of the conflict
markers isn't the order of the patches, but is instead determined by the
ordering of the actual text that will be put in the markers.  So the
ordering would be something like:

vvv
a
**
a
a
**
aa
**
bb
**
bba
^^^

> One other quick question: For simple hunk/hunk mergers like these, can I 
> just treat 0.0 and 0.9 mergers exactly the same?

No, 0.0 and 0.9 mergers are (almost?) always different.  Fortunately the
0.0 merger is quite easy (as you will see when you get to it) compared to
the 0.9 merger.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list