comparison tests/test-commit-interactive-curses.t @ 42570:75fd9421440b

crecord: add "x" alias for space, remove test-only "TOGGLE" alias Differential Revision: https://phab.mercurial-scm.org/D6618
author Kyle Lippincott <spectral@google.com>
date Mon, 08 Jul 2019 12:17:06 -0700
parents 756326d54761
children 9ac1a5a4a64f
comparison
equal deleted inserted replaced
42569:756326d54761 42570:75fd9421440b
32 Committing some changes but stopping on the way 32 Committing some changes but stopping on the way
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 > x
38 > c 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]
69 69
70 $ echo "a" >> a 70 $ echo "a" >> a
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 > x
75 > KEY_DOWN 75 > KEY_DOWN
76 > c 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
110 > f 110 > f
111 > KEY_DOWN 111 > KEY_DOWN
112 > KEY_DOWN 112 > KEY_DOWN
113 > KEY_DOWN 113 > KEY_DOWN
114 > KEY_DOWN 114 > KEY_DOWN
115 > TOGGLE 115 > x
116 > a 116 > a
117 > a 117 > a
118 > e 118 > e
119 > c 119 > c
120 > EOF 120 > EOF
180 $ hg update -C . 180 $ hg update -C .
181 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 181 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
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 > x
186 > TOGGLE 186 > x
187 > c 187 > c
188 > EOF 188 > EOF
189 $ hg st 189 $ hg st
190 A x 190 A x
191 ? testModeCommands 191 ? testModeCommands
238 > KEY_DOWN 238 > KEY_DOWN
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 > x
244 > c 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
270 > cat "\$1" | sed s/bottom/lower/ > tmp 270 > cat "\$1" | sed s/bottom/lower/ > tmp
271 > mv tmp "\$1" 271 > mv tmp "\$1"
272 > EOF 272 > EOF
273 $ cat > testModeCommands <<EOF 273 $ cat > testModeCommands <<EOF
274 > KEY_DOWN 274 > KEY_DOWN
275 > TOGGLE 275 > x
276 > KEY_DOWN 276 > KEY_DOWN
277 > f 277 > f
278 > KEY_DOWN 278 > KEY_DOWN
279 > TOGGLE 279 > x
280 > R 280 > R
281 > EOF 281 > EOF
282 282
283 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "review hunks" -d "0 0" 283 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "review hunks" -d "0 0"
284 # To remove '-' lines, make them ' ' lines (context). 284 # To remove '-' lines, make them ' ' lines (context).