[darcs-devel] [issue2683] push --force (or --obliterate or --clone)

Ben Franksen bugs at darcs.net
Fri Sep 10 09:08:07 UTC 2021


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

Attached is a patch that implements apply --mirror, including a small 
test script. This is WIP as there is no warning yet, and no way to 
interactively select the patches to obliterate.

It occurred to me that this idea could be generalized to provide user-
selectable merge strategies. Given a set of patches to apply (them) and 
an existing set (us), with all common patches already removed, we could 
offer:

 - default: standard merge, possibly resulting in conflicts,
   details depend on --mark-conflicts/--allow-conflicts/...
 - mirror: replace us with them (this one)
 - remove-conflicting: remove only our conflicting patches
 - suspend: suspend all our existing patches
 - suspend-conflicting: suspend (only) our conflicting patches 
 - skip-conflicting: add only their non-conflicting patches

The versions wich suspend or remove existing patches in the target repo 
could support interactive selection, possibly resulting in a "mixed 
mode" strategy, where we first obliterate or suspend the selected 
patches and then fall back to the default merge for the rest.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2683>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wip-first-preliminary-implementation-of-apply-__mirror.dpatch
Type: application/octet-stream
Size: 4518 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20210910/05c88205/attachment.obj>


More information about the darcs-devel mailing list