darcs

Patch 1645 slightly relax the commute rules for adjacent hunks

Title slightly relax the commute rules for adjacent hunks
Superseder Nosy List bf
Related Issues
Status rejected Assigned To
Milestone

Created on 2018-02-16.00:14:05 by bf, last changed 2018-02-24.17:44:08 by bf.

Files
File name Status Uploaded Type Edit Remove
remove-redundant-seq-calls-in-d_p_prim_v1_commute.dpatch bf, 2018-02-16.00:21:46 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg19883 (view) Author: bf Date: 2018-02-16.00:14:05
The last patch is rather experimental and thus perhaps not yet for screened.

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

patch f02a51607d20219e29d5123f5773980f84e37d28
Author: Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
Date:   Thu Feb 15 17:04:10 CET 2018
  * remove redundant seq calls in D.P.Prim.V1.Commute
  
  All fields of type FileName are already marked as strict fields.

patch a5731cc96e7a077c6a6d23ed2dc97f64bf9b780f
Author: Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
Date:   Thu Feb 15 17:28:30 CET 2018
  * refactored commutation of hunks
  
  The new version is much more readable IMO.

patch 252b7f7894d0204ff919084354a6da6a86cccea7
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Feb 16 01:03:18 CET 2018
  * slightly relax the commute rules for adjacent hunks
  
  Where previously it was required that for the commute to succeed, none of
  the four intervals of hunk lines (added and removed lines for both
left and
  right hand side) must be empty, we now allow one of them to be non-empty.
Attachments
msg19884 (view) Author: bf Date: 2018-02-16.00:21:46
I made a mistake in the long comment for the last patch (last word
should be "empty", not "non-empty"). Attached a new amended bundle.
Attachments
msg19885 (view) Author: bf Date: 2018-02-16.00:41:17
I should mention that this can cause previous darcs versions to crash
when used with new repos where the relaxed rules have been used to pull
patches that previously would have caused conflicts but now no longer do so:

darcs: bug at src/Darcs/Patch/Depends.hs:373 compiled Feb 14 2018 22:47:21
Failed to commute common patches:
[...details omitted...]

This happened with two test repos with a common start patch and
different patches on top that currently conflict, but no longer conflict
with the relaxed rules. I successfully pulled from one repo to the other
using the relaxed rules, and then pulled with the current darcs in the
other direction.

This is unfortunate but unavoidable due to the way patches are
(currently, still) handled at the Repository level.
msg19890 (view) Author: ganesh Date: 2018-02-16.07:13:50
Definitely please don't screen the last one ("slightly relax the 
commute rules for hunks"): https://lists.osuosl.org/pipermail/darcs-
devel/2018-February/018538.html
msg19918 (view) Author: bf Date: 2018-02-24.17:44:06
Mark as rejected for now. I will put all my changes for a potential
darcs-3 format in a public repo on hub.darcs.net.
History
Date User Action Args
2018-02-16 00:14:05bfcreate
2018-02-16 00:19:39bfsetfiles: - remove-redundant-seq-calls-in-d_p_prim_v1_commute.dpatch
2018-02-16 00:21:46bfsetfiles: + remove-redundant-seq-calls-in-d_p_prim_v1_commute.dpatch
messages: + msg19884
2018-02-16 00:41:17bfsetmessages: + msg19885
2018-02-16 07:13:50ganeshsetmessages: + msg19890
2018-02-24 17:44:08bfsetstatus: needs-screening -> rejected
messages: + msg19918