darcs

Patch 1758 resolve issue2605: allow common patches to be non-consecutive

Title resolve issue2605: allow common patches to be non-consecutive
Superseder Nosy List bf
Related Issues
Status needs-screening Assigned To
Milestone

Created on 2018-11-03.16:39:53 by bf, last changed 2018-11-16.13:00:12 by bf.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt bf, 2018-11-16.11:28:01 text/x-darcs-patch
resolve-issue2605_-allow-common-patches-to-be-non_consecutive.dpatch bf, 2018-11-16.11:28:01 application/x-darcs-patch
unnamed bf, 2018-11-16.11:28:01 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg20436 (view) Author: bf Date: 2018-11-03.16:39:51
6 patches for repository http://darcs.net/screened:

patch 01fc5a5889e7c0e5b874134257197e777b771ff6
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Oct 31 17:02:56 CET 2018
  * extended test for issue2605

patch c786b747981ba0628a55bfe399f0c34c0e21da46
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Nov  1 17:16:24 CET 2018
  * accept issue2606: improve handling of dependency swaps

patch ea33e52a9e21100c435cae1968d7c40a4f8b8cea
Author: Ben Franksen <ben.franksen@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@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 46d2946cdfa1f4599b83ab56f070afa609c407a4
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov  2 13:57:32 CET 2018
  * fix numbering of patches in patch selection with hidden patches

patch ff4eb633aae94c20e020677d780882fcbba180fc
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov  2 17:49:34 CET 2018
  * remove common patches from all messages
  
  This adds another argument of type PatchPredicate to some calls which issue
  messages based on a list of selected patches. The argument is used to filter
  out the patches that should not be shown, usually patches common between
  remote and local repo.
Attachments
msg20446 (view) Author: bf Date: 2018-11-08.18:51:08
This bundle rebases the last patch to avoid a conflict with patch1742.

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

patch 01fc5a5889e7c0e5b874134257197e777b771ff6
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Oct 31 17:02:56 CET 2018
  * extended test for issue2605

patch c786b747981ba0628a55bfe399f0c34c0e21da46
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Nov  1 17:16:24 CET 2018
  * accept issue2606: improve handling of dependency swaps

patch ea33e52a9e21100c435cae1968d7c40a4f8b8cea
Author: Ben Franksen <ben.franksen@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@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 46d2946cdfa1f4599b83ab56f070afa609c407a4
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov  2 13:57:32 CET 2018
  * fix numbering of patches in patch selection with hidden patches

patch bb0b3667a9e4f33f282d2523c62dd98ed28cea9e
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov  2 17:49:34 CET 2018
  * remove common patches from all messages
  
  This adds another argument of type PatchPredicate to some calls which issue
  messages based on a list of selected patches. The argument is used to filter
  out the patches that should not be shown, usually patches common between
  remote and local repo.
Attachments
msg20449 (view) Author: bf Date: 2018-11-08.19:17:46
Once again last patch rebased to fix a bug in the push command where I
forgot to add a 'not'.

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

patch 01fc5a5889e7c0e5b874134257197e777b771ff6
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Oct 31 17:02:56 CET 2018
  * extended test for issue2605

patch c786b747981ba0628a55bfe399f0c34c0e21da46
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Nov  1 17:16:24 CET 2018
  * accept issue2606: improve handling of dependency swaps

patch ea33e52a9e21100c435cae1968d7c40a4f8b8cea
Author: Ben Franksen <ben.franksen@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@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 46d2946cdfa1f4599b83ab56f070afa609c407a4
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov  2 13:57:32 CET 2018
  * fix numbering of patches in patch selection with hidden patches

patch 6fa5efd31460f8cf0de00f344059d43b46791ed9
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov  2 17:49:34 CET 2018
  * remove common patches from all messages
  
  This adds another argument of type PatchPredicate to some calls which issue
  messages based on a list of selected patches. The argument is used to filter
  out the patches that should not be shown, usually patches common between
  remote and local repo.
Attachments
msg20454 (view) Author: bf Date: 2018-11-12.19:54:33
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@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@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@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.
Attachments
msg20468 (view) Author: bf Date: 2018-11-16.11:28:01
This is a full replacement bundle that contains yet another bug fix patch as
well as a patch that cleans up and extends the test script.

I have not rebased the original patch because I think it is pretty
instructive to study the two failures and how to fix them.

After using this version for some time I am now quite confident that
embracing and fixing merge by value is the right thing to do. While it adds
a bit of complexity in the UI to filter out common patches that cannot be
commuted to a common shared history, this is by far less than I originally
thought would be needed.

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

patch ea33e52a9e21100c435cae1968d7c40a4f8b8cea
Author: Ben Franksen <ben.franksen@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 46d2946cdfa1f4599b83ab56f070afa609c407a4
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov  2 13:57:32 CET 2018
  * fix numbering of patches in patch selection with hidden patches

patch e08759838bebe7cd0bf36440f7bdf6f3c09ff9a4
Author: Ben Franksen <ben.franksen@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@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.

patch 01fc5a5889e7c0e5b874134257197e777b771ff6
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Oct 31 17:02:56 CET 2018
  * extended test for issue2605

patch 6fa5efd31460f8cf0de00f344059d43b46791ed9
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov  2 17:49:34 CET 2018
  * remove common patches from all messages
  
  This adds another argument of type PatchPredicate to some calls which issue
  messages based on a list of selected patches. The argument is used to filter
  out the patches that should not be shown, usually patches common between
  remote and local repo.

patch 2ec71857d9cefc819af4b8b804b60251d9ae5a5c
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Nov 15 10:59:54 CET 2018
  * fix in test for issue2605

patch 273c53ee327748d7549403c3c55296d67f95b9db
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov 16 11:52:56 CET 2018
  * clean up, extend, and comment test for issue2605

patch d5a1b68dc420455eed6c4f6d6ae3e22107691669
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Nov 15 10:53:10 CET 2018
  * fix in mergeThem after resolving issue2605
  
  This procedure is used to update the unrevert bundle. It calls merge2FL
  which is now more sensitive to "unavailable" patches (i.e. those in the
  context of a bundle, for which we only have the meta data but not the
  content). This can lead to errors of the "Patch not stored in patch bundle"
  sort. The solution is to remove all context patches before we call merge2FL
  by using findUncommon instead of just taggedIntersection. Note that common
  patches that cannot be commuted to the common trunk are always included
  (with content) in a bundle; they are filtered out only when we apply it.
Attachments
History
Date User Action Args
2018-11-03 16:39:53bfcreate
2018-11-08 18:51:09bfsetfiles: + patch-preview.txt, extended-test-for-issue2605.dpatch, unnamed
messages: + msg20446
2018-11-08 19:17:46bfsetfiles: + patch-preview.txt, extended-test-for-issue2605.dpatch, unnamed
messages: + msg20449
2018-11-12 19:54:34bfsetfiles: + patch-preview.txt, resolve-issue2605_-allow-common-patches-to-be-non_consecutive.dpatch, unnamed
messages: + msg20454
2018-11-16 11:28:03bfsetfiles: + patch-preview.txt, resolve-issue2605_-allow-common-patches-to-be-non_consecutive.dpatch, unnamed
messages: + msg20468
2018-11-16 12:59:13bfsetfiles: - extended-test-for-issue2605.dpatch
2018-11-16 12:59:25bfsetfiles: - extended-test-for-issue2605.dpatch
2018-11-16 12:59:31bfsetfiles: - extended-test-for-issue2605.dpatch
2018-11-16 12:59:36bfsetfiles: - patch-preview.txt
2018-11-16 12:59:41bfsetfiles: - patch-preview.txt
2018-11-16 12:59:47bfsetfiles: - patch-preview.txt
2018-11-16 12:59:49bfsetfiles: - patch-preview.txt
2018-11-16 12:59:56bfsetfiles: - resolve-issue2605_-allow-common-patches-to-be-non_consecutive.dpatch
2018-11-16 13:00:01bfsetfiles: - unnamed
2018-11-16 13:00:08bfsetfiles: - unnamed
2018-11-16 13:00:10bfsetfiles: - unnamed
2018-11-16 13:00:12bfsetfiles: - unnamed