<div dir="ltr"><br><br><div class="gmail_quote">On Fri, May 22, 2015 at 3:51 PM Pierre-Yves David <<a href="mailto:pierre-yves.david@ens-lyon.org">pierre-yves.david@ens-lyon.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 05/22/2015 05:37 PM, Laurent Charignon wrote:<br>
> Hi,<br>
><br>
> As you may have seen I worked on revert --interactive and soon I will<br>
> send some patches for hg uncommit --interactive.<br>
><br>
> Both these commands raise a UI question that I have been debating with<br>
> marmoute and sid0.<br>
> The --interactive session let your choose what changes are reverted.<br>
> There is two main way to ask the question<br>
> We wanted to have your thoughts on it, so I put a minimal example below<br>
> with the two propositions.<br>
> For the record, I want *proposition 1* and marmoute wants *proposition 2*<br>
<br>
The way I phrase the two solutions is as follow:<br>
<br>
1) Show the action revert will perform (current implementation),<br>
2) Show the change revert will cancel,<br></blockquote><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Here is an example I find more complete as it show some of the "line<br>
reordering" the diff reversion induces.<br>
<br>
   $ hg diff<br>
   --- a/mercurial/commands.py<br>
   +++ b/mercurial/commands.py<br>
   @@ -5469,5 +5469,5 @@ def resolve(ui, repo, *pats, **opts):<br>
        ('C', 'no-backup', None, _('do not save backup copies of files')),<br>
        ('i', 'interactive', None,<br>
   -            _('interactively select the changes (EXPERIMENTAL)')),<br>
   +            _('interactively select the changes')),<br>
        ] + walkopts + dryrunopts,<br>
        _('[OPTION]... [-r REV] [NAME]...'))<br>
<br>
<br>
Solution (1) show action:<br>
<br>
   @@ -5469,5 +5469,5 @@ def resolve(ui, repo, *pats, **opts):<br>
        ('C', 'no-backup', None, _('do not save backup copies of files')),<br>
        ('i', 'interactive', None,<br>
   -            _('interactively select the changes')),<br>
   +            _('interactively select the changes (EXPERIMENTAL)')),<br>
        ] + walkopts + dryrunopts,<br>
        _('[OPTION]... [-r REV] [NAME]...'))<br>
<br>
   apply this change to 'mercurial/commands.py'? [Ynesfdaq?]<br>
<br>
<br>
Solution (2) show change:<br>
<br>
   --- a/mercurial/commands.py<br>
   +++ b/mercurial/commands.py<br>
   @@ -5469,5 +5469,5 @@ def resolve(ui, repo, *pats, **opts):<br>
        ('C', 'no-backup', None, _('do not save backup copies of files')),<br>
        ('i', 'interactive', None,<br>
   -            _('interactively select the changes (EXPERIMENTAL)')),<br>
   +            _('interactively select the changes')),<br>
        ] + walkopts + dryrunopts,<br>
        _('[OPTION]... [-r REV] [NAME]...'))<br>
<br>
   revert this change of 'mercurial/commands.py'? [Ynesfdaq?]<br>
<br>
a variant of Solution could be to turn the question around<br>
<br>
   Keep this change of 'mercurial/commands.py'? [yNesfdaq?]<br>
<br>
--<br>
Pierre-Yves David<br>
_______________________________________________<br>
Mercurial-devel mailing list<br>
<a href="mailto:Mercurial-devel@selenic.com" target="_blank">Mercurial-devel@selenic.com</a><br>
<a href="http://selenic.com/mailman/listinfo/mercurial-devel" target="_blank">http://selenic.com/mailman/listinfo/mercurial-devel</a><br>
</blockquote></div></div>