##// END OF EJS Templates
test-transplant.t: improve test coverage...
timeless -
r27666:cd2f691f default
parent child Browse files
Show More
@@ -7,9 +7,26 b''
7
7
8 $ hg init t
8 $ hg init t
9 $ cd t
9 $ cd t
10 $ hg transplant
11 abort: no source URL, branch revision, or revision list provided
12 [255]
13 $ hg transplant --continue --all
14 abort: --continue is incompatible with --branch, --all and --merge
15 [255]
16 $ hg transplant --all tip
17 abort: --all requires a branch revision
18 [255]
19 $ hg transplant --all --branch default tip
20 abort: --all is incompatible with a revision list
21 [255]
10 $ echo r1 > r1
22 $ echo r1 > r1
11 $ hg ci -Amr1 -d'0 0'
23 $ hg ci -Amr1 -d'0 0'
12 adding r1
24 adding r1
25 $ hg co -q null
26 $ hg transplant tip
27 abort: no revision checked out
28 [255]
29 $ hg up -q
13 $ echo r2 > r2
30 $ echo r2 > r2
14 $ hg ci -Amr2 -d'1 0'
31 $ hg ci -Amr2 -d'1 0'
15 adding r2
32 adding r2
@@ -20,6 +37,18 b''
20 $ hg ci -Amb1 -d '0 0'
37 $ hg ci -Amb1 -d '0 0'
21 adding b1
38 adding b1
22 created new head
39 created new head
40 $ hg merge 1
41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 (branch merge, don't forget to commit)
43 $ hg transplant 1
44 abort: outstanding uncommitted merges
45 [255]
46 $ hg up -qC tip
47 $ echo b0 > b1
48 $ hg transplant 1
49 abort: outstanding local changes
50 [255]
51 $ hg up -qC tip
23 $ echo b2 > b2
52 $ echo b2 > b2
24 $ hg ci -Amb2 -d '1 0'
53 $ hg ci -Amb2 -d '1 0'
25 adding b2
54 adding b2
@@ -37,6 +66,9 b''
37 $ hg clone . ../rebase
66 $ hg clone . ../rebase
38 updating to branch default
67 updating to branch default
39 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
69 $ hg init ../emptydest
70 $ cd ../emptydest
71 $ hg transplant --source=../t > /dev/null
40 $ cd ../rebase
72 $ cd ../rebase
41
73
42 $ hg up -C 1
74 $ hg up -C 1
@@ -68,6 +100,8 b' test transplanted revset'
68 5 1:d11e3596cc1a b1
100 5 1:d11e3596cc1a b1
69 6 b2
101 6 b2
70 7 b3
102 7 b3
103 $ hg log -r 'transplanted(head())' --template '{rev} {parents} {desc}\n'
104 7 b3
71 $ hg help revsets | grep transplanted
105 $ hg help revsets | grep transplanted
72 "transplanted([set])"
106 "transplanted([set])"
73 Transplanted changesets in set, or all transplanted changesets.
107 Transplanted changesets in set, or all transplanted changesets.
@@ -384,6 +418,18 b" transplant -c shouldn't use an old chang"
384 patch failed to apply
418 patch failed to apply
385 abort: fix up the merge and run hg transplant --continue
419 abort: fix up the merge and run hg transplant --continue
386 [255]
420 [255]
421 $ cp .hg/transplant/journal .hg/transplant/journal.orig
422 $ cat .hg/transplant/journal
423 # User test
424 # Date 0 0
425 # Node ID 46ae92138f3ce0249f6789650403286ead052b6d
426 # Parent e8643552fde58f57515e19c4b373a57c96e62af3
427 foo2
428 $ grep -v 'Date' .hg/transplant/journal.orig > .hg/transplant/journal
429 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e
430 abort: filter corrupted changeset (no user or date)
431 [255]
432 $ cp .hg/transplant/journal.orig .hg/transplant/journal
387 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e
433 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e
388 HGEDITFORM=transplant.normal
434 HGEDITFORM=transplant.normal
389 46ae92138f3c transplanted as 9159dada197d
435 46ae92138f3c transplanted as 9159dada197d
@@ -506,6 +552,23 b' test interactive transplant'
506 o 0:17ab29e464c6
552 o 0:17ab29e464c6
507
553
508 $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
554 $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
555 > ?
556 > x
557 > q
558 > EOF
559 0:17ab29e464c6
560 apply changeset? [ynmpcq?]: ?
561 y: yes, transplant this changeset
562 n: no, skip this changeset
563 m: merge at this changeset
564 p: show patch
565 c: commit selected changesets
566 q: quit and cancel transplant
567 ?: ? (show this help)
568 apply changeset? [ynmpcq?]: x
569 unrecognized response
570 apply changeset? [ynmpcq?]: q
571 $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
509 > p
572 > p
510 > y
573 > y
511 > n
574 > n
@@ -738,6 +801,9 b' test transplant with merge changeset acc'
738
801
739 $ hg init merge2b
802 $ hg init merge2b
740 $ cd merge2b
803 $ cd merge2b
804 $ hg transplant -s ../merge2a --parent tip tip
805 abort: be9f9b39483f is not a parent of be9f9b39483f
806 [255]
741 $ hg transplant -s ../merge2a --parent 0 tip
807 $ hg transplant -s ../merge2a --parent 0 tip
742 applying be9f9b39483f
808 applying be9f9b39483f
743 be9f9b39483f transplanted to 9959e51f94d1
809 be9f9b39483f transplanted to 9959e51f94d1
General Comments 0
You need to be logged in to leave comments. Login now