Show More
@@ -1,519 +1,519 | |||
|
1 | 1 | Test exchange of common information using bundle2 |
|
2 | 2 | |
|
3 | 3 | |
|
4 | 4 | $ getmainid() { |
|
5 | 5 | > hg -R main log --template '{node}\n' --rev "$1" |
|
6 | 6 | > } |
|
7 | 7 | |
|
8 | 8 | enable obsolescence |
|
9 | 9 | |
|
10 | 10 | $ cat >> $HGRCPATH << EOF |
|
11 | 11 | > [experimental] |
|
12 | 12 | > evolution=createmarkers,exchange |
|
13 | 13 | > bundle2-exp=True |
|
14 | 14 | > [ui] |
|
15 | 15 | > ssh=python "$TESTDIR/dummyssh" |
|
16 | 16 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
17 | 17 | > [web] |
|
18 | 18 | > push_ssl = false |
|
19 | 19 | > allow_push = * |
|
20 | 20 | > [phases] |
|
21 | 21 | > publish=False |
|
22 | 22 | > [hooks] |
|
23 | 23 | > changegroup = sh -c "HG_LOCAL= python \"$TESTDIR/printenv.py\" changegroup" |
|
24 |
> b2x-pretransactionclose.tip = |
|
|
25 |
> b2x-transactionclose.tip = |
|
|
24 | > b2x-pretransactionclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" | |
|
25 | > b2x-transactionclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" | |
|
26 | 26 |
> b2x-transactionclose.env = sh -c |
|
27 | 27 | > EOF |
|
28 | 28 | |
|
29 | 29 |
|
|
30 | 30 | |
|
31 | 31 |
|
|
32 | 32 |
$ |
|
33 | 33 |
$ |
|
34 | 34 |
$ |
|
35 | 35 |
$ |
|
36 | 36 | |
|
37 | 37 |
$ |
|
38 | 38 |
|
|
39 | 39 |
|
|
40 | 40 |
|
|
41 | 41 |
|
|
42 | 42 |
|
|
43 | 43 |
(run |
|
44 | 44 | |
|
45 | 45 |
|
|
46 | 46 | |
|
47 | 47 |
Real |
|
48 | 48 | ===================== |
|
49 | 49 | |
|
50 | 50 |
Add |
|
51 | 51 | |
|
52 | 52 |
$ |
|
53 | 53 |
$ |
|
54 | 54 | |
|
55 | 55 |
|
|
56 | 56 | |
|
57 | 57 |
$ |
|
58 | 58 |
$ |
|
59 | 59 |
|
|
60 | 60 |
|
|
61 | 61 |
|
|
62 | 62 |
|
|
63 | 63 |
|
|
64 | 64 |
|
|
65 | 65 |
|
|
66 | 66 |
|
|
67 | 67 |
|
|
68 | 68 |
|
|
69 | 69 |
|
|
70 | 70 |
$ |
|
71 | 71 |
@ 1:9520eea781bc |
|
72 | 72 | | |
|
73 | 73 |
o |
|
74 | 74 | |
|
75 | 75 |
$ |
|
76 | 76 |
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
77 | 77 | |
|
78 | 78 |
|
|
79 | 79 | |
|
80 | 80 |
$ |
|
81 | 81 |
$ |
|
82 | 82 |
|
|
83 | 83 |
|
|
84 | 84 |
|
|
85 | 85 |
|
|
86 | 86 |
|
|
87 | 87 |
|
|
88 | 88 |
|
|
89 | 89 |
|
|
90 | 90 |
|
|
91 | 91 |
|
|
92 | 92 |
|
|
93 | 93 |
(run |
|
94 | 94 |
|
|
95 | 95 |
|
|
96 | 96 | | |
|
97 | 97 |
| @ 1:9520eea781bc |
|
98 | 98 | |/ |
|
99 | 99 |
o |
|
100 | 100 | |
|
101 | 101 |
$ |
|
102 | 102 |
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
103 | 103 |
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 |
|
104 | 104 | |
|
105 | 105 |
|
|
106 | 106 | |
|
107 | 107 |
|
|
108 | 108 |
$ |
|
109 | 109 |
|
|
110 | 110 |
|
|
111 | 111 |
|
|
112 | 112 |
|
|
113 | 113 |
|
|
114 | 114 |
$ |
|
115 | 115 |
|
|
116 | 116 | | |
|
117 | 117 |
| @ 1:9520eea781bc |
|
118 | 118 | |/ |
|
119 | 119 |
o |
|
120 | 120 | |
|
121 | 121 |
$ |
|
122 | 122 |
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
123 | 123 |
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 |
|
124 | 124 | |
|
125 | 125 |
|
|
126 | 126 | |
|
127 | 127 |
$ |
|
128 | 128 |
|
|
129 | 129 |
|
|
130 | 130 |
|
|
131 | 131 |
|
|
132 | 132 |
|
|
133 | 133 |
$ |
|
134 | 134 |
|
|
135 | 135 | | |
|
136 | 136 |
| @ 1:9520eea781bc |
|
137 | 137 | |/ |
|
138 | 138 |
o |
|
139 | 139 | |
|
140 | 140 |
$ |
|
141 | 141 |
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
142 | 142 |
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 |
|
143 | 143 | |
|
144 | 144 |
|
|
145 | 145 | |
|
146 | 146 |
$ |
|
147 | 147 |
$ |
|
148 | 148 |
$ |
|
149 | 149 |
$ |
|
150 | 150 |
$ |
|
151 | 151 |
$ |
|
152 | 152 |
$ |
|
153 | 153 |
$ |
|
154 | 154 |
$ |
|
155 | 155 |
$ |
|
156 | 156 | |
|
157 | 157 |
$ |
|
158 | 158 |
$ |
|
159 | 159 |
$ |
|
160 | 160 |
$ |
|
161 | 161 |
$ |
|
162 | 162 | |
|
163 | 163 |
$ |
|
164 | 164 | |
|
165 | 165 |
|
|
166 | 166 |
$ |
|
167 | 167 |
|
|
168 | 168 |
|
|
169 | 169 |
|
|
170 | 170 |
|
|
171 | 171 |
|
|
172 | 172 |
|
|
173 | 173 |
remote: |
|
174 | 174 |
remote: |
|
175 | 175 |
remote: |
|
176 | 176 |
remote: |
|
177 | 177 |
remote: |
|
178 | 178 |
|
|
179 | 179 |
$ |
|
180 | 180 |
|
|
181 | 181 | |\ |
|
182 | 182 |
| o |
|
183 | 183 | | | |
|
184 | 184 |
@ | 1:9520eea781bc |
|
185 | 185 | |/ |
|
186 | 186 |
o |
|
187 | 187 | |
|
188 | 188 |
$ |
|
189 | 189 |
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
190 | 190 |
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 |
|
191 | 191 |
3333333333333333333333333333333333333333 |
|
192 | 192 | |
|
193 | 193 |
|
|
194 | 194 | |
|
195 | 195 |
$ |
|
196 | 196 |
|
|
197 | 197 |
|
|
198 | 198 |
|
|
199 | 199 |
|
|
200 | 200 |
|
|
201 | 201 |
|
|
202 | 202 |
|
|
203 | 203 |
|
|
204 | 204 |
|
|
205 | 205 |
|
|
206 | 206 |
|
|
207 | 207 |
|
|
208 | 208 |
|
|
209 | 209 |
|
|
210 | 210 |
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
211 | 211 |
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 |
|
212 | 212 |
3333333333333333333333333333333333333333 |
|
213 | 213 |
4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
214 | 214 | |
|
215 | 215 |
|
|
216 | 216 | |
|
217 | 217 |
$ |
|
218 | 218 |
$ |
|
219 | 219 | |
|
220 | 220 |
$ |
|
221 | 221 |
|
|
222 | 222 |
|
|
223 | 223 |
|
|
224 | 224 |
|
|
225 | 225 |
|
|
226 | 226 |
|
|
227 | 227 |
|
|
228 | 228 |
|
|
229 | 229 |
|
|
230 | 230 |
|
|
231 | 231 |
|
|
232 | 232 |
|
|
233 | 233 |
|
|
234 | 234 |
|
|
235 | 235 |
$ |
|
236 | 236 |
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
237 | 237 |
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 |
|
238 | 238 |
3333333333333333333333333333333333333333 |
|
239 | 239 |
4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
240 | 240 |
5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 |
|
241 | 241 | |
|
242 | 242 |
|
|
243 | 243 | |
|
244 | 244 |
$ |
|
245 | 245 |
|
|
246 | 246 |
|
|
247 | 247 |
remote: |
|
248 | 248 |
remote: |
|
249 | 249 |
remote: |
|
250 | 250 |
remote: |
|
251 | 251 |
remote: |
|
252 | 252 |
|
|
253 | 253 |
remote: |
|
254 | 254 |
remote: |
|
255 | 255 |
remote: |
|
256 | 256 |
remote: |
|
257 | 257 |
$ |
|
258 | 258 |
|
|
259 | 259 | | |
|
260 | 260 |
o |
|
261 | 261 | | |
|
262 | 262 |
| o |
|
263 | 263 | | | |
|
264 | 264 |
| | o |
|
265 | 265 | | |/| |
|
266 | 266 |
| o | 2:24b6387c8c8c |
|
267 | 267 | |/ / |
|
268 | 268 |
| @ 1:9520eea781bc |
|
269 | 269 | |/ |
|
270 | 270 |
o |
|
271 | 271 | |
|
272 | 272 |
$ |
|
273 | 273 |
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
274 | 274 |
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 |
|
275 | 275 |
3333333333333333333333333333333333333333 |
|
276 | 276 |
4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
277 | 277 |
5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 |
|
278 | 278 |
6666666666666666666666666666666666666666 |
|
279 | 279 | |
|
280 | 280 |
|
|
281 | 281 | |
|
282 | 282 |
$ |
|
283 | 283 |
$ |
|
284 | 284 | |
|
285 | 285 |
$ |
|
286 | 286 |
$ |
|
287 | 287 |
|
|
288 | 288 |
|
|
289 | 289 |
remote: |
|
290 | 290 |
remote: |
|
291 | 291 |
remote: |
|
292 | 292 |
remote: |
|
293 | 293 |
remote: |
|
294 | 294 |
|
|
295 | 295 |
$ |
|
296 | 296 | |
|
297 | 297 |
|
|
298 | 298 | |
|
299 | 299 |
$ |
|
300 | 300 |
|
|
301 | 301 | | |
|
302 | 302 |
o |
|
303 | 303 | | |
|
304 | 304 |
o |
|
305 | 305 | | |
|
306 | 306 |
| o |
|
307 | 307 | | | |
|
308 | 308 |
| | o |
|
309 | 309 | | |/| |
|
310 | 310 |
| o | 2:24b6387c8c8c |
|
311 | 311 | |/ / |
|
312 | 312 |
| @ 1:9520eea781bc |
|
313 | 313 | |/ |
|
314 | 314 |
o |
|
315 | 315 | |
|
316 | 316 |
$ |
|
317 | 317 |
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
318 | 318 |
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 |
|
319 | 319 |
3333333333333333333333333333333333333333 |
|
320 | 320 |
4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
321 | 321 |
5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 |
|
322 | 322 |
6666666666666666666666666666666666666666 |
|
323 | 323 |
7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a |
|
324 | 324 | |
|
325 | 325 |
|
|
326 | 326 | |
|
327 | 327 |
|
|
328 | 328 | other/.hg/bookmarks |
|
329 | 329 |
$ |
|
330 | 330 | other/.hg/store/phaseroots |
|
331 | 331 |
$ |
|
332 | 332 | other/.hg/store/00changelog.i |
|
333 | 333 | |
|
334 | 334 |
|
|
335 | 335 | ============== |
|
336 | 336 | |
|
337 | 337 |
Check |
|
338 | 338 | |
|
339 | 339 |
Setting |
|
340 | 340 | |
|
341 | 341 |
$ |
|
342 | 342 | > """A small extension that makes push fails when using bundle2 |
|
343 | 343 | > |
|
344 | 344 | > used to test error handling in bundle2 |
|
345 | 345 | > """ |
|
346 | 346 | > |
|
347 | 347 |
> from |
|
348 | 348 |
> from |
|
349 | 349 |
> from |
|
350 | 350 |
> from |
|
351 | 351 | > |
|
352 | 352 |
> def |
|
353 | 353 |
|
|
354 | 354 | > part = None |
|
355 | 355 | > if reason == 'abort': |
|
356 | 356 |
|
|
357 | 357 | > if reason == 'unknown': |
|
358 | 358 |
|
|
359 | 359 | > if reason == 'race': |
|
360 | 360 |
|
|
361 | 361 | > bundler.newpart('b2x:check:heads', data='01234567890123456789') |
|
362 | 362 | > |
|
363 | 363 | > @bundle2.parthandler("test:abort") |
|
364 | 364 |
> def |
|
365 | 365 |
|
|
366 | 366 | > |
|
367 | 367 |
> def |
|
368 | 368 |
|
|
369 | 369 | > exchange.b2partsgenorder.insert(0, 'failpart') |
|
370 | 370 | > |
|
371 | 371 | > EOF |
|
372 | 372 | |
|
373 | 373 |
$ |
|
374 | 374 |
$ |
|
375 | 375 |
|
|
376 | 376 |
$ |
|
377 | 377 |
$ |
|
378 | 378 |
$ |
|
379 | 379 |
$ |
|
380 | 380 |
|
|
381 | 381 |
$ |
|
382 | 382 | |
|
383 | 383 |
$ |
|
384 | 384 | > [extensions] |
|
385 | 385 |
> failpush=$ |
|
386 | 386 | > EOF |
|
387 | 387 | |
|
388 | 388 |
$ |
|
389 | 389 |
$ |
|
390 | 390 |
$ |
|
391 | 391 | |
|
392 | 392 |
|
|
393 | 393 | |
|
394 | 394 |
$ |
|
395 | 395 | > [failpush] |
|
396 | 396 | > reason = abort |
|
397 | 397 | > EOF |
|
398 | 398 | |
|
399 | 399 |
$ |
|
400 | 400 |
|
|
401 | 401 |
|
|
402 | 402 |
abort: |
|
403 | 403 |
(don |
|
404 | 404 | [255] |
|
405 | 405 | |
|
406 | 406 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
407 | 407 | pushing to ssh://user@dummy/other |
|
408 | 408 | searching for changes |
|
409 | 409 | abort: Abandon ship! |
|
410 | 410 |
(don' |
|
411 | 411 |
|
|
412 | 412 | |
|
413 | 413 |
$ |
|
414 | 414 |
|
|
415 | 415 |
|
|
416 | 416 |
abort: |
|
417 | 417 |
(don |
|
418 | 418 | [255] |
|
419 | 419 | |
|
420 | 420 | |
|
421 | 421 | Doing the actual push: unknown mandatory parts |
|
422 | 422 | |
|
423 | 423 | $ cat << EOF >> $HGRCPATH |
|
424 | 424 | > [failpush] |
|
425 | 425 | > reason = unknown |
|
426 | 426 | > EOF |
|
427 | 427 | |
|
428 | 428 | $ hg -R main push other -r e7ec4e813ba6 |
|
429 | 429 | pushing to other |
|
430 | 430 | searching for changes |
|
431 | 431 | abort: missing support for test:unknown |
|
432 | 432 | [255] |
|
433 | 433 | |
|
434 | 434 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
435 | 435 | pushing to ssh://user@dummy/other |
|
436 | 436 | searching for changes |
|
437 | 437 | abort: missing support for test:unknown |
|
438 | 438 | [255] |
|
439 | 439 | |
|
440 | 440 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
441 | 441 | pushing to http://localhost:$HGPORT2/ |
|
442 | 442 | searching for changes |
|
443 | 443 | abort: missing support for test:unknown |
|
444 | 444 | [255] |
|
445 | 445 | |
|
446 | 446 | Doing the actual push: race |
|
447 | 447 | |
|
448 | 448 | $ cat << EOF >> $HGRCPATH |
|
449 | 449 | > [failpush] |
|
450 | 450 | > reason = race |
|
451 | 451 | > EOF |
|
452 | 452 | |
|
453 | 453 | $ hg -R main push other -r e7ec4e813ba6 |
|
454 | 454 | pushing to other |
|
455 | 455 | searching for changes |
|
456 | 456 | abort: push failed: |
|
457 | 457 |
' |
|
458 | 458 | [255] |
|
459 | 459 | |
|
460 | 460 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
461 | 461 | pushing to ssh://user@dummy/other |
|
462 | 462 | searching for changes |
|
463 | 463 | abort: push failed: |
|
464 | 464 |
' |
|
465 | 465 | [255] |
|
466 | 466 | |
|
467 | 467 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
468 | 468 | pushing to http://localhost:$HGPORT2/ |
|
469 | 469 | searching for changes |
|
470 | 470 | abort: push failed: |
|
471 | 471 |
' |
|
472 | 472 | [255] |
|
473 | 473 | |
|
474 | 474 | Doing the actual push: hook abort |
|
475 | 475 | |
|
476 | 476 | $ cat << EOF >> $HGRCPATH |
|
477 | 477 | > [failpush] |
|
478 | 478 | > reason = |
|
479 | 479 | > [hooks] |
|
480 | 480 | > b2x-pretransactionclose.failpush = false |
|
481 | 481 | > EOF |
|
482 | 482 | |
|
483 | 483 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
484 | 484 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
485 | 485 | $ cat other.pid >> $DAEMON_PIDS |
|
486 | 486 | |
|
487 | 487 | $ hg -R main push other -r e7ec4e813ba6 |
|
488 | 488 | pushing to other |
|
489 | 489 | searching for changes |
|
490 | 490 | pre-close-tip:e7ec4e813ba6 draft |
|
491 | 491 | transaction abort! |
|
492 | 492 | rollback completed |
|
493 | 493 | abort: b2x-pretransactionclose.failpush hook exited with status 1 |
|
494 | 494 | [255] |
|
495 | 495 | |
|
496 | 496 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
497 | 497 | pushing to ssh://user@dummy/other |
|
498 | 498 | searching for changes |
|
499 | 499 | abort: b2x-pretransactionclose.failpush hook exited with status 1 |
|
500 | 500 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
501 | 501 | remote: transaction abort! |
|
502 | 502 | remote: rollback completed |
|
503 | 503 | [255] |
|
504 | 504 | |
|
505 | 505 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
506 | 506 | pushing to http://localhost:$HGPORT2/ |
|
507 | 507 | searching for changes |
|
508 | 508 | abort: b2x-pretransactionclose.failpush hook exited with status 1 |
|
509 | 509 | [255] |
|
510 | 510 | |
|
511 | 511 |
(check that no ' |
|
512 | 512 | |
|
513 | 513 | $ ls -1 other/.hg/bookmarks* |
|
514 | 514 | other/.hg/bookmarks |
|
515 | 515 | $ ls -1 other/.hg/store/phaseroots* |
|
516 | 516 | other/.hg/store/phaseroots |
|
517 | 517 | $ ls -1 other/.hg/store/00changelog.i* |
|
518 | 518 | other/.hg/store/00changelog.i |
|
519 | 519 |
General Comments 0
You need to be logged in to leave comments.
Login now