[darcs-devel] [patch1844] fix a bug in darcs1->darcs-2 conversion (and 1 more)

Ben Franksen bugs at darcs.net
Fri Jun 28 18:36:57 UTC 2019


New submission from Ben Franksen <ben.franksen at online.de>:

Not for screened yet but please take a look.

The dependency on the second patch wasn't intended. If it hurts I can try
and rebase.

Also note that all the unit tests that have a "nontrivial xxx" condition and
are run for FLs fail now with a "Buggy use of unsafeCompare on FL" error. I
don't understand why they didn't do that before this patch. I see no way to
fix these conditions generically. The only solution I can see is to use
different conditions for the FL tests that don't use unsafeCompare.

2 patches for repository http://darcs.net/screened:

patch 6214e01928baab9123f03566f12d15e91d86c3f5
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Feb 26 23:29:10 CET 2019
  * fix a bug in darcs1->darcs-2 conversion
  
  The test data for threewayanddep threewayandmultideps were quite obviously
  wrong! The darcs-2 Conflictors are complete bogus, referring to patches that
  don't appear in the repo. This is caused by erroneous calls to
  sortCoalesceFL in the RepoPatchV1 implementation in unravel and in effect.
  The way these functions are normally used (effect when we apply a patch and
  unravel to generate conflict markup) is quite tolerant wrt coalescing.
  However, unravel is also used to convert darcs-1 Mergers to darcs-2
  Conflictors, and here the result is catastrophic. Instead of sortCoalesceFL
  we must merely cancel inverses, just like we do in the darcs-2 and darcs-3
  theory when we construct contexted patches (aka Nons).

patch abc332c0bda4d4ab622fb46319301e33c4a89d2f
Author: Ben Franksen <ben.franksen at online.de>
Date:   Fri Jun 28 20:25:32 CEST 2019
  * automatically specialize merging and equality for sequences of patches with identity
  
  The idea is to allow patch sequences to adapt their behavior depending on
  whether the patch type has an Ident instance or not. This is done for two
  reasons:
  (1) equality tests for, and removing elements from sequences of patches is
      much faster if we can use PatchIds;
  (2) merging sequences of patches with identity must first remove duplicate
      patches, otherwise these would be wrongly treated as conflicting.
  The new class Sequence abstracts over the basic operations we want to
  specialize for FL and RL: equality and removing elements. Similarly, class
  Merge gets a new method mergeFLs.
  By using the new DerivingVia extension we can derive the Sequence instances
  for patch types with an Ident instance from one template definition for a
  suitable newtype wrapper named HasIdent.
  The fastRemoveXXX functions are now gone from the Patch API and only used
  internally inside D.P.Ident, the ugly IdEq2 class could be fully removed.

----------
files: fix-a-bug-in-darcs1__darcs_2-conversion.dpatch, patch-preview.txt, unnamed
messages: 20875
nosy: bf
status: needs-screening
title: fix a bug in darcs1->darcs-2 conversion (and 1 more)

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1844>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 38453 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190628/f771a81e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-a-bug-in-darcs1__darcs_2-conversion.dpatch
Type: application/x-darcs-patch
Size: 85518 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190628/f771a81e/attachment-0003.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list