UI discussions for revert --interactive and uncommit --interactive
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Fri May 22 17:50:53 CDT 2015
On 05/22/2015 05:37 PM, Laurent Charignon wrote:
> Hi,
>
> As you may have seen I worked on revert --interactive and soon I will
> send some patches for hg uncommit --interactive.
>
> Both these commands raise a UI question that I have been debating with
> marmoute and sid0.
> The --interactive session let your choose what changes are reverted.
> There is two main way to ask the question
> We wanted to have your thoughts on it, so I put a minimal example below
> with the two propositions.
> For the record, I want *proposition 1* and marmoute wants *proposition 2*
The way I phrase the two solutions is as follow:
1) Show the action revert will perform (current implementation),
2) Show the change revert will cancel,
Here is an example I find more complete as it show some of the "line
reordering" the diff reversion induces.
$ hg diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5469,5 +5469,5 @@ def resolve(ui, repo, *pats, **opts):
('C', 'no-backup', None, _('do not save backup copies of files')),
('i', 'interactive', None,
- _('interactively select the changes (EXPERIMENTAL)')),
+ _('interactively select the changes')),
] + walkopts + dryrunopts,
_('[OPTION]... [-r REV] [NAME]...'))
Solution (1) show action:
@@ -5469,5 +5469,5 @@ def resolve(ui, repo, *pats, **opts):
('C', 'no-backup', None, _('do not save backup copies of files')),
('i', 'interactive', None,
- _('interactively select the changes')),
+ _('interactively select the changes (EXPERIMENTAL)')),
] + walkopts + dryrunopts,
_('[OPTION]... [-r REV] [NAME]...'))
apply this change to 'mercurial/commands.py'? [Ynesfdaq?]
Solution (2) show change:
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5469,5 +5469,5 @@ def resolve(ui, repo, *pats, **opts):
('C', 'no-backup', None, _('do not save backup copies of files')),
('i', 'interactive', None,
- _('interactively select the changes (EXPERIMENTAL)')),
+ _('interactively select the changes')),
] + walkopts + dryrunopts,
_('[OPTION]... [-r REV] [NAME]...'))
revert this change of 'mercurial/commands.py'? [Ynesfdaq?]
a variant of Solution could be to turn the question around
Keep this change of 'mercurial/commands.py'? [yNesfdaq?]
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list