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

Ganesh Sittampalam bugs at darcs.net
Mon Sep 30 14:28:02 UTC 2019


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

Here's an updated draft of the rebase refactoring.

The functionality is mostly there in that most rebase
tests pass, including issue2634-rebase-conflicted-patches
for Darcs2 and Darcs3.

There are some expected failures of any tests that rely
on upgrade, and unexpected failures in rebase-skip-conflicts
and in issue2634 for Darcs1.

I haven't actually tried running it at all to see if it
behaves sanely outside the tests :-)

You'll notice I've added a new type SimpleConflict (in
Darcs.Patch.Rebase.Conflict) which is used to communicate
the conflicts in a rebase when unsuspending. I am not yet
very confident about the full implementation details of
that.

The relationship between SimpleConflict and RebasePatch
throws up an interesting point about the relationship between
rebase and conflicts that I hadn't fully grasped before.
When we work with a rebase, we use fixups to keep everything
in a single linear sequence. But conflicts in Darcs are
fundamentally designed to shunt them off to the side, which
means you actually need quite a bit of rearranging when
translating between the two. We see that both in fullUnwind,
and in D.P.R.Conflict.forceCommutePrimSC.

I did wonder about producing something that returns the
same output was standardResolution directly, rather than
going via SimpleConflict, but didn't pursue it. Perhaps it
would simplify things. But given we have a goal of getting
some patch into the repo that will allow "darcs mark-conflicts"
to reproduce the unsuspend conflicts, my feeling was that
it might be going in the wrong direction.

BTW please ignore D.P.R.Conflict.toSimpleConflict, it's
not used.

Still to do:
 - backwards compatibility
 - rework fullUnwind as discussed elsewhere
 - decide on whether we actually need/want RebasePatch
 - add haddocks etc
 - finalise names, design etc. I particularly don't like
   RebasePatch as a name, though I don't have a better one.
 - fix reify, inject (reify isn't completely fixable with
   RebasePatch, it'll only work if all the fixups can go
   to the start)
 - no doubt lots of other things I've forgotten

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

patch a1f99e396271c01ca4e862ee4a6215bdee6d4ef7
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 21:45:03 BST 2019
  * cut back some constraints in D.P.R.Change

patch f256835edb5d55dc583cc6e19ceb1fc02f826e87
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 22:35:31 BST 2019
  * WIP: use RebaseChange inside Suspended

patch 9e561e97b8856a98e30cf9cec0421750f0278efe
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Sep 28 09:30:39 BST 2019
  * WIP: change interface to updatePatchHeader

patch 2310d46db25c57f3b8a880b0613ac95ce93ac3eb
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 16:40:23 BST 2019
  * WIP: introduce concept of unwinding a conflict
  
  This provides a generic way to get at the underlying
  primitive patch in the conflict.

patch a52c59da4a28f1c7a4c17f7712003d63816985d0
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sun Sep 29 17:37:34 BST 2019
  * update comment

patch b4294ebbb0feb4e910bad1eaf3c322a99e3ff17b
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sun Sep 29 22:04:32 BST 2019
  * WIP: use Named prim inside rebase
  
  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 7de1305aff986302cb8ba233d331a8a1af50022d
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sun Sep 29 22:12:47 BST 2019
  * WIP: SimpleConflict

patch 3076f0552700406334dfdcd13cee5eb0dea00f51
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sun Sep 29 22:12:49 BST 2019
  * WIP: extract pushThrough from D.P.R.Viewing

patch a1e94576db54b10e0d953821b5cf6acdc13d826a
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 06:24:19 BST 2019
  * WIP: use SimpleConflict to unsuspend

patch a5cd002e2dbb87527ee35ca5ab4c538b98cdb759
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 06:30:03 BST 2019
  * reindent

patch 8b15f0129e8f446d95fa8aa6b259e81cb7ddf6d5
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 07:10:32 BST 2019
  * read/show for RebaseChange

patch 15726eaabf9c4c79b36acb9567fcd6fcf8f26dc1
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 11:01:41 BST 2019
  * move SimpleConflict to Rebase

patch edfc64cdd144b8499647d54f4c2f58ebccf58271
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 11:03:26 BST 2019
  * more forceCommutePrimSC etc to Rebase.Conflict

patch c11bd89d0fa3033384e1243a384970b7f53cb7f1
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 11:06:36 BST 2019
  * treat forceCommutePrimSC as a PushFixupFn

patch de8283374f70e583e5a077bb456d587bd99b3e54
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 11:09:49 BST 2019
  * forceCommute with SimpleConflict can return a Maybe

patch f4caa4251106675da49d7d01f0678d95511e06e3
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 11:18:53 BST 2019
  * use PushFixupFn for more forceCommutes

patch 7ceecf65284de90f893651415ffa8684c1482717
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 11:27:42 BST 2019
  * move WithDroppedDeps to D.P.R.Name

patch a7b6ea29a37f0609f85e33711f01a7bae7bba981
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 11:28:33 BST 2019
  * use noDroppedDeps in extractRebaseChange

patch 30b685b7f3fee2a6a444e83ee9002abc626a4627
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 11:29:27 BST 2019
  * rename extract/reifyRebaseChange to be plural

patch d0eb9c02eec658a5ca600f0a12d19934bb74eb69
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 11:47:55 BST 2019
  * use pushFixup infrastructure for forceCommutess

patch 70f5d6a7be708ea6d9e9ae7213c0e9ce60b2a85a
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 12:39:38 BST 2019
  * drop now-irrelevant comment

patch 087c9b50d0d33190d253b0b112a14bb2f3ded51c
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 13:01:39 BST 2019
  * drop unused fromRebaseChange

patch dc0310c573f241231f1abf7d7e24190715d89b25
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 14:04:29 BST 2019
  * restructure extractRebaseChanges a bit

patch 772635b734c45f049a0c51b2068cf0e59c4ac435
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep 30 15:11:29 BST 2019
  * introduce 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: 99932 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190930/f93b6f7e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cut-back-some-constraints-in-d_p_r_change.dpatch
Type: application/x-darcs-patch
Size: 119644 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190930/f93b6f7e/attachment-0003.bin>
-------------- next part --------------
.






More information about the darcs-devel mailing list