This is the first half of fixing issue2727. It fixes only errors in the
underlying RepoPatchV3 conflict resolution, but the generalized test for
propResolutionsOrderIndependent will also catch more bugs for Named patches.
3 patches for repository https://darcs.net/screened:
patch d0757eecafa1cc633587bbe572dae8c412dfca26
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Jun 16 18:34:08 CEST 2024
* fix/generalize propResolutionsOrderIndependent
It now tests the property (as it should) on a pair of mergeable RLs, whereas
before we fixed the context (the first sequence) to be empty.
The generator for the pair requires a wrapper type so we can generate a
split point for the sequence i.e. a random number between 0 and the length
of the sequence. This wrapper then needs various instances which are mostly
trivial but nevertheless tedious to implement.
Note that the simpler method of directly generating a pair of
MergeableSequences is /not/ general enough, and indeed does not catch the
kind of errors we want to guard against. This is because it confines
conflicts to each sequence, whereas we need them to spread over both sides
of the split.
patch d38f51fd0604df5b79bbd943eec6137a3d5cc52e
Author: Ben Franksen <ben.franksen@online.de>
Date: Mon Jun 17 10:15:46 CEST 2024
* bugfix in Darcs.Patch.V3.Resolution.findComponents
The error causes propResolutionsOrderIndependent to fail and also generates
more conflict markup than wanted, in in the case of a non-empty context. the
point is that we should /not/ add conflicts contained in the patch under
consideration to our todo set if we have exhausted the patches in the
trailing "interesting" segment and the patch under consideration is in the
"context". We regard those as uninteresting, either because they are not
"new" conflicts e.g. when pulling, or because we consider conflicts
contained in them as already resolved e.g. due to explicit dependencies.
patch 5e21c4bdb15498be6227f06a9fdf8723b3736be2
Author: Ben Franksen <ben.franksen@online.de>
Date: Mon Jun 17 18:42:07 CEST 2024
* two regression tests related to issue2727
These contain no --add-deps and thus guard against errors in the RepoPatch
implementations of resolveConflicts. One of them fails for darcs-1 patches
and is therefore skipped (I can't be bothered to even look at the
RepoPatchV1 code anymore, much less make any changes to it).
Attachments
|