comparison tests/test-transplant.t @ 42717:0a4303c77637

continue: added support for transplant This creates a seperate function `continuetransplant()` containing logic for resuming transplant from interrupted state. `continuetransplant()` is then registered as `continuefunc` for state detection API. Results are shown in tests. Differential Revision: https://phab.mercurial-scm.org/D6689
author Taapas Agrawal <taapas2897@gmail.com>
date Wed, 24 Jul 2019 18:32:36 +0530
parents 12243f15d53e
children ac6121a24f27
comparison
equal deleted inserted replaced
42716:50c2c3eae64e 42717:0a4303c77637
1 #testcases commandmode continueflag
1 $ cat <<EOF >> $HGRCPATH 2 $ cat <<EOF >> $HGRCPATH
2 > [extensions] 3 > [extensions]
3 > transplant= 4 > transplant=
4 > EOF 5 > EOF
6
7 #if continueflag
8 $ cat >> $HGRCPATH <<EOF
9 > [alias]
10 > continue = transplant --continue
11 > EOF
12 #endif
5 13
6 $ hg init t 14 $ hg init t
7 $ cd t 15 $ cd t
8 $ hg transplant 16 $ hg transplant
9 abort: no source URL, branch revision, or revision list provided 17 abort: no source URL, branch revision, or revision list provided
422 $ hg up -C 430 $ hg up -C
423 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 431 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
424 updated to "e8643552fde5: foobar" 432 updated to "e8643552fde5: foobar"
425 1 other heads for branch "default" 433 1 other heads for branch "default"
426 $ rm added 434 $ rm added
427 $ hg transplant --continue 435 $ hg continue
428 abort: no transplant to continue 436 abort: no transplant to continue (continueflag !)
437 abort: no operation in progress (no-continueflag !)
429 [255] 438 [255]
430 $ hg transplant 1 439 $ hg transplant 1
431 applying 46ae92138f3c 440 applying 46ae92138f3c
432 patching file foo 441 patching file foo
433 Hunk #1 FAILED at 0 442 Hunk #1 FAILED at 0
490 499
491 # To continue: hg transplant --continue 500 # To continue: hg transplant --continue
492 # To abort: hg update 501 # To abort: hg update
493 502
494 $ echo fixed > baz 503 $ echo fixed > baz
495 $ hg transplant --continue 504 $ hg continue
496 9d6d6b5a8275 transplanted as d80c49962290 505 9d6d6b5a8275 transplanted as d80c49962290
497 applying 1dab759070cf 506 applying 1dab759070cf
498 1dab759070cf transplanted to aa0ffe6bd5ae 507 1dab759070cf transplanted to aa0ffe6bd5ae
499 508
500 $ cd .. 509 $ cd ..
879 patch failed to apply 888 patch failed to apply
880 abort: fix up the working directory and run hg transplant --continue 889 abort: fix up the working directory and run hg transplant --continue
881 [255] 890 [255]
882 $ hg status 891 $ hg status
883 ? b.rej 892 ? b.rej
884 $ hg transplant --continue 893 $ hg continue
885 645035761929 skipped due to empty diff 894 645035761929 skipped due to empty diff
886 895
887 $ cd .. 896 $ cd ..
888 897
889 Explicitly kill daemons to let the test exit on Windows 898 Explicitly kill daemons to let the test exit on Windows