comparison tests/test-bundle.t @ 37426:09907cd7a17a

tests: conditionalize test-bundle.t This test is massive and could probably be split up. This change essentially requires the revlog store for stream clone tests and support for bundlerepos for various tests operating on bundle files. Differential Revision: https://phab.mercurial-scm.org/D3106
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 04 Apr 2018 16:29:19 -0700
parents db06c4bb2158
children 326b174c6a47
comparison
equal deleted inserted replaced
37425:e1d4be95cd68 37426:09907cd7a17a
75 checking manifests 75 checking manifests
76 crosschecking files in changesets and manifests 76 crosschecking files in changesets and manifests
77 checking files 77 checking files
78 0 files, 0 changesets, 0 total revisions 78 0 files, 0 changesets, 0 total revisions
79 79
80 #if repobundlerepo
81
80 Pull full.hg into test (using --cwd) 82 Pull full.hg into test (using --cwd)
81 83
82 $ hg --cwd test pull ../full.hg 84 $ hg --cwd test pull ../full.hg
83 pulling from ../full.hg 85 pulling from ../full.hg
84 searching for changes 86 searching for changes
255 added 9 changesets with 7 changes to 4 files (+1 heads) 257 added 9 changesets with 7 changes to 4 files (+1 heads)
256 new changesets f9ee2f85a263:aa35859c02ea 258 new changesets f9ee2f85a263:aa35859c02ea
257 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=bundle:empty+full.hg 259 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=bundle:empty+full.hg
258 (run 'hg heads' to see heads, 'hg merge' to merge) 260 (run 'hg heads' to see heads, 'hg merge' to merge)
259 261
262 #endif
263
260 Cannot produce streaming clone bundles with "hg bundle" 264 Cannot produce streaming clone bundles with "hg bundle"
261 265
262 $ hg -R test bundle -t packed1 packed.hg 266 $ hg -R test bundle -t packed1 packed.hg
263 abort: packed bundles cannot be produced by "hg bundle" 267 abort: packed bundles cannot be produced by "hg bundle"
264 (use 'hg debugcreatestreamclonebundle') 268 (use 'hg debugcreatestreamclonebundle')
265 [255] 269 [255]
266 270
267 packed1 is produced properly 271 packed1 is produced properly
272
273 #if reporevlogstore
268 274
269 $ hg -R test debugcreatestreamclonebundle packed.hg 275 $ hg -R test debugcreatestreamclonebundle packed.hg
270 writing 2664 bytes for 6 files 276 writing 2664 bytes for 6 files
271 bundle requirements: generaldelta, revlogv1 277 bundle requirements: generaldelta, revlogv1
272 278
375 381
376 $ hg -R packed debugapplystreamclonebundle packed.hg 382 $ hg -R packed debugapplystreamclonebundle packed.hg
377 abort: cannot apply stream clone bundle on non-empty repo 383 abort: cannot apply stream clone bundle on non-empty repo
378 [255] 384 [255]
379 385
386 #endif
387
380 Create partial clones 388 Create partial clones
381 389
382 $ rm -r empty 390 $ rm -r empty
383 $ hg init empty 391 $ hg init empty
384 $ hg clone -r 3 test partial 392 $ hg clone -r 3 test partial
392 $ hg clone partial partial2 400 $ hg clone partial partial2
393 updating to branch default 401 updating to branch default
394 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 402 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
395 $ cd partial 403 $ cd partial
396 404
405 #if repobundlerepo
406
397 Log -R full.hg in partial 407 Log -R full.hg in partial
398 408
399 $ hg -R bundle://../full.hg log -T phases 409 $ hg -R bundle://../full.hg log -T phases
400 changeset: 8:aa35859c02ea 410 changeset: 8:aa35859c02ea
401 tag: tip 411 tag: tip
526 Outgoing -R does-not-exist.hg vs partial2 in partial 536 Outgoing -R does-not-exist.hg vs partial2 in partial
527 537
528 $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 538 $ hg -R bundle://../does-not-exist.hg outgoing ../partial2
529 abort: *../does-not-exist.hg* (glob) 539 abort: *../does-not-exist.hg* (glob)
530 [255] 540 [255]
541
542 #endif
543
531 $ cd .. 544 $ cd ..
532 545
533 hide outer repo 546 hide outer repo
534 $ hg init 547 $ hg init
535 548
536 Direct clone from bundle (all-history) 549 Direct clone from bundle (all-history)
550
551 #if repobundlerepo
537 552
538 $ hg clone full.hg full-clone 553 $ hg clone full.hg full-clone
539 requesting all changes 554 requesting all changes
540 adding changesets 555 adding changesets
541 adding manifests 556 adding manifests
614 date: Thu Jan 01 00:00:00 1970 +0000 629 date: Thu Jan 01 00:00:00 1970 +0000
615 summary: 0.3 630 summary: 0.3
616 631
617 $ cd .. 632 $ cd ..
618 633
619 test for 540d1059c802 634 #endif
620 635
621 test for 540d1059c802 636 test for 540d1059c802
622 637
623 $ hg init orig 638 $ hg init orig
624 $ cd orig 639 $ cd orig
636 $ hg ci -m 'change foo' 651 $ hg ci -m 'change foo'
637 $ hg bundle ../bundle.hg ../orig 652 $ hg bundle ../bundle.hg ../orig
638 searching for changes 653 searching for changes
639 1 changesets found 654 1 changesets found
640 655
641 $ cd ../orig 656 $ cd ..
657
658 #if repobundlerepo
659 $ cd orig
642 $ hg incoming ../bundle.hg 660 $ hg incoming ../bundle.hg
643 comparing with ../bundle.hg 661 comparing with ../bundle.hg
644 searching for changes 662 searching for changes
645 changeset: 2:ed1b79f46b9a 663 changeset: 2:ed1b79f46b9a
646 tag: tip 664 tag: tip
665 $ hg incoming ../test%23bundle.hg 683 $ hg incoming ../test%23bundle.hg
666 abort: repository ../test%23bundle.hg not found! 684 abort: repository ../test%23bundle.hg not found!
667 [255] 685 [255]
668 $ cd .. 686 $ cd ..
669 687
688 #endif
689
670 test to bundle revisions on the newly created branch (issue3828): 690 test to bundle revisions on the newly created branch (issue3828):
671 691
672 $ hg -q clone -U test test-clone 692 $ hg -q clone -U test test-clone
673 $ cd test 693 $ cd test
674 694
675 $ hg -q branch foo 695 $ hg -q branch foo
676 $ hg commit -m "create foo branch" 696 $ hg commit -m "create foo branch"
677 $ hg -q outgoing ../test-clone 697 $ hg -q outgoing ../test-clone
678 9:b4f5acb1ee27 698 9:b4f5acb1ee27
679 $ hg -q bundle --branch foo foo.hg ../test-clone 699 $ hg -q bundle --branch foo foo.hg ../test-clone
700 #if repobundlerepo
680 $ hg -R foo.hg -q log -r "bundle()" 701 $ hg -R foo.hg -q log -r "bundle()"
681 9:b4f5acb1ee27 702 9:b4f5acb1ee27
703 #endif
682 704
683 $ cd .. 705 $ cd ..
684 706
685 test for https://bz.mercurial-scm.org/1144 707 test for https://bz.mercurial-scm.org/1144
686 708
692 abort: 00changelog.i@bbd179dfa0a7: unknown parent! 714 abort: 00changelog.i@bbd179dfa0a7: unknown parent!
693 [255] 715 [255]
694 716
695 full history bundle, refuses to verify non-local repo 717 full history bundle, refuses to verify non-local repo
696 718
719 #if repobundlerepo
697 $ hg -R all.hg verify 720 $ hg -R all.hg verify
698 abort: cannot verify bundle or remote repos 721 abort: cannot verify bundle or remote repos
699 [255] 722 [255]
723 #endif
700 724
701 but, regular verify must continue to work 725 but, regular verify must continue to work
702 726
703 $ hg -R orig verify 727 $ hg -R orig verify
704 checking changesets 728 checking changesets
705 checking manifests 729 checking manifests
706 crosschecking files in changesets and manifests 730 crosschecking files in changesets and manifests
707 checking files 731 checking files
708 2 files, 2 changesets, 2 total revisions 732 2 files, 2 changesets, 2 total revisions
709 733
734 #if repobundlerepo
710 diff against bundle 735 diff against bundle
711 736
712 $ hg init b 737 $ hg init b
713 $ cd b 738 $ cd b
714 $ hg -R ../all.hg diff -r tip 739 $ hg -R ../all.hg diff -r tip
719 -0 744 -0
720 -1 745 -1
721 -2 746 -2
722 -3 747 -3
723 $ cd .. 748 $ cd ..
749 #endif
724 750
725 bundle single branch 751 bundle single branch
726 752
727 $ hg init branchy 753 $ hg init branchy
728 $ cd branchy 754 $ cd branchy
777 bundling: b 1/3 files (33.33%) 803 bundling: b 1/3 files (33.33%)
778 bundling: b1 2/3 files (66.67%) 804 bundling: b1 2/3 files (66.67%)
779 bundling: x 3/3 files (100.00%) 805 bundling: x 3/3 files (100.00%)
780 bundle2-output-part: "cache:rev-branch-cache" streamed payload 806 bundle2-output-part: "cache:rev-branch-cache" streamed payload
781 807
808 #if repobundlerepo
782 == Test for issue3441 809 == Test for issue3441
783 810
784 $ hg clone -q -r0 . part2 811 $ hg clone -q -r0 . part2
785 $ hg -q -R part2 pull bundle.hg 812 $ hg -q -R part2 pull bundle.hg
786 $ hg -R part2 verify 813 $ hg -R part2 verify
787 checking changesets 814 checking changesets
788 checking manifests 815 checking manifests
789 crosschecking files in changesets and manifests 816 crosschecking files in changesets and manifests
790 checking files 817 checking files
791 4 files, 3 changesets, 5 total revisions 818 4 files, 3 changesets, 5 total revisions
819 #endif
792 820
793 == Test bundling no commits 821 == Test bundling no commits
794 822
795 $ hg bundle -r 'public()' no-output.hg 823 $ hg bundle -r 'public()' no-output.hg
796 abort: no commits to bundle 824 abort: no commits to bundle
846 o changeset: 0:4fe08cd4693e 874 o changeset: 0:4fe08cd4693e
847 user: test 875 user: test
848 date: Thu Jan 01 00:00:00 1970 +0000 876 date: Thu Jan 01 00:00:00 1970 +0000
849 summary: 0 877 summary: 0
850 878
879
880 #if repobundlerepo
851 $ hg bundle --base 1 -r 3 ../update2bundled.hg 881 $ hg bundle --base 1 -r 3 ../update2bundled.hg
852 1 changesets found 882 1 changesets found
853 $ hg strip -r 3 883 $ hg strip -r 3
854 saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg 884 saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg
855 $ hg merge -R ../update2bundled.hg -r 3 885 $ hg merge -R ../update2bundled.hg -r 3
867 When user updates to the revision existing in the local repository 897 When user updates to the revision existing in the local repository
868 the warning shouldn't be emitted 898 the warning shouldn't be emitted
869 899
870 $ hg update -R ../update2bundled.hg -r 0 900 $ hg update -R ../update2bundled.hg -r 0
871 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 901 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
902 #endif