[darcs-devel] force-commute

Ganesh Sittampalam ganesh at earth.li
Fri Nov 3 07:59:23 UTC 2017


On 02/11/2017 17:06, Benjamin Franksen wrote:
> On 11/02/2017 01:50 PM, Ben Franksen wrote:
>> Then how can we present to the user the combined conflicts of
>>
>>     [p,{/p⁻¹},/q] [q,{q\q⁻¹},q\p]
>>
>> ?

Intuitively, shouldn't the repository be conflict-free if it contains
both those conflictors? If they were reordered it certainly would be
conflict-free, and we like darcs repos to be invariant under commutation.

But then what happens if someone resolved the first conflict already
with a resolution patch 'r', and only then pulls in the second
conflictor. You'll get merge(r, [q,{q\q⁻¹},q\p]) which is likely to be a
mess.

In general, even if we have a perfectly behaving conflictor algorithm,
handling of conflicts is messy. Consider the following

We have patches a1, a2 and b, where a1 and b conflict and a2 depends on a1:

a2
  \
   \
   a1     b

Someone merges a1 and b (without a2 being present) and resolves with
'r1', with the "base" of the conflict containing neither a1 nor b:

a2     r1
  \   / \
   \ /   \
   a1     b

Now they pull in a2 and need to resolve again. We'd like the base of the
new conflict to contain a1, but it doesn't because a1 is still
considered to be in conflict and is undone by the relevant conflictor.

Ganesh


More information about the darcs-devel mailing list