comparison tests/test-commit-interactive-curses.t @ 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 1d99c9a5ccb0
children 75fd9421440b
comparison
equal deleted inserted replaced
42568:f9da9d5f3f5a 42569:756326d54761
33 33
34 $ echo "a" > a 34 $ echo "a" > a
35 $ hg add a 35 $ hg add a
36 $ cat <<EOF >testModeCommands 36 $ cat <<EOF >testModeCommands
37 > TOGGLE 37 > TOGGLE
38 > X 38 > c
39 > EOF 39 > EOF
40 $ hg commit -i -m "a" -d "0 0" 40 $ hg commit -i -m "a" -d "0 0"
41 no changes to record 41 no changes to record
42 [1] 42 [1]
43 $ hg tip 43 $ hg tip
48 48
49 49
50 Committing some changes 50 Committing some changes
51 51
52 $ cat <<EOF >testModeCommands 52 $ cat <<EOF >testModeCommands
53 > X 53 > c
54 > EOF 54 > EOF
55 $ hg commit -i -m "a" -d "0 0" 55 $ hg commit -i -m "a" -d "0 0"
56 $ hg tip 56 $ hg tip
57 changeset: 0:cb9a9f314b8b 57 changeset: 0:cb9a9f314b8b
58 tag: tip 58 tag: tip
71 >>> open('b', 'wb').write(b"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n") and None 71 >>> open('b', 'wb').write(b"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n") and None
72 $ hg add b 72 $ hg add b
73 $ cat <<EOF >testModeCommands 73 $ cat <<EOF >testModeCommands
74 > TOGGLE 74 > TOGGLE
75 > KEY_DOWN 75 > KEY_DOWN
76 > X 76 > c
77 > EOF 77 > EOF
78 $ hg commit -i -m "one file" -d "0 0" 78 $ hg commit -i -m "one file" -d "0 0"
79 $ hg tip 79 $ hg tip
80 changeset: 1:fb2705a663ea 80 changeset: 1:fb2705a663ea
81 tag: tip 81 tag: tip
114 > KEY_DOWN 114 > KEY_DOWN
115 > TOGGLE 115 > TOGGLE
116 > a 116 > a
117 > a 117 > a
118 > e 118 > e
119 > X 119 > c
120 > EOF 120 > EOF
121 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "one hunk" -d "0 0" 121 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "one hunk" -d "0 0"
122 editor ran 122 editor ran
123 $ rm editor.sh 123 $ rm editor.sh
124 $ hg tip 124 $ hg tip
182 $ echo "hello" > x 182 $ echo "hello" > x
183 $ hg add x 183 $ hg add x
184 $ cat <<EOF >testModeCommands 184 $ cat <<EOF >testModeCommands
185 > TOGGLE 185 > TOGGLE
186 > TOGGLE 186 > TOGGLE
187 > X 187 > c
188 > EOF 188 > EOF
189 $ hg st 189 $ hg st
190 A x 190 A x
191 ? testModeCommands 191 ? testModeCommands
192 $ hg commit -i -m "newly added file" -d "0 0" 192 $ hg commit -i -m "newly added file" -d "0 0"
201 +++ b/x Thu Jan 01 00:00:00 1970 +0000 201 +++ b/x Thu Jan 01 00:00:00 1970 +0000
202 @@ -0,0 +1,1 @@ 202 @@ -0,0 +1,1 @@
203 +hello 203 +hello
204 $ cat <<EOF >testModeCommands 204 $ cat <<EOF >testModeCommands
205 > a 205 > a
206 > X 206 > c
207 > EOF 207 > EOF
208 $ hg commit -i -m "newly added file" -d "0 0" 208 $ hg commit -i -m "newly added file" -d "0 0"
209 saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336-3cf0bc8c-amend.hg 209 saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336-3cf0bc8c-amend.hg
210 $ hg diff -c . 210 $ hg diff -c .
211 diff -r a6735021574d -r c1d239d165ae x 211 diff -r a6735021574d -r c1d239d165ae x
215 +hello world 215 +hello world
216 216
217 Make file empty 217 Make file empty
218 $ printf "" > x 218 $ printf "" > x
219 $ cat <<EOF >testModeCommands 219 $ cat <<EOF >testModeCommands
220 > X 220 > c
221 > EOF 221 > EOF
222 $ hg ci -i -m emptify -d "0 0" 222 $ hg ci -i -m emptify -d "0 0"
223 $ hg update -C '.^' -q 223 $ hg update -C '.^' -q
224 224
225 Editing a hunk puts you back on that hunk when done editing (issue5041) 225 Editing a hunk puts you back on that hunk when done editing (issue5041)
239 > KEY_DOWN 239 > KEY_DOWN
240 > KEY_DOWN 240 > KEY_DOWN
241 > KEY_DOWN 241 > KEY_DOWN
242 > e 242 > e
243 > TOGGLE 243 > TOGGLE
244 > X 244 > c
245 > EOF 245 > EOF
246 $ printf "printf 'editor ran\n'; exit 0" > editor.sh 246 $ printf "printf 'editor ran\n'; exit 0" > editor.sh
247 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "edit hunk" -d "0 0" -q 247 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "edit hunk" -d "0 0" -q
248 editor ran 248 editor ran
249 $ hg cat -r . x 249 $ hg cat -r . x