[Bug 5143] New: hg revert --interactive should say "revert change N/M to 'X'", or invert the meaning of y/n to "record change N/M"

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Fri Mar 18 18:02:15 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5143

            Bug ID: 5143
           Summary: hg revert --interactive should say "revert change N/M
                    to 'X'", or invert the meaning of y/n to "record
                    change N/M"
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: record
          Assignee: bugzilla at selenic.com
          Reporter: gijskruitbosch+bugs at gmail.com
                CC: mercurial-devel at selenic.com

STR:

$ mkdir hg-revert-interactive
$ cd hg-revert-interactive
$ hg init
$ echo 'some text' > foo.txt
$ hg commit --addremove -m "Initial commit"
$ echo 'other text' > foo.txt
$ hg revert --interactive
reverting foo.txt
diff --git a/foo.txt b/foo.txt
1 hunks, 1 lines changed
examine changes to 'foo.txt'? [Ynesfdaq?] 
$ y

@@ -1,1 +1,1 @@
-some text
+other text
record this change to 'foo.txt'? [Ynesfdaq?]


I triple dare you to predict what the different options do here.

The diff implies that we're talking about accepting these modifications (not
reverting them). So does "record". But if you now type "y"

$ y

$ hg st
? foo.txt.orig
# Umm, what
$ cat foo.txt
some text


What? That is so not what I wanted. Also, not what you said you would do!

I use 'hg revert --interactive' rarely enough that I don't remember that this
is broken and then I periodically get bitten and lose work. Please make it
stop. :-)

(tested on latest hg built a few days ago, version: 3.7.2+533-ed75909c4c67)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list