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

Ganesh Sittampalam bugs at darcs.net
Thu Sep 12 17:26:18 UTC 2019


Ganesh Sittampalam <ganesh at earth.li> 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.

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


More information about the darcs-devel mailing list