##// END OF EJS Templates
transplant: test non-local source
Brendan Cully -
r4050:75313c36 default
parent child Browse files
Show More
@@ -1,95 +1,98
1 1 #!/bin/sh
2 2
3 3 cat <<EOF >> $HGRCPATH
4 4 [extensions]
5 5 transplant=
6 6 EOF
7 7
8 8 hg init t
9 9 cd t
10 10 echo r1 > r1
11 11 hg ci -Amr1 -d'0 0'
12 12 echo r2 > r2
13 13 hg ci -Amr2 -d'1 0'
14 14 hg up 0
15 15
16 16 echo b1 > b1
17 17 hg ci -Amb1 -d '0 0'
18 18 echo b2 > b2
19 19 hg ci -Amb2 -d '1 0'
20 20 echo b3 > b3
21 21 hg ci -Amb3 -d '2 0'
22 22
23 23 hg log --template '{rev} {parents} {desc}\n'
24 24
25 25 hg clone . ../rebase
26 26 cd ../rebase
27 27
28 28 hg up -C 1
29 29 echo '% rebase b onto r1'
30 30 hg transplant -a -b tip
31 31 hg log --template '{rev} {parents} {desc}\n'
32 32
33 33 hg clone ../t ../prune
34 34 cd ../prune
35 35
36 36 hg up -C 1
37 37 echo '% rebase b onto r1, skipping b2'
38 38 hg transplant -a -b tip -p 3
39 39 hg log --template '{rev} {parents} {desc}\n'
40 40
41 41 echo '% remote transplant'
42 42 hg clone -r 1 ../t ../remote
43 43 cd ../remote
44 44 hg transplant --log -s ../t 2 4
45 45 hg log --template '{rev} {parents} {desc}\n'
46 46
47 47 echo '% skip previous transplants'
48 48 hg transplant -s ../t -a -b 4
49 49 hg log --template '{rev} {parents} {desc}\n'
50 50
51 51 echo '% skip local changes transplanted to the source'
52 52 echo b4 > b4
53 53 hg ci -Amb4 -d '3 0'
54 54 hg clone ../t ../pullback
55 55 cd ../pullback
56 56 hg transplant -s ../remote -a -b tip
57 57
58 58 echo '% remote transplant with pull'
59 hg -R ../t serve -p 20062 -d --pid-file=../t.pid
60 cat ../t.pid >> $DAEMON_PIDS
61
59 62 hg clone -r 0 ../t ../rp
60 63 cd ../rp
61 hg transplant -s ../t 2 4
64 hg transplant -s http://localhost:20062/ 2 4
62 65 hg log --template '{rev} {parents} {desc}\n'
63 66
64 67 echo '% transplant --continue'
65 68 hg init ../tc
66 69 cd ../tc
67 70 cat <<EOF > foo
68 71 foo
69 72 bar
70 73 baz
71 74 EOF
72 75 echo toremove > toremove
73 76 hg ci -Amfoo -d '0 0'
74 77 cat <<EOF > foo
75 78 foo2
76 79 bar2
77 80 baz2
78 81 EOF
79 82 rm toremove
80 83 echo added > added
81 84 hg ci -Amfoo2 -d '0 0'
82 85 echo bar > bar
83 86 hg ci -Ambar -d '0 0'
84 87 echo bar2 >> bar
85 88 hg ci -mbar2 -d '0 0'
86 89 hg up 0
87 90 echo foobar > foo
88 91 hg ci -mfoobar -d '0 0'
89 92 hg transplant 1:3
90 93 # transplant -c shouldn't use an old changeset
91 94 hg up -C
92 95 hg transplant 1
93 96 hg transplant --continue
94 97 hg transplant 1:3
95 98 hg locate
General Comments 0
You need to be logged in to leave comments. Login now