Mercurial > hg
annotate tests/test-transplant @ 3724:ea523d6f5f1a
transplant: fix --continue; add --continue test
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 30 Nov 2006 11:09:25 -0800 |
parents | 198173f3957c |
children | 752884db5037 |
rev | line source |
---|---|
3714 | 1 #!/bin/sh |
2 | |
3 cat <<EOF >> $HGRCPATH | |
4 [extensions] | |
5 transplant= | |
6 EOF | |
7 | |
8 hg init t | |
9 cd t | |
10 echo r1 > r1 | |
11 hg ci -Amr1 -d'0 0' | |
12 echo r2 > r2 | |
13 hg ci -Amr2 -d'1 0' | |
14 hg up 0 | |
15 | |
16 echo b1 > b1 | |
17 hg ci -Amb1 -d '0 0' | |
18 echo b2 > b2 | |
19 hg ci -Amb2 -d '1 0' | |
20 echo b3 > b3 | |
21 hg ci -Amb3 -d '2 0' | |
22 | |
23 hg log --template '{rev} {parents} {desc}\n' | |
24 | |
25 cd .. | |
26 hg clone t rebase | |
27 cd rebase | |
28 | |
29 hg up -C 1 | |
30 echo '% rebase b onto r1' | |
31 hg transplant -a -b tip | |
32 hg log --template '{rev} {parents} {desc}\n' | |
33 | |
34 cd .. | |
35 hg clone t prune | |
36 cd prune | |
37 | |
38 hg up -C 1 | |
39 echo '% rebase b onto r1, skipping b2' | |
40 hg transplant -a -b tip -p 3 | |
41 hg log --template '{rev} {parents} {desc}\n' | |
42 | |
43 cd .. | |
44 echo '% remote transplant' | |
45 hg clone -r 1 t remote | |
46 cd remote | |
47 hg transplant --log -s ../t 2 4 | |
48 hg log --template '{rev} {parents} {desc}\n' | |
49 | |
50 echo '% skip previous transplants' | |
51 hg transplant -s ../t -a -b 4 | |
52 hg log --template '{rev} {parents} {desc}\n' | |
53 | |
54 echo '% skip local changes transplanted to the source' | |
55 echo b4 > b4 | |
56 hg ci -Amb4 -d '3 0' | |
57 cd .. | |
58 hg clone t pullback | |
59 cd pullback | |
60 hg transplant -s ../remote -a -b tip | |
3724
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
61 |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
62 echo '% transplant --continue' |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
63 hg init ../tc |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
64 cd ../tc |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
65 cat <<EOF > foo |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
66 foo |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
67 bar |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
68 baz |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
69 EOF |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
70 hg ci -Amfoo -d '0 0' |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
71 cat <<EOF > foo |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
72 foo2 |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
73 bar2 |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
74 baz2 |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
75 EOF |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
76 hg ci -mfoo2 -d '0 0' |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
77 echo bar > bar |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
78 hg ci -Ambar -d '0 0' |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
79 echo bar2 >> bar |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
80 hg ci -mbar2 -d '0 0' |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
81 hg up 0 |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
82 echo foobar > foo |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
83 hg ci -mfoobar -d '0 0' |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
84 hg transplant 1:3 |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
85 echo merge > foo |
ea523d6f5f1a
transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents:
3714
diff
changeset
|
86 hg transplant --continue |