[darcs-devel] [patch1911] WIP: use Prim patches in rebase toedit

Ganesh Sittampalam bugs at darcs.net
Sat Sep 21 20:36:00 UTC 2019


Ganesh Sittampalam <ganesh at earth.li> added the comment:

Here's my latest draft. I've got the types we want to end up
with and most of the implementation roughly done - I don't
think finishing it will be too much more effort though it'll
need cleaning up/documenting as well.

The broad outline is

- switch ToEdit to use prim

- use prim as the parameter type for all rebase types

- a bunch of incremental refactorings to modularise the
  functionality of D.P.R.Item.simplifyPush - this is
  one of the core bits of functionality of rebase and is
  currently quite monolothic. I wanted to make sure that
  the core logic is clearly exposed and easy to read, and
  that I can reassemble the pieces differently to
  implement simplifyPush for a different type.

- make the internal patch type of rebase be RebaseChange
  instead of RebaseItem. This goes through surprisingly
  smoothly.

- switch RebaseChange from
    FL (RebaseFixup prim) :> Named prim
  to
    FL RebaseName :> Named (RebasePatch prim)

    RebasePatch = FL prim :> prim - I didn't yet go through
    and wrap the fixups with a new 'Fixup' type. I also
    didn't convert everything yet but most of the tricky
    bits look ok.


TODO:
 - finish off the RebasePatch implementation
 - integrate with fullUnwind
 - backwards compatibility
 - add haddocks etc
 - finalise names, design etc

I plan to leave this for a bit now so we can talk about the design.

In the meanwhile I have a bunch of small unfinished things in the
patch tracker to finalise, and there are also some refactorings/
cleanups in this bundle that could be pulled out independently.

19 patches for repository darcs-unstable at darcs.net:screened:

patch cf6355b601d19d124dc561103950e47f76094619
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 20 22:48:04 BST 2019
  * WIP: Use Prim patches in rebase suspended patches
  
  This change is backwards compatible with the on-disk
  rebase format for unconflicted patches because each
  RepoPatch type just saves unconflicted patches without
  any wrapping.
  
  However it breaks the existing cases where suspending
  a conflicted patch does work (as well as reading those
  cases from disk.)

patch d57d7d85b5bee97ef768658004965cc70c7e182a
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 20 23:46:47 BST 2019
  * WIP: convert Rebase types to have a prim parameter directly

patch e0114d8246103f52e9479d8367d7e1d6898fb55b
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 00:29:21 BST 2019
  * add comment about safety of commuteNamePrim/commutePrimName

patch d5cf16c552d2ec5e682db76e163bd1b0c780b15f
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 00:35:33 BST 2019
  * get rid of the PrimPatchBase superclass for Summary
  
  It sort of makes sense in theory, especially given that
  the type of conflictedEffect mentions PrimOf, but in
  practice it infects instances in unpleasant ways.

patch 540181afa768399fe24173d2a6ca742b5a36f49e
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 00:37:22 BST 2019
  * remove embedded PrimPatch constraint from PrimFixup
  
  I think it dates from a time when the encoding of rebase
  required it to be there, but it's not needed any more and
  we can just put smaller constraints at use sites instead.

patch e7323eb0a0bd9a3881aa7764b3bb5856f1295cbe
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 13:48:17 BST 2019
  * WIP: refactor simplifyPush

patch a4cbbd0caffeb7657be0ccde4b90f81c5086aa2c
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 13:48:22 BST 2019
  * drop redundant case

patch d04d10030c1c6fa110a6bfdce20cd56d28789bd0
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 13:48:26 BST 2019
  * drop error in commuteNameNamed if a deleted name is readded
  
  As in D.P.R.Item.pushFixupItem, this scenario isn't impossible
  so should just be a failed commute rather than an error.
  

patch f699ba0326e63229d2dc987662fc884ba16c58e0
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 13:48:29 BST 2019
  * reuse commuteNameNamed to push RebaseName through ToEdit

patch ceb0cb54a3d033d012b06be7bb96fc664a04d443
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 13:57:03 BST 2019
  * move logic for pushing name fixups to D.P.R.Name

patch f6b32b1913e37d6f900fcb7e361049235fd19a82
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 14:14:17 BST 2019
  * move logic for pushing prim fixups to D.P.R.Fixup

patch 2585a2ecd030cb05a2d67317335d1b07c28cb9f3
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 14:50:07 BST 2019
  * reorder cases

patch 5240342a5128433e463470b6b38e38fd0b52a84a
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 14:55:42 BST 2019
  * move logic for pushing past fixups into D.P.R.Fixup

patch 91dfc515fdc9a0b1ad29a52daec0b46d87a75d0d
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 15:07:41 BST 2019
  * rename D.P.R.Viewing to D.P.R.Change
  
  Now that it contains one major type the name makes more sense, and the
  functionality in this module was never solely about Viewing anyway.

patch 4c6b3dfd1ebf26747e697c78284feef8afccf5dc
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 15:59:33 BST 2019
  * use commuteFixupNamed in pushFixupItem

patch 689e6c2f67395aa54d4cd7697ab5fe389e55c7d6
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 17:26:34 BST 2019
  * WIP: change internals of Suspended

patch 9597c0237676f9617e217eeaa6d15969008e46eb
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 18:01:21 BST 2019
  * simplify rcToPia

patch 83042e6084451fb2f49d3b7d93ef410d8bfa0dad
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 19:09:12 BST 2019
  * commuteNamedFixups = commuterIdFL commuteNamedFixup

patch 9277c36f232cd4b8ccd6eb3cbed86e970c4d860a
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 21 20:56:53 BST 2019
  * WIP: RebasePatch

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1911>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 80415 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190921/746da337/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wip_-use-prim-patches-in-rebase-suspended-patches.dpatch
Type: application/x-darcs-patch
Size: 98240 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190921/746da337/attachment-0003.bin>
-------------- next part --------------
.






More information about the darcs-devel mailing list