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