UI discussions for revert --interactive and uncommit --interactive

Martin von Zweigbergk martinvonz at google.com
Fri May 22 18:01:26 CDT 2015


On Fri, May 22, 2015 at 3:51 PM Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:

>
>
> 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,
>

When reverting to another revision (picking pieces from that other
revision), I'm quite sure I want 1). And, therefore, I think I want 1) in
all cases for consistency.


>
> 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
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150522/1c83681d/attachment.html>


More information about the Mercurial-devel mailing list