[darcs-devel] [patch2002] tests: always use prim patches for gener... (and 8 more)

Ganesh Sittampalam bugs at darcs.net
Tue Feb 25 23:06:07 UTC 2020


Ganesh Sittampalam <ganesh at earth.li> added the comment:

On 24/02/2020 07:57, Ben Franksen wrote:

>>   * introduce concept of unwinding a conflict
> 
> I may be wrong, but to me these two statements contradict each other!
> Apparently we do have to commute context prims past if that is possible,
> which pretty strongly suggests that the context has to be minimal, at
> least with respect to commutation.

Yes, good point. I wrote the first comment before updating the code and
forgot about it. I've now rewritten it with a statement about the invariant.

The context isn't actually minimal with respect to commutation because
we can't remove things from it just because they commute: if we commute
them past the underlying they just end up in the other context. So in
the end we have to pick one. I did actually experiment with a structure
that stored the items that commute with the underlying in both contexts
(i.e. essentially caching both sides of the commutation), but it didn't
work out well.

But it is minimal with respect to cancellation of inverses.

> Can you simplify the examples with a few helper functions? E.g.
> 
> mkNamed hash = NamedP (rawPatchInfo "" "" "" ["Ignore-this: "++hash]
> path s = AnchoredPath [unsafeMakeName s])

Good idea, done.

----------
title: introduce unwind -> tests: always use prim patches for gener... (and 8 more)

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


More information about the darcs-devel mailing list