comparison tests/test-pick.t @ 6200:ceab1399302c

pick: support hg continue
author Luke Granger-Brown <hg@lukegb.com>
date Tue, 15 Mar 2022 19:29:17 +0300
parents 10ccdee05ec0
children b4e1d34ad1e9
comparison
equal deleted inserted replaced
6199:09754e40d2db 6200:ceab1399302c
1 #testcases abortcommand abortflag 1 #testcases abortcontinuecommand abortcontinueflag
2 Test for the pick command 2 Test for the pick command
3 3
4 $ cat >> $HGRCPATH <<EOF 4 $ cat >> $HGRCPATH <<EOF
5 > [alias] 5 > [alias]
6 > glog = log -G -T "{rev}:{node|short} {desc}\n" 6 > glog = log -G -T "{rev}:{node|short} {desc}\n"
7 > glf = log -GT "{rev}: {desc} ({files})\n" 7 > glf = log -GT "{rev}: {desc} ({files})\n"
8 > [extensions] 8 > [extensions]
9 > EOF 9 > EOF
10 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH 10 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
11 11
12 #if abortflag 12 #if abortcontinueflag
13 $ cat >> $HGRCPATH <<EOF 13 $ cat >> $HGRCPATH <<EOF
14 > [alias] 14 > [alias]
15 > abort = pick --abort 15 > abort = pick --abort
16 > continue = pick --continue
16 > EOF 17 > EOF
17 #endif 18 #endif
18 19
19 $ mkcommit() { 20 $ mkcommit() {
20 > echo "$1" > "$1" 21 > echo "$1" > "$1"
81 Continuing without interrupted pick 82 Continuing without interrupted pick
82 83
83 $ hg pick --continue 84 $ hg pick --continue
84 abort: no interrupted pick state exists 85 abort: no interrupted pick state exists
85 [255] 86 [255]
87 #if abortcontinuecommand
88 $ hg continue
89 abort: no operation in progress
90 [20]
91 #endif
86 92
87 Aborting without interrupted pick 93 Aborting without interrupted pick
88 94
89 $ hg pick --abort 95 $ hg pick --abort
90 abort: no interrupted pick state exists 96 abort: no interrupted pick state exists
91 [255] 97 [255]
92 #if abortcommand 98 #if abortcontinuecommand
93 $ hg abort 99 $ hg abort
94 abort: no operation in progress 100 abort: no operation in progress
95 [20] 101 [20]
96 #endif 102 #endif
97 103
203 209
204 $ echo foobar > c 210 $ echo foobar > c
205 $ hg resolve --all --mark 211 $ hg resolve --all --mark
206 (no more unresolved files) 212 (no more unresolved files)
207 continue: hg pick --continue 213 continue: hg pick --continue
208 $ hg pick --continue 214 #if abortcontinuecommand
215 $ hg continue --dry-run
216 pick in progress, will be resumed
217 #endif
218 $ hg continue
209 $ hg glog 219 $ hg glog
210 @ 8:44e155eb95c7 add c 220 @ 8:44e155eb95c7 add c
211 | 221 |
212 o 7:2ccc03d1d096 foo to c 222 o 7:2ccc03d1d096 foo to c
213 | 223 |
241 $ echo foobar > c 251 $ echo foobar > c
242 $ hg resolve -m 252 $ hg resolve -m
243 (no more unresolved files) 253 (no more unresolved files)
244 continue: hg pick --continue 254 continue: hg pick --continue
245 255
246 $ hg pick --continue 256 $ hg continue
247 note: picking 9:4e04628911f6 created no changes to commit 257 note: picking 9:4e04628911f6 created no changes to commit
248 258
249 Testing the abort functionality of hg pick 259 Testing the abort functionality of hg pick
250 260
251 $ echo foo > b 261 $ echo foo > b
262 merging b 272 merging b
263 warning: conflicts while merging b! (edit, then use 'hg resolve --mark') 273 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
264 unresolved merge conflicts (see hg help resolve) 274 unresolved merge conflicts (see hg help resolve)
265 [240] 275 [240]
266 276
267 #if abortcommand 277 #if abortcontinuecommand
268 $ hg abort --dry-run 278 $ hg abort --dry-run
269 pick in progress, will be aborted 279 pick in progress, will be aborted
270 #endif 280 #endif
271 $ hg abort 281 $ hg abort
272 pick aborted 282 pick aborted
328 $ echo bar > b 338 $ echo bar > b
329 $ hg resolve -m 339 $ hg resolve -m
330 (no more unresolved files) 340 (no more unresolved files)
331 continue: hg pick --continue 341 continue: hg pick --continue
332 342
333 $ hg pick --continue 343 $ hg continue
334 $ hg phase -r . 344 $ hg phase -r .
335 11: secret 345 11: secret
336 346
337 No merge conflicts 347 No merge conflicts
338 348
464 unresolved merge conflicts (see hg help resolve) 474 unresolved merge conflicts (see hg help resolve)
465 [240] 475 [240]
466 $ hg resolve -t :other a 476 $ hg resolve -t :other a
467 (no more unresolved files) 477 (no more unresolved files)
468 continue: hg pick --continue 478 continue: hg pick --continue
469 $ hg pick --continue 479 $ hg continue
470 480
471 Demonstrate that b was not forgotten and is definitely included in 4 481 Demonstrate that b was not forgotten and is definitely included in 4
472 482
473 $ hg status b -A 483 $ hg status b -A
474 C b 484 C b