381 |
382 |
382 |
383 |
383 Test part |
384 Test part |
384 ================= |
385 ================= |
385 |
386 |
386 $ hg bundle2 --parts ../parts.hg2 --debug |
387 $ hg bundle2 --parts ../parts.hg2 --debug --config progress.debug=true --config devel.bundle2.debug=true |
387 start emission of HG20 stream |
388 bundle2-output-bundle: "HG20", 7 parts total |
388 bundle parameter: |
389 bundle2-output: start emission of HG20 stream |
389 start of parts |
390 bundle2-output: bundle parameter: |
390 bundle part: "test:empty" |
391 bundle2-output: start of parts |
391 bundle part: "test:empty" |
392 bundle2-output: bundle part: "test:empty" |
392 bundle part: "test:song" |
393 bundle2-output-part: "test:empty" (advisory) empty payload |
393 bundle part: "test:debugreply" |
394 bundle2-output: part 0: "test:empty" |
394 bundle part: "test:math" |
395 bundle2-output: header chunk size: 17 |
395 bundle part: "test:song" |
396 bundle2-output: closing payload chunk |
396 bundle part: "test:ping" |
397 bundle2-output: bundle part: "test:empty" |
397 end of bundle |
398 bundle2-output-part: "test:empty" (advisory) empty payload |
|
399 bundle2-output: part 1: "test:empty" |
|
400 bundle2-output: header chunk size: 17 |
|
401 bundle2-output: closing payload chunk |
|
402 bundle2-output: bundle part: "test:song" |
|
403 bundle2-output-part: "test:song" (advisory) 178 bytes payload |
|
404 bundle2-output: part 2: "test:song" |
|
405 bundle2-output: header chunk size: 16 |
|
406 bundle2-output: payload chunk size: 178 |
|
407 bundle2-output: closing payload chunk |
|
408 bundle2-output: bundle part: "test:debugreply" |
|
409 bundle2-output-part: "test:debugreply" (advisory) empty payload |
|
410 bundle2-output: part 3: "test:debugreply" |
|
411 bundle2-output: header chunk size: 22 |
|
412 bundle2-output: closing payload chunk |
|
413 bundle2-output: bundle part: "test:math" |
|
414 bundle2-output-part: "test:math" (advisory) (params: 2 mandatory 2 advisory) 2 bytes payload |
|
415 bundle2-output: part 4: "test:math" |
|
416 bundle2-output: header chunk size: 43 |
|
417 bundle2-output: payload chunk size: 2 |
|
418 bundle2-output: closing payload chunk |
|
419 bundle2-output: bundle part: "test:song" |
|
420 bundle2-output-part: "test:song" (advisory) (params: 1 mandatory) empty payload |
|
421 bundle2-output: part 5: "test:song" |
|
422 bundle2-output: header chunk size: 29 |
|
423 bundle2-output: closing payload chunk |
|
424 bundle2-output: bundle part: "test:ping" |
|
425 bundle2-output-part: "test:ping" (advisory) empty payload |
|
426 bundle2-output: part 6: "test:ping" |
|
427 bundle2-output: header chunk size: 16 |
|
428 bundle2-output: closing payload chunk |
|
429 bundle2-output: end of bundle |
398 |
430 |
399 $ cat ../parts.hg2 |
431 $ cat ../parts.hg2 |
400 HG20\x00\x00\x00\x00\x00\x00\x00\x11 (esc) |
432 HG20\x00\x00\x00\x00\x00\x00\x00\x11 (esc) |
401 test:empty\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11 (esc) |
433 test:empty\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11 (esc) |
402 test:empty\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10 test:song\x00\x00\x00\x02\x00\x00\x00\x00\x00\xb2Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko (esc) |
434 test:empty\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10 test:song\x00\x00\x00\x02\x00\x00\x00\x00\x00\xb2Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko (esc) |
434 mandatory: 0 |
466 mandatory: 0 |
435 advisory: 0 |
467 advisory: 0 |
436 payload: 0 bytes |
468 payload: 0 bytes |
437 parts count: 7 |
469 parts count: 7 |
438 |
470 |
439 $ hg statbundle2 --debug < ../parts.hg2 |
471 $ hg statbundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true < ../parts.hg2 |
440 start processing of HG20 stream |
472 bundle2-input: start processing of HG20 stream |
441 reading bundle2 stream parameters |
473 bundle2-input: reading bundle2 stream parameters |
442 options count: 0 |
474 options count: 0 |
443 start extraction of bundle2 parts |
475 bundle2-input: start extraction of bundle2 parts |
444 part header size: 17 |
476 bundle2-input: part header size: 17 |
445 part type: "test:empty" |
477 bundle2-input: part type: "test:empty" |
446 part id: "0" |
478 bundle2-input: part id: "0" |
447 part parameters: 0 |
479 bundle2-input: part parameters: 0 |
448 :test:empty: |
480 :test:empty: |
449 mandatory: 0 |
481 mandatory: 0 |
450 advisory: 0 |
482 advisory: 0 |
451 payload chunk size: 0 |
483 bundle2-input: payload chunk size: 0 |
452 payload: 0 bytes |
484 payload: 0 bytes |
453 part header size: 17 |
485 bundle2-input: part header size: 17 |
454 part type: "test:empty" |
486 bundle2-input: part type: "test:empty" |
455 part id: "1" |
487 bundle2-input: part id: "1" |
456 part parameters: 0 |
488 bundle2-input: part parameters: 0 |
457 :test:empty: |
489 :test:empty: |
458 mandatory: 0 |
490 mandatory: 0 |
459 advisory: 0 |
491 advisory: 0 |
460 payload chunk size: 0 |
492 bundle2-input: payload chunk size: 0 |
461 payload: 0 bytes |
493 payload: 0 bytes |
462 part header size: 16 |
494 bundle2-input: part header size: 16 |
463 part type: "test:song" |
495 bundle2-input: part type: "test:song" |
464 part id: "2" |
496 bundle2-input: part id: "2" |
465 part parameters: 0 |
497 bundle2-input: part parameters: 0 |
466 :test:song: |
498 :test:song: |
467 mandatory: 0 |
499 mandatory: 0 |
468 advisory: 0 |
500 advisory: 0 |
469 payload chunk size: 178 |
501 bundle2-input: payload chunk size: 178 |
470 payload chunk size: 0 |
502 bundle2-input: payload chunk size: 0 |
|
503 bundle2-input-part: total payload size 178 |
471 payload: 178 bytes |
504 payload: 178 bytes |
472 part header size: 22 |
505 bundle2-input: part header size: 22 |
473 part type: "test:debugreply" |
506 bundle2-input: part type: "test:debugreply" |
474 part id: "3" |
507 bundle2-input: part id: "3" |
475 part parameters: 0 |
508 bundle2-input: part parameters: 0 |
476 :test:debugreply: |
509 :test:debugreply: |
477 mandatory: 0 |
510 mandatory: 0 |
478 advisory: 0 |
511 advisory: 0 |
479 payload chunk size: 0 |
512 bundle2-input: payload chunk size: 0 |
480 payload: 0 bytes |
513 payload: 0 bytes |
481 part header size: 43 |
514 bundle2-input: part header size: 43 |
482 part type: "test:math" |
515 bundle2-input: part type: "test:math" |
483 part id: "4" |
516 bundle2-input: part id: "4" |
484 part parameters: 3 |
517 bundle2-input: part parameters: 3 |
485 :test:math: |
518 :test:math: |
486 mandatory: 2 |
519 mandatory: 2 |
487 advisory: 1 |
520 advisory: 1 |
488 payload chunk size: 2 |
521 bundle2-input: payload chunk size: 2 |
489 payload chunk size: 0 |
522 bundle2-input: payload chunk size: 0 |
|
523 bundle2-input-part: total payload size 2 |
490 payload: 2 bytes |
524 payload: 2 bytes |
491 part header size: 29 |
525 bundle2-input: part header size: 29 |
492 part type: "test:song" |
526 bundle2-input: part type: "test:song" |
493 part id: "5" |
527 bundle2-input: part id: "5" |
494 part parameters: 1 |
528 bundle2-input: part parameters: 1 |
495 :test:song: |
529 :test:song: |
496 mandatory: 1 |
530 mandatory: 1 |
497 advisory: 0 |
531 advisory: 0 |
498 payload chunk size: 0 |
532 bundle2-input: payload chunk size: 0 |
499 payload: 0 bytes |
533 payload: 0 bytes |
500 part header size: 16 |
534 bundle2-input: part header size: 16 |
501 part type: "test:ping" |
535 bundle2-input: part type: "test:ping" |
502 part id: "6" |
536 bundle2-input: part id: "6" |
503 part parameters: 0 |
537 bundle2-input: part parameters: 0 |
504 :test:ping: |
538 :test:ping: |
505 mandatory: 0 |
539 mandatory: 0 |
506 advisory: 0 |
540 advisory: 0 |
507 payload chunk size: 0 |
541 bundle2-input: payload chunk size: 0 |
508 payload: 0 bytes |
542 payload: 0 bytes |
509 part header size: 0 |
543 bundle2-input: part header size: 0 |
510 end of bundle2 stream |
544 bundle2-input: end of bundle2 stream |
511 parts count: 7 |
545 parts count: 7 |
512 |
546 |
513 Test actual unbundling of test part |
547 Test actual unbundling of test part |
514 ======================================= |
548 ======================================= |
515 |
549 |
516 Process the bundle |
550 Process the bundle |
517 |
551 |
518 $ hg unbundle2 --debug < ../parts.hg2 |
552 $ hg unbundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true < ../parts.hg2 |
519 start processing of HG20 stream |
553 bundle2-input: start processing of HG20 stream |
520 reading bundle2 stream parameters |
554 bundle2-input: reading bundle2 stream parameters |
521 start extraction of bundle2 parts |
555 bundle2-input-bundle: with-transaction |
522 part header size: 17 |
556 bundle2-input: start extraction of bundle2 parts |
523 part type: "test:empty" |
557 bundle2-input: part header size: 17 |
524 part id: "0" |
558 bundle2-input: part type: "test:empty" |
525 part parameters: 0 |
559 bundle2-input: part id: "0" |
526 ignoring unsupported advisory part test:empty |
560 bundle2-input: part parameters: 0 |
527 payload chunk size: 0 |
561 bundle2-input: ignoring unsupported advisory part test:empty |
528 part header size: 17 |
562 bundle2-input-part: "test:empty" (advisory) unsupported-type |
529 part type: "test:empty" |
563 bundle2-input: payload chunk size: 0 |
530 part id: "1" |
564 bundle2-input: part header size: 17 |
531 part parameters: 0 |
565 bundle2-input: part type: "test:empty" |
532 ignoring unsupported advisory part test:empty |
566 bundle2-input: part id: "1" |
533 payload chunk size: 0 |
567 bundle2-input: part parameters: 0 |
534 part header size: 16 |
568 bundle2-input: ignoring unsupported advisory part test:empty |
535 part type: "test:song" |
569 bundle2-input-part: "test:empty" (advisory) unsupported-type |
536 part id: "2" |
570 bundle2-input: payload chunk size: 0 |
537 part parameters: 0 |
571 bundle2-input: part header size: 16 |
538 found a handler for part 'test:song' |
572 bundle2-input: part type: "test:song" |
|
573 bundle2-input: part id: "2" |
|
574 bundle2-input: part parameters: 0 |
|
575 bundle2-input: found a handler for part 'test:song' |
|
576 bundle2-input-part: "test:song" (advisory) supported |
539 The choir starts singing: |
577 The choir starts singing: |
540 payload chunk size: 178 |
578 bundle2-input: payload chunk size: 178 |
541 payload chunk size: 0 |
579 bundle2-input: payload chunk size: 0 |
|
580 bundle2-input-part: total payload size 178 |
542 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
581 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
543 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
582 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
544 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
583 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
545 part header size: 22 |
584 bundle2-input: part header size: 22 |
546 part type: "test:debugreply" |
585 bundle2-input: part type: "test:debugreply" |
547 part id: "3" |
586 bundle2-input: part id: "3" |
548 part parameters: 0 |
587 bundle2-input: part parameters: 0 |
549 found a handler for part 'test:debugreply' |
588 bundle2-input: found a handler for part 'test:debugreply' |
|
589 bundle2-input-part: "test:debugreply" (advisory) supported |
550 debugreply: no reply |
590 debugreply: no reply |
551 payload chunk size: 0 |
591 bundle2-input: payload chunk size: 0 |
552 part header size: 43 |
592 bundle2-input: part header size: 43 |
553 part type: "test:math" |
593 bundle2-input: part type: "test:math" |
554 part id: "4" |
594 bundle2-input: part id: "4" |
555 part parameters: 3 |
595 bundle2-input: part parameters: 3 |
556 ignoring unsupported advisory part test:math |
596 bundle2-input: ignoring unsupported advisory part test:math |
557 payload chunk size: 2 |
597 bundle2-input-part: "test:math" (advisory) (params: 2 mandatory 2 advisory) unsupported-type |
558 payload chunk size: 0 |
598 bundle2-input: payload chunk size: 2 |
559 part header size: 29 |
599 bundle2-input: payload chunk size: 0 |
560 part type: "test:song" |
600 bundle2-input-part: total payload size 2 |
561 part id: "5" |
601 bundle2-input: part header size: 29 |
562 part parameters: 1 |
602 bundle2-input: part type: "test:song" |
563 found a handler for part 'test:song' |
603 bundle2-input: part id: "5" |
564 ignoring unsupported advisory part test:song - randomparam |
604 bundle2-input: part parameters: 1 |
565 payload chunk size: 0 |
605 bundle2-input: found a handler for part 'test:song' |
566 part header size: 16 |
606 bundle2-input: ignoring unsupported advisory part test:song - randomparam |
567 part type: "test:ping" |
607 bundle2-input-part: "test:song" (advisory) (params: 1 mandatory) unsupported-params (['randomparam']) |
568 part id: "6" |
608 bundle2-input: payload chunk size: 0 |
569 part parameters: 0 |
609 bundle2-input: part header size: 16 |
570 found a handler for part 'test:ping' |
610 bundle2-input: part type: "test:ping" |
|
611 bundle2-input: part id: "6" |
|
612 bundle2-input: part parameters: 0 |
|
613 bundle2-input: found a handler for part 'test:ping' |
|
614 bundle2-input-part: "test:ping" (advisory) supported |
571 received ping request (id 6) |
615 received ping request (id 6) |
572 payload chunk size: 0 |
616 bundle2-input: payload chunk size: 0 |
573 part header size: 0 |
617 bundle2-input: part header size: 0 |
574 end of bundle2 stream |
618 bundle2-input: end of bundle2 stream |
|
619 bundle2-input-bundle: 6 parts total |
575 0 unread bytes |
620 0 unread bytes |
576 3 total verses sung |
621 3 total verses sung |
577 |
622 |
578 Unbundle with an unknown mandatory part |
623 Unbundle with an unknown mandatory part |
579 (should abort) |
624 (should abort) |