Patch 1622 add --not-in-remote option to unrecord command

Title add --not-in-remote option to unrecord command
Superseder Nosy List bf
Related Issues
Status accepted Assigned To

Created on 2017-10-16.22:56:00 by bf, last changed 2018-02-07.23:05:22 by bf.

File name Status Uploaded Type Edit Remove
add-__not_in_remote-option-to-unrecord-command.dpatch bf, 2017-10-16.22:55:59 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
msg19758 (view) Author: bf Date: 2017-10-16.22:55:59
When I made this change, I discovered that

(1) --not-in-remote suppresses some of the match options. I don't think this
    is what users expect (I was surprised that e.g. darcs obliterate
    --not-in-remote --last=2 offered me all 17 patches that are not in the
    default remote). I think it respects so called 'nonrangeMatches' i.e.
    -h, --matches, etc, and only suppresses 'rangeMatches' (e.g. --last,
    from-xxx) but that's just from looking at the code; it looks as if the
    nonrange matching options are handled by Darcs.UI.SelectChanges, whereas
    the other are done inside the commands themselves.

(2) --not-in-remote <remote-repo> does not work, you need to say
    --not-in-remote=<remote-repo> ('=' instead of space). I guess this is so
    because the argument is optional but it is a bit surprising and should
    be documented somewhere.

(3) obliterate, unpull, and unrecord are the only commands that support
    --not-in-remote. IMO commands like amend and rebase suspend should, too.
    This wold require factoring the code that handles the option into

2 patches for repository bf@hub.darcs.net:darcs-current:

patch 45cfb559ce861c6413889f190907aef059cc9731
Author: Ben Franksen <ben.franksen@online.de>
Date:   Mon Oct 16 18:46:06 CEST 2017
  * add --not-in-remote option to unrecord command

patch 08fe9497dd3fc64abe22efdf6e24308ec7887300
Author: Ben Franksen <ben.franksen@online.de>
Date:   Mon Oct 16 19:32:52 CEST 2017
  * streamline display of remote repos from --not-in-remote options
msg19843 (view) Author: gh Date: 2018-02-07.22:18:54
I agree with your points, especially the 3rd one about also protecting
public patches from being amended and rebased.

Meanwhile I'm accepting your bundle, seems correct.
msg19848 (view) Author: bf Date: 2018-02-07.23:05:21
I'll create an issue for the other points I raised, so we don't forget.
Date User Action Args
2017-10-16 22:56:00bfcreate
2017-10-29 19:36:13ghsetstatus: needs-screening -> needs-review
2018-02-07 22:18:54ghsetstatus: needs-review -> accepted
messages: + msg19843
2018-02-07 23:05:22bfsetmessages: + msg19848