darcs

Patch 2307 obliterate: offer to revert conflicting unrecorded changes

Title obliterate: offer to revert conflicting unrecorded changes
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To
Milestone

Created on 2023-06-17.08:28:27 by bfrk, last changed 2023-07-16.09:25:22 by bfrk.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt bfrk, 2023-06-17.08:28:23 text/x-darcs-patch
use-doespathexist-from-system_directory-instead-of-darcs_util_path__same_.dpatch bfrk, 2023-06-17.08:28:23 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg23321 (view) Author: bfrk Date: 2023-06-17.08:28:23
3 patches for repository http://darcs.net/screened:

patch 8c7682ee7446c2738ac420bbe66b5db5546b4ca4
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Jun 29 08:14:05 CEST 2022
  * use doesPathExist from System.Directory instead of Darcs.Util.Path.<same>

patch 80c2b53a069361fab538e8caa8e5bdb06a58490d
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Jun 29 08:14:45 CEST 2022
  * cleanup code layout in src/Darcs/UI/Commands/Unrecord.hs

patch fe83947ff9dd659a87bfbf1e0fbb89993d31ad4b
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Jun 30 11:40:37 CEST 2022
  * obliterate: offer to revert conflicting unrecorded changes (if any)

  The new behavior is limited to interactive mode: instead of failing if the
  effect of the patches to be obliterated don't commute past unrecorded
  changes, we display (only) the conflicting unrecorded changes and ask the
  user if they want to revert them. If they refuse, the operation is
  cancelled.
Attachments
msg23579 (view) Author: ganesh Date: 2023-07-15.22:44:16
All fine.

>  * obliterate: offer to revert conflicting unrecorded changes (if any)

This is an interesting new behaviour for our UI (I think?) but it sounds
like it could be very convenient and hard for the user to do
efficiently themselves.
msg23581 (view) Author: bfrk Date: 2023-07-16.09:25:22
>>   * obliterate: offer to revert conflicting unrecorded changes (if any)
> 
> This is an interesting new behaviour for our UI (I think?) but it sounds
> like it could be very convenient and hard for the user to do
> efficiently themselves.

Some remarks:

First, sorry for the misleading  patch name. The unrecorded changes we are 
talking about actually don't conflict but /depend/ on (parts of the content 
of) the patch(es) to be removed.

Yes, finding out which of the unrecorded changes do so and which don't is 
hard to do manually while for Darcs it's the core business.

A patch that adds the same functionality for rebase suspend is in the queue.

In the opposite situation i.e. adding patches (apply/pull/unsuspend), where 
we may get actual conflicts with unrecorded changes, offering to revert them 
would be a possible alternative, too. We could even offer them one by one to 
the user and ask what to do for each such conflicting change. However, this 
would be superseded by interactive conflict resolution, which is something 
that has been on my wishlist for a very long time.

More generally speaking, whenever we are in interactive mode and darcs makes 
a suggestion or hint how to rectify/improve the situation, we should 
consider offering to do it for them instead.
History
Date User Action Args
2023-06-17 08:28:27bfrkcreate
2023-06-17 08:30:02bfrksetstatus: needs-screening -> needs-review
2023-07-15 22:44:16ganeshsetstatus: needs-review -> accepted-pending-tests
messages: + msg23579
2023-07-15 22:55:37ganeshsetstatus: accepted-pending-tests -> accepted
2023-07-16 09:25:22bfrksetmessages: + msg23581