Show More
@@ -1,792 +1,795 | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
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 | adding r1 |
|
12 | adding r1 | |
13 | $ echo r2 > r2 |
|
13 | $ echo r2 > r2 | |
14 | $ hg ci -Amr2 -d'1 0' |
|
14 | $ hg ci -Amr2 -d'1 0' | |
15 | adding r2 |
|
15 | adding r2 | |
16 | $ hg up 0 |
|
16 | $ hg up 0 | |
17 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
17 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
18 |
|
18 | |||
19 | $ echo b1 > b1 |
|
19 | $ echo b1 > b1 | |
20 | $ hg ci -Amb1 -d '0 0' |
|
20 | $ hg ci -Amb1 -d '0 0' | |
21 | adding b1 |
|
21 | adding b1 | |
22 | created new head |
|
22 | created new head | |
23 | $ echo b2 > b2 |
|
23 | $ echo b2 > b2 | |
24 | $ hg ci -Amb2 -d '1 0' |
|
24 | $ hg ci -Amb2 -d '1 0' | |
25 | adding b2 |
|
25 | adding b2 | |
26 | $ echo b3 > b3 |
|
26 | $ echo b3 > b3 | |
27 | $ hg ci -Amb3 -d '2 0' |
|
27 | $ hg ci -Amb3 -d '2 0' | |
28 | adding b3 |
|
28 | adding b3 | |
29 |
|
29 | |||
30 | $ hg log --template '{rev} {parents} {desc}\n' |
|
30 | $ hg log --template '{rev} {parents} {desc}\n' | |
31 | 4 b3 |
|
31 | 4 b3 | |
32 | 3 b2 |
|
32 | 3 b2 | |
33 | 2 0:17ab29e464c6 b1 |
|
33 | 2 0:17ab29e464c6 b1 | |
34 | 1 r2 |
|
34 | 1 r2 | |
35 | 0 r1 |
|
35 | 0 r1 | |
36 |
|
36 | |||
37 | $ hg clone . ../rebase |
|
37 | $ hg clone . ../rebase | |
38 | updating to branch default |
|
38 | updating to branch default | |
39 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
39 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
40 | $ cd ../rebase |
|
40 | $ cd ../rebase | |
41 |
|
41 | |||
42 | $ hg up -C 1 |
|
42 | $ hg up -C 1 | |
43 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
43 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
44 |
|
44 | |||
45 | rebase b onto r1 |
|
45 | rebase b onto r1 | |
46 | (this also tests that editor is not invoked if '--edit' is not specified) |
|
46 | (this also tests that editor is not invoked if '--edit' is not specified) | |
47 |
|
47 | |||
48 | $ HGEDITOR=cat hg transplant -a -b tip |
|
48 | $ HGEDITOR=cat hg transplant -a -b tip | |
49 | applying 37a1297eb21b |
|
49 | applying 37a1297eb21b | |
50 | 37a1297eb21b transplanted to e234d668f844 |
|
50 | 37a1297eb21b transplanted to e234d668f844 | |
51 | applying 722f4667af76 |
|
51 | applying 722f4667af76 | |
52 | 722f4667af76 transplanted to 539f377d78df |
|
52 | 722f4667af76 transplanted to 539f377d78df | |
53 | applying a53251cdf717 |
|
53 | applying a53251cdf717 | |
54 | a53251cdf717 transplanted to ffd6818a3975 |
|
54 | a53251cdf717 transplanted to ffd6818a3975 | |
55 | $ hg log --template '{rev} {parents} {desc}\n' |
|
55 | $ hg log --template '{rev} {parents} {desc}\n' | |
56 | 7 b3 |
|
56 | 7 b3 | |
57 | 6 b2 |
|
57 | 6 b2 | |
58 | 5 1:d11e3596cc1a b1 |
|
58 | 5 1:d11e3596cc1a b1 | |
59 | 4 b3 |
|
59 | 4 b3 | |
60 | 3 b2 |
|
60 | 3 b2 | |
61 | 2 0:17ab29e464c6 b1 |
|
61 | 2 0:17ab29e464c6 b1 | |
62 | 1 r2 |
|
62 | 1 r2 | |
63 | 0 r1 |
|
63 | 0 r1 | |
64 |
|
64 | |||
65 | test transplanted revset |
|
65 | test transplanted revset | |
66 |
|
66 | |||
67 | $ hg log -r 'transplanted()' --template '{rev} {parents} {desc}\n' |
|
67 | $ hg log -r 'transplanted()' --template '{rev} {parents} {desc}\n' | |
68 | 5 1:d11e3596cc1a b1 |
|
68 | 5 1:d11e3596cc1a b1 | |
69 | 6 b2 |
|
69 | 6 b2 | |
70 | 7 b3 |
|
70 | 7 b3 | |
71 | $ hg help revsets | grep transplanted |
|
71 | $ hg help revsets | grep transplanted | |
72 | "transplanted([set])" |
|
72 | "transplanted([set])" | |
73 | Transplanted changesets in set, or all transplanted changesets. |
|
73 | Transplanted changesets in set, or all transplanted changesets. | |
74 |
|
74 | |||
75 | test transplanted keyword |
|
75 | test transplanted keyword | |
76 |
|
76 | |||
77 | $ hg log --template '{rev} {transplanted}\n' |
|
77 | $ hg log --template '{rev} {transplanted}\n' | |
78 | 7 a53251cdf717679d1907b289f991534be05c997a |
|
78 | 7 a53251cdf717679d1907b289f991534be05c997a | |
79 | 6 722f4667af767100cb15b6a79324bf8abbfe1ef4 |
|
79 | 6 722f4667af767100cb15b6a79324bf8abbfe1ef4 | |
80 | 5 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21 |
|
80 | 5 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21 | |
81 | 4 |
|
81 | 4 | |
82 | 3 |
|
82 | 3 | |
83 | 2 |
|
83 | 2 | |
84 | 1 |
|
84 | 1 | |
85 | 0 |
|
85 | 0 | |
86 |
|
86 | |||
87 | test destination() revset predicate with a transplant of a transplant; new |
|
87 | test destination() revset predicate with a transplant of a transplant; new | |
88 | clone so subsequent rollback isn't affected |
|
88 | clone so subsequent rollback isn't affected | |
89 | (this also tests that editor is invoked if '--edit' is specified) |
|
89 | (this also tests that editor is invoked if '--edit' is specified) | |
90 |
|
90 | |||
91 | $ hg clone -q . ../destination |
|
91 | $ hg clone -q . ../destination | |
92 | $ cd ../destination |
|
92 | $ cd ../destination | |
93 | $ hg up -Cq 0 |
|
93 | $ hg up -Cq 0 | |
94 | $ hg branch -q b4 |
|
94 | $ hg branch -q b4 | |
95 | $ hg ci -qm "b4" |
|
95 | $ hg ci -qm "b4" | |
96 | $ hg status --rev "7^1" --rev 7 |
|
96 | $ hg status --rev "7^1" --rev 7 | |
97 | A b3 |
|
97 | A b3 | |
98 | $ cat > $TESTTMP/checkeditform.sh <<EOF |
|
98 | $ cat > $TESTTMP/checkeditform.sh <<EOF | |
99 | > env | grep HGEDITFORM |
|
99 | > env | grep HGEDITFORM | |
100 | > true |
|
100 | > true | |
101 | > EOF |
|
101 | > EOF | |
102 | $ cat > $TESTTMP/checkeditform-n-cat.sh <<EOF |
|
102 | $ cat > $TESTTMP/checkeditform-n-cat.sh <<EOF | |
103 | > env | grep HGEDITFORM |
|
103 | > env | grep HGEDITFORM | |
104 | > cat \$* |
|
104 | > cat \$* | |
105 | > EOF |
|
105 | > EOF | |
106 | $ HGEDITOR="sh $TESTTMP/checkeditform-n-cat.sh" hg transplant --edit 7 |
|
106 | $ HGEDITOR="sh $TESTTMP/checkeditform-n-cat.sh" hg transplant --edit 7 | |
107 | applying ffd6818a3975 |
|
107 | applying ffd6818a3975 | |
108 | HGEDITFORM=transplant.normal |
|
108 | HGEDITFORM=transplant.normal | |
109 | b3 |
|
109 | b3 | |
110 |
|
110 | |||
111 |
|
111 | |||
112 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
112 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
113 | HG: Leave message empty to abort commit. |
|
113 | HG: Leave message empty to abort commit. | |
114 | HG: -- |
|
114 | HG: -- | |
115 | HG: user: test |
|
115 | HG: user: test | |
116 | HG: branch 'b4' |
|
116 | HG: branch 'b4' | |
117 | HG: added b3 |
|
117 | HG: added b3 | |
118 | ffd6818a3975 transplanted to 502236fa76bb |
|
118 | ffd6818a3975 transplanted to 502236fa76bb | |
119 |
|
119 | |||
120 |
|
120 | |||
121 | $ hg log -r 'destination()' |
|
121 | $ hg log -r 'destination()' | |
122 | changeset: 5:e234d668f844 |
|
122 | changeset: 5:e234d668f844 | |
123 | parent: 1:d11e3596cc1a |
|
123 | parent: 1:d11e3596cc1a | |
124 | user: test |
|
124 | user: test | |
125 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
125 | date: Thu Jan 01 00:00:00 1970 +0000 | |
126 | summary: b1 |
|
126 | summary: b1 | |
127 |
|
127 | |||
128 | changeset: 6:539f377d78df |
|
128 | changeset: 6:539f377d78df | |
129 | user: test |
|
129 | user: test | |
130 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
130 | date: Thu Jan 01 00:00:01 1970 +0000 | |
131 | summary: b2 |
|
131 | summary: b2 | |
132 |
|
132 | |||
133 | changeset: 7:ffd6818a3975 |
|
133 | changeset: 7:ffd6818a3975 | |
134 | user: test |
|
134 | user: test | |
135 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
135 | date: Thu Jan 01 00:00:02 1970 +0000 | |
136 | summary: b3 |
|
136 | summary: b3 | |
137 |
|
137 | |||
138 | changeset: 9:502236fa76bb |
|
138 | changeset: 9:502236fa76bb | |
139 | branch: b4 |
|
139 | branch: b4 | |
140 | tag: tip |
|
140 | tag: tip | |
141 | user: test |
|
141 | user: test | |
142 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
142 | date: Thu Jan 01 00:00:02 1970 +0000 | |
143 | summary: b3 |
|
143 | summary: b3 | |
144 |
|
144 | |||
145 | $ hg log -r 'destination(a53251cdf717)' |
|
145 | $ hg log -r 'destination(a53251cdf717)' | |
146 | changeset: 7:ffd6818a3975 |
|
146 | changeset: 7:ffd6818a3975 | |
147 | user: test |
|
147 | user: test | |
148 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
148 | date: Thu Jan 01 00:00:02 1970 +0000 | |
149 | summary: b3 |
|
149 | summary: b3 | |
150 |
|
150 | |||
151 | changeset: 9:502236fa76bb |
|
151 | changeset: 9:502236fa76bb | |
152 | branch: b4 |
|
152 | branch: b4 | |
153 | tag: tip |
|
153 | tag: tip | |
154 | user: test |
|
154 | user: test | |
155 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
155 | date: Thu Jan 01 00:00:02 1970 +0000 | |
156 | summary: b3 |
|
156 | summary: b3 | |
157 |
|
157 | |||
158 |
|
158 | |||
159 | test subset parameter in reverse order |
|
159 | test subset parameter in reverse order | |
160 | $ hg log -r 'reverse(all()) and destination(a53251cdf717)' |
|
160 | $ hg log -r 'reverse(all()) and destination(a53251cdf717)' | |
161 | changeset: 9:502236fa76bb |
|
161 | changeset: 9:502236fa76bb | |
162 | branch: b4 |
|
162 | branch: b4 | |
163 | tag: tip |
|
163 | tag: tip | |
164 | user: test |
|
164 | user: test | |
165 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
165 | date: Thu Jan 01 00:00:02 1970 +0000 | |
166 | summary: b3 |
|
166 | summary: b3 | |
167 |
|
167 | |||
168 | changeset: 7:ffd6818a3975 |
|
168 | changeset: 7:ffd6818a3975 | |
169 | user: test |
|
169 | user: test | |
170 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
170 | date: Thu Jan 01 00:00:02 1970 +0000 | |
171 | summary: b3 |
|
171 | summary: b3 | |
172 |
|
172 | |||
173 |
|
173 | |||
174 | back to the original dir |
|
174 | back to the original dir | |
175 | $ cd ../rebase |
|
175 | $ cd ../rebase | |
176 |
|
176 | |||
177 | rollback the transplant |
|
177 | rollback the transplant | |
178 | $ hg rollback |
|
178 | $ hg rollback | |
179 | repository tip rolled back to revision 4 (undo transplant) |
|
179 | repository tip rolled back to revision 4 (undo transplant) | |
180 | working directory now based on revision 1 |
|
180 | working directory now based on revision 1 | |
181 | $ hg tip -q |
|
181 | $ hg tip -q | |
182 | 4:a53251cdf717 |
|
182 | 4:a53251cdf717 | |
183 | $ hg parents -q |
|
183 | $ hg parents -q | |
184 | 1:d11e3596cc1a |
|
184 | 1:d11e3596cc1a | |
185 | $ hg status |
|
185 | $ hg status | |
186 | ? b1 |
|
186 | ? b1 | |
187 | ? b2 |
|
187 | ? b2 | |
188 | ? b3 |
|
188 | ? b3 | |
189 |
|
189 | |||
190 | $ hg clone ../t ../prune |
|
190 | $ hg clone ../t ../prune | |
191 | updating to branch default |
|
191 | updating to branch default | |
192 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
193 | $ cd ../prune |
|
193 | $ cd ../prune | |
194 |
|
194 | |||
195 | $ hg up -C 1 |
|
195 | $ hg up -C 1 | |
196 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
196 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
197 |
|
197 | |||
198 | rebase b onto r1, skipping b2 |
|
198 | rebase b onto r1, skipping b2 | |
199 |
|
199 | |||
200 | $ hg transplant -a -b tip -p 3 |
|
200 | $ hg transplant -a -b tip -p 3 | |
201 | applying 37a1297eb21b |
|
201 | applying 37a1297eb21b | |
202 | 37a1297eb21b transplanted to e234d668f844 |
|
202 | 37a1297eb21b transplanted to e234d668f844 | |
203 | applying a53251cdf717 |
|
203 | applying a53251cdf717 | |
204 | a53251cdf717 transplanted to 7275fda4d04f |
|
204 | a53251cdf717 transplanted to 7275fda4d04f | |
205 | $ hg log --template '{rev} {parents} {desc}\n' |
|
205 | $ hg log --template '{rev} {parents} {desc}\n' | |
206 | 6 b3 |
|
206 | 6 b3 | |
207 | 5 1:d11e3596cc1a b1 |
|
207 | 5 1:d11e3596cc1a b1 | |
208 | 4 b3 |
|
208 | 4 b3 | |
209 | 3 b2 |
|
209 | 3 b2 | |
210 | 2 0:17ab29e464c6 b1 |
|
210 | 2 0:17ab29e464c6 b1 | |
211 | 1 r2 |
|
211 | 1 r2 | |
212 | 0 r1 |
|
212 | 0 r1 | |
213 |
|
213 | |||
214 | test same-parent transplant with --log |
|
214 | test same-parent transplant with --log | |
215 |
|
215 | |||
216 | $ hg clone -r 1 ../t ../sameparent |
|
216 | $ hg clone -r 1 ../t ../sameparent | |
217 | adding changesets |
|
217 | adding changesets | |
218 | adding manifests |
|
218 | adding manifests | |
219 | adding file changes |
|
219 | adding file changes | |
220 | added 2 changesets with 2 changes to 2 files |
|
220 | added 2 changesets with 2 changes to 2 files | |
221 | updating to branch default |
|
221 | updating to branch default | |
222 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
222 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
223 | $ cd ../sameparent |
|
223 | $ cd ../sameparent | |
224 | $ hg transplant --log -s ../prune 5 |
|
224 | $ hg transplant --log -s ../prune 5 | |
225 | searching for changes |
|
225 | searching for changes | |
226 | applying e234d668f844 |
|
226 | applying e234d668f844 | |
227 | e234d668f844 transplanted to e07aea8ecf9c |
|
227 | e234d668f844 transplanted to e07aea8ecf9c | |
228 | $ hg log --template '{rev} {parents} {desc}\n' |
|
228 | $ hg log --template '{rev} {parents} {desc}\n' | |
229 | 2 b1 |
|
229 | 2 b1 | |
230 | (transplanted from e234d668f844e1b1a765f01db83a32c0c7bfa170) |
|
230 | (transplanted from e234d668f844e1b1a765f01db83a32c0c7bfa170) | |
231 | 1 r2 |
|
231 | 1 r2 | |
232 | 0 r1 |
|
232 | 0 r1 | |
233 | remote transplant, and also test that transplant doesn't break with |
|
233 | remote transplant, and also test that transplant doesn't break with | |
234 | format-breaking diffopts |
|
234 | format-breaking diffopts | |
235 |
|
235 | |||
236 | $ hg clone -r 1 ../t ../remote |
|
236 | $ hg clone -r 1 ../t ../remote | |
237 | adding changesets |
|
237 | adding changesets | |
238 | adding manifests |
|
238 | adding manifests | |
239 | adding file changes |
|
239 | adding file changes | |
240 | added 2 changesets with 2 changes to 2 files |
|
240 | added 2 changesets with 2 changes to 2 files | |
241 | updating to branch default |
|
241 | updating to branch default | |
242 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
242 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
243 | $ cd ../remote |
|
243 | $ cd ../remote | |
244 | $ hg --config diff.noprefix=True transplant --log -s ../t 2 4 |
|
244 | $ hg --config diff.noprefix=True transplant --log -s ../t 2 4 | |
245 | searching for changes |
|
245 | searching for changes | |
246 | applying 37a1297eb21b |
|
246 | applying 37a1297eb21b | |
247 | 37a1297eb21b transplanted to c19cf0ccb069 |
|
247 | 37a1297eb21b transplanted to c19cf0ccb069 | |
248 | applying a53251cdf717 |
|
248 | applying a53251cdf717 | |
249 | a53251cdf717 transplanted to f7fe5bf98525 |
|
249 | a53251cdf717 transplanted to f7fe5bf98525 | |
250 | $ hg log --template '{rev} {parents} {desc}\n' |
|
250 | $ hg log --template '{rev} {parents} {desc}\n' | |
251 | 3 b3 |
|
251 | 3 b3 | |
252 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) |
|
252 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) | |
253 | 2 b1 |
|
253 | 2 b1 | |
254 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) |
|
254 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) | |
255 | 1 r2 |
|
255 | 1 r2 | |
256 | 0 r1 |
|
256 | 0 r1 | |
257 |
|
257 | |||
258 | skip previous transplants |
|
258 | skip previous transplants | |
259 |
|
259 | |||
260 | $ hg transplant -s ../t -a -b 4 |
|
260 | $ hg transplant -s ../t -a -b 4 | |
261 | searching for changes |
|
261 | searching for changes | |
262 | applying 722f4667af76 |
|
262 | applying 722f4667af76 | |
263 | 722f4667af76 transplanted to 47156cd86c0b |
|
263 | 722f4667af76 transplanted to 47156cd86c0b | |
264 | $ hg log --template '{rev} {parents} {desc}\n' |
|
264 | $ hg log --template '{rev} {parents} {desc}\n' | |
265 | 4 b2 |
|
265 | 4 b2 | |
266 | 3 b3 |
|
266 | 3 b3 | |
267 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) |
|
267 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) | |
268 | 2 b1 |
|
268 | 2 b1 | |
269 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) |
|
269 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) | |
270 | 1 r2 |
|
270 | 1 r2 | |
271 | 0 r1 |
|
271 | 0 r1 | |
272 |
|
272 | |||
273 | skip local changes transplanted to the source |
|
273 | skip local changes transplanted to the source | |
274 |
|
274 | |||
275 | $ echo b4 > b4 |
|
275 | $ echo b4 > b4 | |
276 | $ hg ci -Amb4 -d '3 0' |
|
276 | $ hg ci -Amb4 -d '3 0' | |
277 | adding b4 |
|
277 | adding b4 | |
278 | $ hg clone ../t ../pullback |
|
278 | $ hg clone ../t ../pullback | |
279 | updating to branch default |
|
279 | updating to branch default | |
280 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
280 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
281 | $ cd ../pullback |
|
281 | $ cd ../pullback | |
282 | $ hg transplant -s ../remote -a -b tip |
|
282 | $ hg transplant -s ../remote -a -b tip | |
283 | searching for changes |
|
283 | searching for changes | |
284 | applying 4333daefcb15 |
|
284 | applying 4333daefcb15 | |
285 | 4333daefcb15 transplanted to 5f42c04e07cc |
|
285 | 4333daefcb15 transplanted to 5f42c04e07cc | |
286 |
|
286 | |||
287 |
|
287 | |||
288 | remote transplant with pull |
|
288 | remote transplant with pull | |
289 |
|
289 | |||
290 | $ hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid |
|
290 | $ hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid | |
291 | $ cat ../t.pid >> $DAEMON_PIDS |
|
291 | $ cat ../t.pid >> $DAEMON_PIDS | |
292 |
|
292 | |||
293 | $ hg clone -r 0 ../t ../rp |
|
293 | $ hg clone -r 0 ../t ../rp | |
294 | adding changesets |
|
294 | adding changesets | |
295 | adding manifests |
|
295 | adding manifests | |
296 | adding file changes |
|
296 | adding file changes | |
297 | added 1 changesets with 1 changes to 1 files |
|
297 | added 1 changesets with 1 changes to 1 files | |
298 | updating to branch default |
|
298 | updating to branch default | |
299 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
299 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
300 | $ cd ../rp |
|
300 | $ cd ../rp | |
301 |
$ hg transplant -s http://localhost:$HGPORT/ |
|
301 | $ hg transplant -s http://localhost:$HGPORT/ 37a1297eb21b a53251cdf717 | |
302 | searching for changes |
|
302 | searching for changes | |
303 | searching for changes |
|
303 | searching for changes | |
304 | adding changesets |
|
304 | adding changesets | |
305 | adding manifests |
|
305 | adding manifests | |
306 | adding file changes |
|
306 | adding file changes | |
307 | added 1 changesets with 1 changes to 1 files |
|
307 | added 1 changesets with 1 changes to 1 files | |
308 | applying a53251cdf717 |
|
308 | applying a53251cdf717 | |
309 | a53251cdf717 transplanted to 8d9279348abb |
|
309 | a53251cdf717 transplanted to 8d9279348abb | |
310 | $ hg log --template '{rev} {parents} {desc}\n' |
|
310 | $ hg log --template '{rev} {parents} {desc}\n' | |
311 | 2 b3 |
|
311 | 2 b3 | |
312 | 1 b1 |
|
312 | 1 b1 | |
313 | 0 r1 |
|
313 | 0 r1 | |
314 |
|
314 | |||
315 | remote transplant without pull |
|
315 | remote transplant without pull | |
|
316 | (I'm pretty sure this test is actually pulling, | |||
|
317 | It was using "2" and "4" (as the previous transplant used to) which referenced | |||
|
318 | revision different from one run to another) | |||
316 |
|
319 | |||
317 | $ hg pull -q http://localhost:$HGPORT/ |
|
320 | $ hg pull -q http://localhost:$HGPORT/ | |
318 | $ hg transplant -s http://localhost:$HGPORT/ 2 4 |
|
321 | $ hg transplant -s http://localhost:$HGPORT/ 8d9279348abb 722f4667af76 | |
319 | searching for changes |
|
322 | searching for changes | |
320 | skipping already applied revision 2:8d9279348abb |
|
323 | skipping already applied revision 2:8d9279348abb | |
321 | applying 722f4667af76 |
|
324 | applying 722f4667af76 | |
322 | 722f4667af76 transplanted to 76e321915884 |
|
325 | 722f4667af76 transplanted to 76e321915884 | |
323 |
|
326 | |||
324 | transplant --continue |
|
327 | transplant --continue | |
325 |
|
328 | |||
326 | $ hg init ../tc |
|
329 | $ hg init ../tc | |
327 | $ cd ../tc |
|
330 | $ cd ../tc | |
328 | $ cat <<EOF > foo |
|
331 | $ cat <<EOF > foo | |
329 | > foo |
|
332 | > foo | |
330 | > bar |
|
333 | > bar | |
331 | > baz |
|
334 | > baz | |
332 | > EOF |
|
335 | > EOF | |
333 |
$ |
|
336 | $ echo toremove > toremove | |
334 |
$ |
|
337 | $ echo baz > baz | |
335 |
$ |
|
338 | $ hg ci -Amfoo | |
336 |
|
|
339 | adding baz | |
337 |
|
|
340 | adding foo | |
338 |
|
|
341 | adding toremove | |
339 |
$ |
|
342 | $ cat <<EOF > foo | |
340 | > foo2 |
|
343 | > foo2 | |
341 | > bar2 |
|
344 | > bar2 | |
342 | > baz2 |
|
345 | > baz2 | |
343 | > EOF |
|
346 | > EOF | |
344 |
$ |
|
347 | $ rm toremove | |
345 |
$ |
|
348 | $ echo added > added | |
346 |
$ |
|
349 | $ hg ci -Amfoo2 | |
347 |
|
|
350 | adding added | |
348 |
|
|
351 | removing toremove | |
349 |
$ |
|
352 | $ echo bar > bar | |
350 |
$ |
|
353 | $ cat > baz <<EOF | |
351 |
> before |
|
354 | > before baz | |
352 | > baz |
|
355 | > baz | |
353 |
> after |
|
356 | > after baz | |
354 | > EOF |
|
357 | > EOF | |
355 |
$ |
|
358 | $ hg ci -Ambar | |
356 |
|
|
359 | adding bar | |
357 |
$ |
|
360 | $ echo bar2 >> bar | |
358 | $ hg ci -mbar2 |
|
361 | $ hg ci -mbar2 | |
359 | $ hg up 0 |
|
362 | $ hg up 0 | |
360 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
363 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
361 | $ echo foobar > foo |
|
364 | $ echo foobar > foo | |
362 | $ hg ci -mfoobar |
|
365 | $ hg ci -mfoobar | |
363 | created new head |
|
366 | created new head | |
364 | $ hg transplant 1:3 |
|
367 | $ hg transplant 1:3 | |
365 | applying 46ae92138f3c |
|
368 | applying 46ae92138f3c | |
366 | patching file foo |
|
369 | patching file foo | |
367 | Hunk #1 FAILED at 0 |
|
370 | Hunk #1 FAILED at 0 | |
368 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
371 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
369 | patch failed to apply |
|
372 | patch failed to apply | |
370 | abort: fix up the merge and run hg transplant --continue |
|
373 | abort: fix up the merge and run hg transplant --continue | |
371 | [255] |
|
374 | [255] | |
372 |
|
375 | |||
373 | transplant -c shouldn't use an old changeset |
|
376 | transplant -c shouldn't use an old changeset | |
374 |
|
377 | |||
375 | $ hg up -C |
|
378 | $ hg up -C | |
376 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
379 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
377 | $ rm added |
|
380 | $ rm added | |
378 | $ hg transplant 1 |
|
381 | $ hg transplant 1 | |
379 | applying 46ae92138f3c |
|
382 | applying 46ae92138f3c | |
380 | patching file foo |
|
383 | patching file foo | |
381 | Hunk #1 FAILED at 0 |
|
384 | Hunk #1 FAILED at 0 | |
382 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
385 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
383 | patch failed to apply |
|
386 | patch failed to apply | |
384 | abort: fix up the merge and run hg transplant --continue |
|
387 | abort: fix up the merge and run hg transplant --continue | |
385 | [255] |
|
388 | [255] | |
386 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e |
|
389 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e | |
387 | HGEDITFORM=transplant.normal |
|
390 | HGEDITFORM=transplant.normal | |
388 | 46ae92138f3c transplanted as 9159dada197d |
|
391 | 46ae92138f3c transplanted as 9159dada197d | |
389 | $ hg transplant 1:3 |
|
392 | $ hg transplant 1:3 | |
390 | skipping already applied revision 1:46ae92138f3c |
|
393 | skipping already applied revision 1:46ae92138f3c | |
391 | applying 9d6d6b5a8275 |
|
394 | applying 9d6d6b5a8275 | |
392 | 9d6d6b5a8275 transplanted to 2d17a10c922f |
|
395 | 9d6d6b5a8275 transplanted to 2d17a10c922f | |
393 | applying 1dab759070cf |
|
396 | applying 1dab759070cf | |
394 | 1dab759070cf transplanted to e06a69927eb0 |
|
397 | 1dab759070cf transplanted to e06a69927eb0 | |
395 | $ hg locate |
|
398 | $ hg locate | |
396 | added |
|
399 | added | |
397 | bar |
|
400 | bar | |
398 | baz |
|
401 | baz | |
399 | foo |
|
402 | foo | |
400 |
|
403 | |||
401 | test multiple revisions and --continue |
|
404 | test multiple revisions and --continue | |
402 |
|
405 | |||
403 | $ hg up -qC 0 |
|
406 | $ hg up -qC 0 | |
404 | $ echo bazbaz > baz |
|
407 | $ echo bazbaz > baz | |
405 | $ hg ci -Am anotherbaz baz |
|
408 | $ hg ci -Am anotherbaz baz | |
406 | created new head |
|
409 | created new head | |
407 | $ hg transplant 1:3 |
|
410 | $ hg transplant 1:3 | |
408 | applying 46ae92138f3c |
|
411 | applying 46ae92138f3c | |
409 | 46ae92138f3c transplanted to 1024233ea0ba |
|
412 | 46ae92138f3c transplanted to 1024233ea0ba | |
410 | applying 9d6d6b5a8275 |
|
413 | applying 9d6d6b5a8275 | |
411 | patching file baz |
|
414 | patching file baz | |
412 | Hunk #1 FAILED at 0 |
|
415 | Hunk #1 FAILED at 0 | |
413 | 1 out of 1 hunks FAILED -- saving rejects to file baz.rej |
|
416 | 1 out of 1 hunks FAILED -- saving rejects to file baz.rej | |
414 | patch failed to apply |
|
417 | patch failed to apply | |
415 | abort: fix up the merge and run hg transplant --continue |
|
418 | abort: fix up the merge and run hg transplant --continue | |
416 | [255] |
|
419 | [255] | |
417 | $ echo fixed > baz |
|
420 | $ echo fixed > baz | |
418 | $ hg transplant --continue |
|
421 | $ hg transplant --continue | |
419 | 9d6d6b5a8275 transplanted as d80c49962290 |
|
422 | 9d6d6b5a8275 transplanted as d80c49962290 | |
420 | applying 1dab759070cf |
|
423 | applying 1dab759070cf | |
421 | 1dab759070cf transplanted to aa0ffe6bd5ae |
|
424 | 1dab759070cf transplanted to aa0ffe6bd5ae | |
422 |
|
425 | |||
423 | $ cd .. |
|
426 | $ cd .. | |
424 |
|
427 | |||
425 | Issue1111: Test transplant --merge |
|
428 | Issue1111: Test transplant --merge | |
426 |
|
429 | |||
427 | $ hg init t1111 |
|
430 | $ hg init t1111 | |
428 | $ cd t1111 |
|
431 | $ cd t1111 | |
429 | $ echo a > a |
|
432 | $ echo a > a | |
430 | $ hg ci -Am adda |
|
433 | $ hg ci -Am adda | |
431 | adding a |
|
434 | adding a | |
432 | $ echo b >> a |
|
435 | $ echo b >> a | |
433 | $ hg ci -m appendb |
|
436 | $ hg ci -m appendb | |
434 | $ echo c >> a |
|
437 | $ echo c >> a | |
435 | $ hg ci -m appendc |
|
438 | $ hg ci -m appendc | |
436 | $ hg up -C 0 |
|
439 | $ hg up -C 0 | |
437 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
440 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
438 | $ echo d >> a |
|
441 | $ echo d >> a | |
439 | $ hg ci -m appendd |
|
442 | $ hg ci -m appendd | |
440 | created new head |
|
443 | created new head | |
441 |
|
444 | |||
442 |
|
|
445 | transplant | |
443 |
|
446 | |||
444 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant -m 1 -e |
|
447 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant -m 1 -e | |
445 | applying 42dc4432fd35 |
|
448 | applying 42dc4432fd35 | |
446 | HGEDITFORM=transplant.merge |
|
449 | HGEDITFORM=transplant.merge | |
447 | 1:42dc4432fd35 merged at a9f4acbac129 |
|
450 | 1:42dc4432fd35 merged at a9f4acbac129 | |
448 | $ hg update -q -C 2 |
|
451 | $ hg update -q -C 2 | |
449 | $ cat > a <<EOF |
|
452 | $ cat > a <<EOF | |
450 | > x |
|
453 | > x | |
451 | > y |
|
454 | > y | |
452 | > z |
|
455 | > z | |
453 | > EOF |
|
456 | > EOF | |
454 | $ hg commit -m replace |
|
457 | $ hg commit -m replace | |
455 | $ hg update -q -C 4 |
|
458 | $ hg update -q -C 4 | |
456 | $ hg transplant -m 5 |
|
459 | $ hg transplant -m 5 | |
457 | applying 600a3cdcb41d |
|
460 | applying 600a3cdcb41d | |
458 | patching file a |
|
461 | patching file a | |
459 | Hunk #1 FAILED at 0 |
|
462 | Hunk #1 FAILED at 0 | |
460 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
|
463 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej | |
461 | patch failed to apply |
|
464 | patch failed to apply | |
462 | abort: fix up the merge and run hg transplant --continue |
|
465 | abort: fix up the merge and run hg transplant --continue | |
463 | [255] |
|
466 | [255] | |
464 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e |
|
467 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e | |
465 | HGEDITFORM=transplant.merge |
|
468 | HGEDITFORM=transplant.merge | |
466 | 600a3cdcb41d transplanted as a3f88be652e0 |
|
469 | 600a3cdcb41d transplanted as a3f88be652e0 | |
467 |
|
470 | |||
468 | $ cd .. |
|
471 | $ cd .. | |
469 |
|
472 | |||
470 | test transplant into empty repository |
|
473 | test transplant into empty repository | |
471 |
|
474 | |||
472 | $ hg init empty |
|
475 | $ hg init empty | |
473 | $ cd empty |
|
476 | $ cd empty | |
474 | $ hg transplant -s ../t -b tip -a |
|
477 | $ hg transplant -s ../t -b tip -a | |
475 | adding changesets |
|
478 | adding changesets | |
476 | adding manifests |
|
479 | adding manifests | |
477 | adding file changes |
|
480 | adding file changes | |
478 | added 4 changesets with 4 changes to 4 files |
|
481 | added 4 changesets with 4 changes to 4 files | |
479 |
|
482 | |||
480 | test "--merge" causing pull from source repository on local host |
|
483 | test "--merge" causing pull from source repository on local host | |
481 |
|
484 | |||
482 | $ hg --config extensions.mq= -q strip 2 |
|
485 | $ hg --config extensions.mq= -q strip 2 | |
483 | $ hg transplant -s ../t --merge tip |
|
486 | $ hg transplant -s ../t --merge tip | |
484 | searching for changes |
|
487 | searching for changes | |
485 | searching for changes |
|
488 | searching for changes | |
486 | adding changesets |
|
489 | adding changesets | |
487 | adding manifests |
|
490 | adding manifests | |
488 | adding file changes |
|
491 | adding file changes | |
489 | added 2 changesets with 2 changes to 2 files |
|
492 | added 2 changesets with 2 changes to 2 files | |
490 | applying a53251cdf717 |
|
493 | applying a53251cdf717 | |
491 | 4:a53251cdf717 merged at 4831f4dc831a |
|
494 | 4:a53251cdf717 merged at 4831f4dc831a | |
492 |
|
495 | |||
493 | test interactive transplant |
|
496 | test interactive transplant | |
494 |
|
497 | |||
495 | $ hg --config extensions.strip= -q strip 0 |
|
498 | $ hg --config extensions.strip= -q strip 0 | |
496 | $ hg -R ../t log -G --template "{rev}:{node|short}" |
|
499 | $ hg -R ../t log -G --template "{rev}:{node|short}" | |
497 | @ 4:a53251cdf717 |
|
500 | @ 4:a53251cdf717 | |
498 | | |
|
501 | | | |
499 | o 3:722f4667af76 |
|
502 | o 3:722f4667af76 | |
500 | | |
|
503 | | | |
501 | o 2:37a1297eb21b |
|
504 | o 2:37a1297eb21b | |
502 | | |
|
505 | | | |
503 | | o 1:d11e3596cc1a |
|
506 | | o 1:d11e3596cc1a | |
504 | |/ |
|
507 | |/ | |
505 | o 0:17ab29e464c6 |
|
508 | o 0:17ab29e464c6 | |
506 |
|
509 | |||
507 | $ hg transplant -q --config ui.interactive=true -s ../t <<EOF |
|
510 | $ hg transplant -q --config ui.interactive=true -s ../t <<EOF | |
508 | > p |
|
511 | > p | |
509 | > y |
|
512 | > y | |
510 | > n |
|
513 | > n | |
511 | > n |
|
514 | > n | |
512 | > m |
|
515 | > m | |
513 | > c |
|
516 | > c | |
514 | > EOF |
|
517 | > EOF | |
515 | 0:17ab29e464c6 |
|
518 | 0:17ab29e464c6 | |
516 | apply changeset? [ynmpcq?]: p |
|
519 | apply changeset? [ynmpcq?]: p | |
517 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
520 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
518 | +++ b/r1 Thu Jan 01 00:00:00 1970 +0000 |
|
521 | +++ b/r1 Thu Jan 01 00:00:00 1970 +0000 | |
519 | @@ -0,0 +1,1 @@ |
|
522 | @@ -0,0 +1,1 @@ | |
520 | +r1 |
|
523 | +r1 | |
521 | apply changeset? [ynmpcq?]: y |
|
524 | apply changeset? [ynmpcq?]: y | |
522 | 1:d11e3596cc1a |
|
525 | 1:d11e3596cc1a | |
523 | apply changeset? [ynmpcq?]: n |
|
526 | apply changeset? [ynmpcq?]: n | |
524 | 2:37a1297eb21b |
|
527 | 2:37a1297eb21b | |
525 | apply changeset? [ynmpcq?]: n |
|
528 | apply changeset? [ynmpcq?]: n | |
526 | 3:722f4667af76 |
|
529 | 3:722f4667af76 | |
527 | apply changeset? [ynmpcq?]: m |
|
530 | apply changeset? [ynmpcq?]: m | |
528 | 4:a53251cdf717 |
|
531 | 4:a53251cdf717 | |
529 | apply changeset? [ynmpcq?]: c |
|
532 | apply changeset? [ynmpcq?]: c | |
530 | $ hg log -G --template "{node|short}" |
|
533 | $ hg log -G --template "{node|short}" | |
531 | @ 88be5dde5260 |
|
534 | @ 88be5dde5260 | |
532 | |\ |
|
535 | |\ | |
533 | | o 722f4667af76 |
|
536 | | o 722f4667af76 | |
534 | | | |
|
537 | | | | |
535 | | o 37a1297eb21b |
|
538 | | o 37a1297eb21b | |
536 | |/ |
|
539 | |/ | |
537 | o 17ab29e464c6 |
|
540 | o 17ab29e464c6 | |
538 |
|
541 | |||
539 | $ hg transplant -q --config ui.interactive=true -s ../t <<EOF |
|
542 | $ hg transplant -q --config ui.interactive=true -s ../t <<EOF | |
540 | > x |
|
543 | > x | |
541 | > ? |
|
544 | > ? | |
542 | > y |
|
545 | > y | |
543 | > q |
|
546 | > q | |
544 | > EOF |
|
547 | > EOF | |
545 | 1:d11e3596cc1a |
|
548 | 1:d11e3596cc1a | |
546 | apply changeset? [ynmpcq?]: x |
|
549 | apply changeset? [ynmpcq?]: x | |
547 | unrecognized response |
|
550 | unrecognized response | |
548 | apply changeset? [ynmpcq?]: ? |
|
551 | apply changeset? [ynmpcq?]: ? | |
549 | y: yes, transplant this changeset |
|
552 | y: yes, transplant this changeset | |
550 | n: no, skip this changeset |
|
553 | n: no, skip this changeset | |
551 | m: merge at this changeset |
|
554 | m: merge at this changeset | |
552 | p: show patch |
|
555 | p: show patch | |
553 | c: commit selected changesets |
|
556 | c: commit selected changesets | |
554 | q: quit and cancel transplant |
|
557 | q: quit and cancel transplant | |
555 | ?: ? (show this help) |
|
558 | ?: ? (show this help) | |
556 | apply changeset? [ynmpcq?]: y |
|
559 | apply changeset? [ynmpcq?]: y | |
557 | 4:a53251cdf717 |
|
560 | 4:a53251cdf717 | |
558 | apply changeset? [ynmpcq?]: q |
|
561 | apply changeset? [ynmpcq?]: q | |
559 | $ hg heads --template "{node|short}\n" |
|
562 | $ hg heads --template "{node|short}\n" | |
560 | 88be5dde5260 |
|
563 | 88be5dde5260 | |
561 |
|
564 | |||
562 | $ cd .. |
|
565 | $ cd .. | |
563 |
|
566 | |||
564 |
|
567 | |||
565 | #if unix-permissions system-sh |
|
568 | #if unix-permissions system-sh | |
566 |
|
569 | |||
567 | test filter |
|
570 | test filter | |
568 |
|
571 | |||
569 | $ hg init filter |
|
572 | $ hg init filter | |
570 | $ cd filter |
|
573 | $ cd filter | |
571 | $ cat <<'EOF' >test-filter |
|
574 | $ cat <<'EOF' >test-filter | |
572 | > #!/bin/sh |
|
575 | > #!/bin/sh | |
573 | > sed 's/r1/r2/' $1 > $1.new |
|
576 | > sed 's/r1/r2/' $1 > $1.new | |
574 | > mv $1.new $1 |
|
577 | > mv $1.new $1 | |
575 | > EOF |
|
578 | > EOF | |
576 | $ chmod +x test-filter |
|
579 | $ chmod +x test-filter | |
577 | $ hg transplant -s ../t -b tip -a --filter ./test-filter |
|
580 | $ hg transplant -s ../t -b tip -a --filter ./test-filter | |
578 | filtering * (glob) |
|
581 | filtering * (glob) | |
579 | applying 17ab29e464c6 |
|
582 | applying 17ab29e464c6 | |
580 | 17ab29e464c6 transplanted to e9ffc54ea104 |
|
583 | 17ab29e464c6 transplanted to e9ffc54ea104 | |
581 | filtering * (glob) |
|
584 | filtering * (glob) | |
582 | applying 37a1297eb21b |
|
585 | applying 37a1297eb21b | |
583 | 37a1297eb21b transplanted to 348b36d0b6a5 |
|
586 | 37a1297eb21b transplanted to 348b36d0b6a5 | |
584 | filtering * (glob) |
|
587 | filtering * (glob) | |
585 | applying 722f4667af76 |
|
588 | applying 722f4667af76 | |
586 | 722f4667af76 transplanted to 0aa6979afb95 |
|
589 | 722f4667af76 transplanted to 0aa6979afb95 | |
587 | filtering * (glob) |
|
590 | filtering * (glob) | |
588 | applying a53251cdf717 |
|
591 | applying a53251cdf717 | |
589 | a53251cdf717 transplanted to 14f8512272b5 |
|
592 | a53251cdf717 transplanted to 14f8512272b5 | |
590 | $ hg log --template '{rev} {parents} {desc}\n' |
|
593 | $ hg log --template '{rev} {parents} {desc}\n' | |
591 | 3 b3 |
|
594 | 3 b3 | |
592 | 2 b2 |
|
595 | 2 b2 | |
593 | 1 b1 |
|
596 | 1 b1 | |
594 | 0 r2 |
|
597 | 0 r2 | |
595 | $ cd .. |
|
598 | $ cd .. | |
596 |
|
599 | |||
597 |
|
600 | |||
598 | test filter with failed patch |
|
601 | test filter with failed patch | |
599 |
|
602 | |||
600 | $ cd filter |
|
603 | $ cd filter | |
601 | $ hg up 0 |
|
604 | $ hg up 0 | |
602 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
605 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
603 | $ echo foo > b1 |
|
606 | $ echo foo > b1 | |
604 | $ hg ci -Am foo |
|
607 | $ hg ci -Am foo | |
605 | adding b1 |
|
608 | adding b1 | |
606 | adding test-filter |
|
609 | adding test-filter | |
607 | created new head |
|
610 | created new head | |
608 | $ hg transplant 1 --filter ./test-filter |
|
611 | $ hg transplant 1 --filter ./test-filter | |
609 | filtering * (glob) |
|
612 | filtering * (glob) | |
610 | applying 348b36d0b6a5 |
|
613 | applying 348b36d0b6a5 | |
611 | file b1 already exists |
|
614 | file b1 already exists | |
612 | 1 out of 1 hunks FAILED -- saving rejects to file b1.rej |
|
615 | 1 out of 1 hunks FAILED -- saving rejects to file b1.rej | |
613 | patch failed to apply |
|
616 | patch failed to apply | |
614 | abort: fix up the merge and run hg transplant --continue |
|
617 | abort: fix up the merge and run hg transplant --continue | |
615 | [255] |
|
618 | [255] | |
616 | $ cd .. |
|
619 | $ cd .. | |
617 |
|
620 | |||
618 | test environment passed to filter |
|
621 | test environment passed to filter | |
619 |
|
622 | |||
620 | $ hg init filter-environment |
|
623 | $ hg init filter-environment | |
621 | $ cd filter-environment |
|
624 | $ cd filter-environment | |
622 | $ cat <<'EOF' >test-filter-environment |
|
625 | $ cat <<'EOF' >test-filter-environment | |
623 | > #!/bin/sh |
|
626 | > #!/bin/sh | |
624 | > echo "Transplant by $HGUSER" >> $1 |
|
627 | > echo "Transplant by $HGUSER" >> $1 | |
625 | > echo "Transplant from rev $HGREVISION" >> $1 |
|
628 | > echo "Transplant from rev $HGREVISION" >> $1 | |
626 | > EOF |
|
629 | > EOF | |
627 | $ chmod +x test-filter-environment |
|
630 | $ chmod +x test-filter-environment | |
628 | $ hg transplant -s ../t --filter ./test-filter-environment 0 |
|
631 | $ hg transplant -s ../t --filter ./test-filter-environment 0 | |
629 | filtering * (glob) |
|
632 | filtering * (glob) | |
630 | applying 17ab29e464c6 |
|
633 | applying 17ab29e464c6 | |
631 | 17ab29e464c6 transplanted to 5190e68026a0 |
|
634 | 17ab29e464c6 transplanted to 5190e68026a0 | |
632 |
|
635 | |||
633 | $ hg log --template '{rev} {parents} {desc}\n' |
|
636 | $ hg log --template '{rev} {parents} {desc}\n' | |
634 | 0 r1 |
|
637 | 0 r1 | |
635 | Transplant by test |
|
638 | Transplant by test | |
636 | Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f |
|
639 | Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f | |
637 | $ cd .. |
|
640 | $ cd .. | |
638 |
|
641 | |||
639 | test transplant with filter handles invalid changelog |
|
642 | test transplant with filter handles invalid changelog | |
640 |
|
643 | |||
641 | $ hg init filter-invalid-log |
|
644 | $ hg init filter-invalid-log | |
642 | $ cd filter-invalid-log |
|
645 | $ cd filter-invalid-log | |
643 | $ cat <<'EOF' >test-filter-invalid-log |
|
646 | $ cat <<'EOF' >test-filter-invalid-log | |
644 | > #!/bin/sh |
|
647 | > #!/bin/sh | |
645 | > echo "" > $1 |
|
648 | > echo "" > $1 | |
646 | > EOF |
|
649 | > EOF | |
647 | $ chmod +x test-filter-invalid-log |
|
650 | $ chmod +x test-filter-invalid-log | |
648 | $ hg transplant -s ../t --filter ./test-filter-invalid-log 0 |
|
651 | $ hg transplant -s ../t --filter ./test-filter-invalid-log 0 | |
649 | filtering * (glob) |
|
652 | filtering * (glob) | |
650 | abort: filter corrupted changeset (no user or date) |
|
653 | abort: filter corrupted changeset (no user or date) | |
651 | [255] |
|
654 | [255] | |
652 | $ cd .. |
|
655 | $ cd .. | |
653 |
|
656 | |||
654 | #endif |
|
657 | #endif | |
655 |
|
658 | |||
656 |
|
659 | |||
657 | test with a win32ext like setup (differing EOLs) |
|
660 | test with a win32ext like setup (differing EOLs) | |
658 |
|
661 | |||
659 | $ hg init twin1 |
|
662 | $ hg init twin1 | |
660 | $ cd twin1 |
|
663 | $ cd twin1 | |
661 | $ echo a > a |
|
664 | $ echo a > a | |
662 | $ echo b > b |
|
665 | $ echo b > b | |
663 | $ echo b >> b |
|
666 | $ echo b >> b | |
664 | $ hg ci -Am t |
|
667 | $ hg ci -Am t | |
665 | adding a |
|
668 | adding a | |
666 | adding b |
|
669 | adding b | |
667 | $ echo a > b |
|
670 | $ echo a > b | |
668 | $ echo b >> b |
|
671 | $ echo b >> b | |
669 | $ hg ci -m changeb |
|
672 | $ hg ci -m changeb | |
670 | $ cd .. |
|
673 | $ cd .. | |
671 |
|
674 | |||
672 | $ hg init twin2 |
|
675 | $ hg init twin2 | |
673 | $ cd twin2 |
|
676 | $ cd twin2 | |
674 | $ echo '[patch]' >> .hg/hgrc |
|
677 | $ echo '[patch]' >> .hg/hgrc | |
675 | $ echo 'eol = crlf' >> .hg/hgrc |
|
678 | $ echo 'eol = crlf' >> .hg/hgrc | |
676 | $ $PYTHON -c "file('b', 'wb').write('b\r\nb\r\n')" |
|
679 | $ $PYTHON -c "file('b', 'wb').write('b\r\nb\r\n')" | |
677 | $ hg ci -Am addb |
|
680 | $ hg ci -Am addb | |
678 | adding b |
|
681 | adding b | |
679 | $ hg transplant -s ../twin1 tip |
|
682 | $ hg transplant -s ../twin1 tip | |
680 | searching for changes |
|
683 | searching for changes | |
681 | warning: repository is unrelated |
|
684 | warning: repository is unrelated | |
682 | applying 2e849d776c17 |
|
685 | applying 2e849d776c17 | |
683 | 2e849d776c17 transplanted to 8e65bebc063e |
|
686 | 2e849d776c17 transplanted to 8e65bebc063e | |
684 | $ cat b |
|
687 | $ cat b | |
685 | a\r (esc) |
|
688 | a\r (esc) | |
686 | b\r (esc) |
|
689 | b\r (esc) | |
687 | $ cd .. |
|
690 | $ cd .. | |
688 |
|
691 | |||
689 | test transplant with merge changeset is skipped |
|
692 | test transplant with merge changeset is skipped | |
690 |
|
693 | |||
691 | $ hg init merge1a |
|
694 | $ hg init merge1a | |
692 | $ cd merge1a |
|
695 | $ cd merge1a | |
693 | $ echo a > a |
|
696 | $ echo a > a | |
694 | $ hg ci -Am a |
|
697 | $ hg ci -Am a | |
695 | adding a |
|
698 | adding a | |
696 | $ hg branch b |
|
699 | $ hg branch b | |
697 | marked working directory as branch b |
|
700 | marked working directory as branch b | |
698 | (branches are permanent and global, did you want a bookmark?) |
|
701 | (branches are permanent and global, did you want a bookmark?) | |
699 | $ hg ci -m branchb |
|
702 | $ hg ci -m branchb | |
700 | $ echo b > b |
|
703 | $ echo b > b | |
701 | $ hg ci -Am b |
|
704 | $ hg ci -Am b | |
702 | adding b |
|
705 | adding b | |
703 | $ hg update default |
|
706 | $ hg update default | |
704 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
707 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
705 | $ hg merge b |
|
708 | $ hg merge b | |
706 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
709 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
707 | (branch merge, don't forget to commit) |
|
710 | (branch merge, don't forget to commit) | |
708 | $ hg ci -m mergeb |
|
711 | $ hg ci -m mergeb | |
709 | $ cd .. |
|
712 | $ cd .. | |
710 |
|
713 | |||
711 | $ hg init merge1b |
|
714 | $ hg init merge1b | |
712 | $ cd merge1b |
|
715 | $ cd merge1b | |
713 | $ hg transplant -s ../merge1a tip |
|
716 | $ hg transplant -s ../merge1a tip | |
714 | $ cd .. |
|
717 | $ cd .. | |
715 |
|
718 | |||
716 | test transplant with merge changeset accepts --parent |
|
719 | test transplant with merge changeset accepts --parent | |
717 |
|
720 | |||
718 | $ hg init merge2a |
|
721 | $ hg init merge2a | |
719 | $ cd merge2a |
|
722 | $ cd merge2a | |
720 | $ echo a > a |
|
723 | $ echo a > a | |
721 | $ hg ci -Am a |
|
724 | $ hg ci -Am a | |
722 | adding a |
|
725 | adding a | |
723 | $ hg branch b |
|
726 | $ hg branch b | |
724 | marked working directory as branch b |
|
727 | marked working directory as branch b | |
725 | (branches are permanent and global, did you want a bookmark?) |
|
728 | (branches are permanent and global, did you want a bookmark?) | |
726 | $ hg ci -m branchb |
|
729 | $ hg ci -m branchb | |
727 | $ echo b > b |
|
730 | $ echo b > b | |
728 | $ hg ci -Am b |
|
731 | $ hg ci -Am b | |
729 | adding b |
|
732 | adding b | |
730 | $ hg update default |
|
733 | $ hg update default | |
731 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
734 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
732 | $ hg merge b |
|
735 | $ hg merge b | |
733 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
736 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
734 | (branch merge, don't forget to commit) |
|
737 | (branch merge, don't forget to commit) | |
735 | $ hg ci -m mergeb |
|
738 | $ hg ci -m mergeb | |
736 | $ cd .. |
|
739 | $ cd .. | |
737 |
|
740 | |||
738 | $ hg init merge2b |
|
741 | $ hg init merge2b | |
739 | $ cd merge2b |
|
742 | $ cd merge2b | |
740 | $ hg transplant -s ../merge2a --parent 0 tip |
|
743 | $ hg transplant -s ../merge2a --parent 0 tip | |
741 | applying be9f9b39483f |
|
744 | applying be9f9b39483f | |
742 | be9f9b39483f transplanted to 9959e51f94d1 |
|
745 | be9f9b39483f transplanted to 9959e51f94d1 | |
743 | $ cd .. |
|
746 | $ cd .. | |
744 |
|
747 | |||
745 | test transplanting a patch turning into a no-op |
|
748 | test transplanting a patch turning into a no-op | |
746 |
|
749 | |||
747 | $ hg init binarysource |
|
750 | $ hg init binarysource | |
748 | $ cd binarysource |
|
751 | $ cd binarysource | |
749 | $ echo a > a |
|
752 | $ echo a > a | |
750 | $ hg ci -Am adda a |
|
753 | $ hg ci -Am adda a | |
751 | >>> file('b', 'wb').write('\0b1') |
|
754 | >>> file('b', 'wb').write('\0b1') | |
752 | $ hg ci -Am addb b |
|
755 | $ hg ci -Am addb b | |
753 | >>> file('b', 'wb').write('\0b2') |
|
756 | >>> file('b', 'wb').write('\0b2') | |
754 | $ hg ci -m changeb b |
|
757 | $ hg ci -m changeb b | |
755 | $ cd .. |
|
758 | $ cd .. | |
756 |
|
759 | |||
757 | $ hg clone -r0 binarysource binarydest |
|
760 | $ hg clone -r0 binarysource binarydest | |
758 | adding changesets |
|
761 | adding changesets | |
759 | adding manifests |
|
762 | adding manifests | |
760 | adding file changes |
|
763 | adding file changes | |
761 | added 1 changesets with 1 changes to 1 files |
|
764 | added 1 changesets with 1 changes to 1 files | |
762 | updating to branch default |
|
765 | updating to branch default | |
763 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
766 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
764 | $ cd binarydest |
|
767 | $ cd binarydest | |
765 | $ cp ../binarysource/b b |
|
768 | $ cp ../binarysource/b b | |
766 | $ hg ci -Am addb2 b |
|
769 | $ hg ci -Am addb2 b | |
767 | $ hg transplant -s ../binarysource 2 |
|
770 | $ hg transplant -s ../binarysource 2 | |
768 | searching for changes |
|
771 | searching for changes | |
769 | applying 7a7d57e15850 |
|
772 | applying 7a7d57e15850 | |
770 | skipping emptied changeset 7a7d57e15850 |
|
773 | skipping emptied changeset 7a7d57e15850 | |
771 |
|
774 | |||
772 | Test empty result in --continue |
|
775 | Test empty result in --continue | |
773 |
|
776 | |||
774 | $ hg transplant -s ../binarysource 1 |
|
777 | $ hg transplant -s ../binarysource 1 | |
775 | searching for changes |
|
778 | searching for changes | |
776 | applying 645035761929 |
|
779 | applying 645035761929 | |
777 | file b already exists |
|
780 | file b already exists | |
778 | 1 out of 1 hunks FAILED -- saving rejects to file b.rej |
|
781 | 1 out of 1 hunks FAILED -- saving rejects to file b.rej | |
779 | patch failed to apply |
|
782 | patch failed to apply | |
780 | abort: fix up the merge and run hg transplant --continue |
|
783 | abort: fix up the merge and run hg transplant --continue | |
781 | [255] |
|
784 | [255] | |
782 | $ hg status |
|
785 | $ hg status | |
783 | ? b.rej |
|
786 | ? b.rej | |
784 | $ hg transplant --continue |
|
787 | $ hg transplant --continue | |
785 | 645035761929 skipped due to empty diff |
|
788 | 645035761929 skipped due to empty diff | |
786 |
|
789 | |||
787 | $ cd .. |
|
790 | $ cd .. | |
788 |
|
791 | |||
789 | Explicitly kill daemons to let the test exit on Windows |
|
792 | Explicitly kill daemons to let the test exit on Windows | |
790 |
|
793 | |||
791 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
794 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
792 |
|
795 |
General Comments 0
You need to be logged in to leave comments.
Login now