changeset 42569:756326d54761

crecord: stop using test-only "X" as alternative for "c" Differential Revision: https://phab.mercurial-scm.org/D6617
author Kyle Lippincott <spectral@google.com>
date Mon, 08 Jul 2019 12:15:37 -0700
parents f9da9d5f3f5a
children 75fd9421440b
files mercurial/crecord.py tests/test-commit-interactive-curses.t
diffstat 2 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/crecord.py	Sat Jul 06 22:19:36 2019 +0530
+++ b/mercurial/crecord.py	Mon Jul 08 12:15:37 2019 -0700
@@ -1742,8 +1742,6 @@
             self.toggleamend(self.opts, test)
         elif keypressed in ["c"]:
             return True
-        elif test and keypressed in ['X']:
-            return True
         elif keypressed in ["r"]:
             if self.reviewcommit():
                 self.opts['review'] = True
--- a/tests/test-commit-interactive-curses.t	Sat Jul 06 22:19:36 2019 +0530
+++ b/tests/test-commit-interactive-curses.t	Mon Jul 08 12:15:37 2019 -0700
@@ -35,7 +35,7 @@
   $ hg add a
   $ cat <<EOF >testModeCommands
   > TOGGLE
-  > X
+  > c
   > EOF
   $ hg commit -i  -m "a" -d "0 0"
   no changes to record
@@ -50,7 +50,7 @@
 Committing some changes
 
   $ cat <<EOF >testModeCommands
-  > X
+  > c
   > EOF
   $ hg commit -i  -m "a" -d "0 0"
   $ hg tip
@@ -73,7 +73,7 @@
   $ cat <<EOF >testModeCommands
   > TOGGLE
   > KEY_DOWN
-  > X
+  > c
   > EOF
   $ hg commit -i  -m "one file" -d "0 0"
   $ hg tip
@@ -116,7 +116,7 @@
   > a
   > a
   > e
-  > X
+  > c
   > EOF
   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i  -m "one hunk" -d "0 0"
   editor ran
@@ -184,7 +184,7 @@
   $ cat <<EOF >testModeCommands
   > TOGGLE
   > TOGGLE
-  > X
+  > c
   > EOF
   $ hg st
   A x
@@ -203,7 +203,7 @@
   +hello
   $ cat <<EOF >testModeCommands
   > a
-  > X
+  > c
   > EOF
   $ hg commit -i  -m "newly added file" -d "0 0"
   saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336-3cf0bc8c-amend.hg
@@ -217,7 +217,7 @@
 Make file empty
   $ printf "" > x
   $ cat <<EOF >testModeCommands
-  > X
+  > c
   > EOF
   $ hg ci -i -m emptify -d "0 0"
   $ hg update -C '.^' -q
@@ -241,7 +241,7 @@
   > KEY_DOWN
   > e
   > TOGGLE
-  > X
+  > c
   > EOF
   $ printf "printf 'editor ran\n'; exit 0" > editor.sh
   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit  -i -m "edit hunk" -d "0 0" -q