clay: fix bug in %mate

If both sides changed a file in the same way, %mate used the version in
the mergebase, which is incorrect.  This changes it to use the version
in the destination desk.

An example of this issue:

    > +cat %/test/hoon
    /~zod/home/~2020.9.3..21.41.24..61ed/test/hoon
    first

    > |merge %scratch our %home
    >=
    merged with strategy %fine
    + /~zod/scratch/2/test/hoon

    > +cat /=scratch=/test
    /~zod/scratch/~2020.9.3..21.41.32..408c/test/hoon
    first

    > *%/test/hoon 'second'
    : /~zod/home/3/test/hoon

    > *%%%/scratch=/test/hoon 'second'
    : /~zod/scratch/3/test/hoon

    > |merge %scratch our %home
    >=
    %fine merge failed, trying %meet
    %meet merge failed, trying %mate
    merged with strategy %mate
    : /~zod/scratch/4/test/hoon

    > +cat /=scratch=/test
    /~zod/scratch/~2020.9.3..21.42.25..9e8b/test/hoon
    first
This commit is contained in:
Philip Monk 2020-09-03 14:34:30 -07:00
parent 67c5caada8
commit c7480c9b07
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ you're guaranteed to have exactly the files in the source commit plus
any files you separately added.
We speak of merging into a destination *desk* from a source *commit*
becaus while you can only merge on top of a desk, you can merge from
because while you can only merge on top of a desk, you can merge from
historical commits. For example,
|merge %old our %home, =cas ud+5, =gem %init

View File

@ -2453,7 +2453,7 @@
[%| %mate-conflict -]
=/ old=(map path lobe) :: oldies but goodies
%+ roll ~(tap by (~(uni by old.dal) old.dob))
=< .(old q.bas)
=< .(old q.bob)
|= [[pax=path ~] old=(map path lobe)]
(~(del by old) pax)
=/ [hot=(map path lobe) lat=(map lobe blob)] :: new content