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
Darcs.Patch.Match.
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
Attachments
|