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

Gilles Moris gilles.moris at free.fr
Sat May 23 02:16:34 CDT 2015

Le 23/05/2015 01:18, Durham Goode a écrit :
> On 5/22/15 4:01 PM, Martin von Zweigbergk wrote:
>> On Fri, May 22, 2015 at 3:51 PM Pierre-Yves David 
>> <pierre-yves.david at ens-lyon.org 
>> <mailto: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.
> 'commit -i' currently indicates the actions that will be applied to 
> the commit.  I think it makes sense to have revert/uncommit/etc work 
> the same way for consistency (i.e. #1).
> You can think of it as requiring less mind-state for the user.  If I 
> sat down at a terminal that had the crecord UI already open, with #1 I 
> know that I need to select the lines that show the changes I want 
> (regardless of if this was a commit, revert, whatever).  With #2 I 
> have to be aware that this is a revert and that what I'm seeing is 
> actually me choosing things I don't want. The double negative feels 
> confusing to me.

I prefer proposition #2 because I would like hg commit -i to present me 
exactly the same thing as hg revert -i. I was also very confused by the 
current implementation.
At least when not using --rev. If using --rev, I think I would do it in 
two steps probably, first with --rev, then with --interactive.
May be this is exacerbating because I am using crecord, so I wonder what 
I shall check/uncheck...
For uncommit -i, I would expect crecord to present me the same thing as 
commit -i, and what I am unchecking is reverted in the working directory 
for instance.

Could it be made configurable? Then the discussion would only fallback 
to the default.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150523/266432c6/attachment.html>

More information about the Mercurial-devel mailing list