[darcs-devel] [patch1911] WIP: use Prim patches in rebase toedit

Ben Franksen bugs at darcs.net
Sun Sep 15 17:58:42 UTC 2019


Ben Franksen <ben.franksen at online.de> added the comment:

>> The main problem was to adapt the V3 hack, where we have to insert an
>> inverse pair so that the conflictor we produce can refer to some
>> RepoPatchV3 in its past. The solution is create a RepoPatch and an
>> inverse RepoPatch with separate calls to fromAnonymousPrim. So these
>> patches aren't be inverses for RepoPatchV3, but the contained prims are:
>>
>> forceCommutePrim (p :> wq) =
>>   let rp = fromAnonymousPrim p
>>       irp = fromAnonymousPrim (invert p)
>>   in case mergerIdWDD (mergerIdNamed selfMerger) (irp :\/: wq) of
>>        wq' :/\: irp' ->
>>          prefixWith (rp :>: irp :>: NilFL) wq' :> invert (effect irp')
>>   where
>>     ... as before ...
>>
>> With this I can replace all (Invert p) constraints with (Invert (PrimOf
>> p)) and all the rebase tests succeed. I will send patches when I have
>> cleaned up my history.
> 
> Great. I think we can get this properly removed before we actually
> release, but getting this landed first seems most sensible.
> 
> Does a test fail if we don't have the inverse pair? Just to check we'll
> know if we remove it without actually fixing the problem.

It's been some time ago since I added the hack, I'll have to check...
yes, there is tests/rebase-apply.sh which for darcs-3 runs into an error
("autsch, hit the bottom", hehe).

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1911>
__________________________________


More information about the darcs-devel mailing list