[PATCH RESEND] revert: do not reverse hunks in interactive when REV is not parent (issue5096)
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Nov 24 00:13:28 UTC 2016
On 11/23/2016 04:01 PM, Jun Wu wrote:
> Excerpts from Martin von Zweigbergk's message of 2016-11-14 15:57:30 -0800:
>> Pierre-Yves reached out and reminded me that he actually frequently
>> uses "hg revert -i -r .~1" to undo changes since that commit. Also, I
>> still personally feel that the people who want to undo changes since a
>> revision and the people who want to get changes from a revision are
>> thinking about it differently enough that they should be using
>> different commands. I think it would be good if we could find good
>
> There are other commands:
> - For picking what should be undone: "hg uncommit -i"
> - For picking what to kept: "hg split". (We can enhance it so it's possible
> to abort and drop the remaining changes)
>
> Those commands sound more intuitive to me and could probably fit marmoute's
> use-case.
These does not really fits my usecase, a frequent use of 'hg revert -i
-r .~x' to temporarily revert some change and check if it responsible
for a crash/change in test. I don't want to touch history yet at that
point. I want to check the check between my current state and an earlier
point and revert some of these change. So neither 'uncommit' or 'split'
are adequate here.
I also sometime use it to just drop a hunk I commited by mistake, in
this case a combination of 'hg uncommit -i + hg revert -i' (or some kind
of 'hg uncommit -i --revert') could do it. Not that we do not have '-i'
for 'hg uncommit' yet (that would be handy).
On the contrary, it seems to me 'hg split' could cover some of the
usecase of other people in this thread.
>> names for both of those operations. In my mind, "revert" is a good
>> word for the former (i.e. undoing), and I'm not sure what's a good
>> word for the latter (i.e. getting state from). It's still unclear to
>> me if others were turned off mostly by my proposed name ("apply") or
>> the idea of them being different operations.
>>
>> I'll de-queue this patch for now, and we can talk (even) more about it :-/
>
> An internal user just complained about the confusing behavior. I think an
> easy change we would all agree is to make the curses UI to use the same verb
> as the text UI does.
>
> Before:
>
> SELECT CHUNKS: .... toggle hunk/all; (e)dit hunk;
> (f)old/unfold; (c)onfirm applied; ... [X]=hunk applied ....
> ^^^^^^^ ^^^^^^^
> After:
>
> SELECT CHUNKS: .... toggle hunk/all; (e)dit hunk;
> (f)old/unfold; (c)onfirm revert; ... [X]=hunk to revert ....
> ^^^^^^ ^^^^^^^^^
>
> If there is no objection, I could prepare the patch.
+1 for having curse using the proper action/verb, that would for sure
help the situation.
Cheers,
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list