[darcs-devel] [patch1758] resolve issue2605: allow common patches to be non-consecutive

Ben Franksen bugs at darcs.net
Mon Nov 12 19:54:34 UTC 2018


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

This is an additional bundle that adds a bug fix patch.

The bug in question manifests as a failure of the "Patch not stored in patch
bundle" sort when applying a patch bundle that has common patches in the
context in a different order than in the repo where we apply the bundle. The
bug was introduced by

  * resolve issue2605: allow common patches to be non-consecutive

in which I re-implemented findCommonWithThem in terms of the more general
findCommonAndUncommon. This is okay but one has to make sure that the third
component of the Fork returned by findCommonAndUncommon is produced lazily,
so that we don't try to commute the common patches from the bundle, of which
we have only the PatchInfo and not the content.

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

patch ea33e52a9e21100c435cae1968d7c40a4f8b8cea
Author: Ben Franksen <ben.franksen at online.de>
Date:   Wed Oct 31 18:48:53 CET 2018
  * resolve issue2605: allow common patches to be non-consecutive
  
  The basic functionality is fully implementated. In particular, patch
  selection does not offer common patches to the user; they are silently
  marked as "undecided" i.e. are included in the selection if required by
  dependencies. Common patches still appear in some of the messages displayed
  to the user. This will be fixed in another patch. It is now painfully
  obvious that we need a more efficient way to represent sets of patch names,
  which is (still) done using lists and linear search.
  
  The test for issue1879 has been removed because it is no longer valid and
  its (invalid) fix has been reverted by this patch. I will re-open the issue.

patch e08759838bebe7cd0bf36440f7bdf6f3c09ff9a4
Author: Ben Franksen <ben.franksen at online.de>
Date:   Wed Oct 31 20:40:00 CET 2018
  * use Data.HashSet for sets of PatchInfos
  
  This adds a dependency on unordered-containers which I think is justified.
  Note that comparing PatchInfo is expensive, which makes an array mapped trie
  a much better option than a balanced tree based container like Data.Set.

patch 9107fcbc0aff1f20c7314c9f8d641995eca72a23
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Nov 12 20:30:44 CET 2018
  * fix a subtle bug in findCommonAndUncommon
  
  This became an issue only because findCommonWithThem is now implemented in
  terms of findCommonAndUncommon. This was a rather subtle laziness bug, so I
  added a detailed explanation in a comment.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1758>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 33196 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20181112/cb006266/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resolve-issue2605_-allow-common-patches-to-be-non_consecutive.dpatch
Type: application/x-darcs-patch
Size: 59964 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20181112/cb006266/attachment-0003.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list