D6617: crecord: stop using test-only "X" as alternative for "c"

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Mon Jul 8 18:04:08 EDT 2019


Closed by commit rHG756326d54761: crecord: stop using test-only "X" as alternative for "c" (authored by spectral).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6617?vs=15809&id=15818

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6617/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6617

AFFECTED FILES
  mercurial/crecord.py
  tests/test-commit-interactive-curses.t

CHANGE DETAILS

diff --git a/tests/test-commit-interactive-curses.t b/tests/test-commit-interactive-curses.t
--- a/tests/test-commit-interactive-curses.t
+++ b/tests/test-commit-interactive-curses.t
@@ -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
diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -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



To: spectral, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list