##// END OF EJS Templates
treemanifest: add tests covering hg diff of partial trees...
Durham Goode -
r31262:1871a1ee default
parent child Browse files
Show More
@@ -437,6 +437,16 b' Create deeper repo with tree manifests.'
437
437
438 $ hg ci -Aqm 'initial'
438 $ hg ci -Aqm 'initial'
439
439
440 $ echo >> .A/one.txt
441 $ echo >> .A/two.txt
442 $ echo >> b/bar/fruits.txt
443 $ echo >> b/bar/orange/fly/gnat.py
444 $ echo >> b/bar/orange/fly/housefly.txt
445 $ echo >> b/foo/apple/bees/flower.py
446 $ echo >> c.txt
447 $ echo >> d.py
448 $ hg ci -Aqm 'second'
449
440 We'll see that visitdir works by removing some treemanifest revlogs and running
450 We'll see that visitdir works by removing some treemanifest revlogs and running
441 the files command with various parameters.
451 the files command with various parameters.
442
452
@@ -468,6 +478,12 b' Test files for a subdirectory.'
468 b/bar/orange/fly/gnat.py (glob)
478 b/bar/orange/fly/gnat.py (glob)
469 b/bar/orange/fly/housefly.txt (glob)
479 b/bar/orange/fly/housefly.txt (glob)
470 b/foo/apple/bees/flower.py (glob)
480 b/foo/apple/bees/flower.py (glob)
481 $ hg diff -r '.^' -r . --stat b
482 b/bar/fruits.txt | 1 +
483 b/bar/orange/fly/gnat.py | 1 +
484 b/bar/orange/fly/housefly.txt | 1 +
485 b/foo/apple/bees/flower.py | 1 +
486 4 files changed, 4 insertions(+), 0 deletions(-)
471 $ cp -R .hg/store-copy/. .hg/store
487 $ cp -R .hg/store-copy/. .hg/store
472
488
473 Test files with just includes and excludes.
489 Test files with just includes and excludes.
@@ -477,6 +493,9 b' Test files with just includes and exclud'
477 $ rm -r .hg/store/meta/b/foo/apple/bees
493 $ rm -r .hg/store/meta/b/foo/apple/bees
478 $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
494 $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
479 b/bar/fruits.txt (glob)
495 b/bar/fruits.txt (glob)
496 $ hg diff -r '.^' -r . --stat -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
497 b/bar/fruits.txt | 1 +
498 1 files changed, 1 insertions(+), 0 deletions(-)
480 $ cp -R .hg/store-copy/. .hg/store
499 $ cp -R .hg/store-copy/. .hg/store
481
500
482 Test files for a subdirectory, excluding a directory within it.
501 Test files for a subdirectory, excluding a directory within it.
@@ -487,6 +506,11 b' Test files for a subdirectory, excluding'
487 b/bar/fruits.txt (glob)
506 b/bar/fruits.txt (glob)
488 b/bar/orange/fly/gnat.py (glob)
507 b/bar/orange/fly/gnat.py (glob)
489 b/bar/orange/fly/housefly.txt (glob)
508 b/bar/orange/fly/housefly.txt (glob)
509 $ hg diff -r '.^' -r . --stat -X path:b/foo b
510 b/bar/fruits.txt | 1 +
511 b/bar/orange/fly/gnat.py | 1 +
512 b/bar/orange/fly/housefly.txt | 1 +
513 3 files changed, 3 insertions(+), 0 deletions(-)
490 $ cp -R .hg/store-copy/. .hg/store
514 $ cp -R .hg/store-copy/. .hg/store
491
515
492 Test files for a sub directory, including only a directory within it, and
516 Test files for a sub directory, including only a directory within it, and
@@ -497,6 +521,10 b' including an unrelated directory.'
497 $ hg files -r . -I path:b/bar/orange -I path:a b
521 $ hg files -r . -I path:b/bar/orange -I path:a b
498 b/bar/orange/fly/gnat.py (glob)
522 b/bar/orange/fly/gnat.py (glob)
499 b/bar/orange/fly/housefly.txt (glob)
523 b/bar/orange/fly/housefly.txt (glob)
524 $ hg diff -r '.^' -r . --stat -I path:b/bar/orange -I path:a b
525 b/bar/orange/fly/gnat.py | 1 +
526 b/bar/orange/fly/housefly.txt | 1 +
527 2 files changed, 2 insertions(+), 0 deletions(-)
500 $ cp -R .hg/store-copy/. .hg/store
528 $ cp -R .hg/store-copy/. .hg/store
501
529
502 Test files for a pattern, including a directory, and excluding a directory
530 Test files for a pattern, including a directory, and excluding a directory
@@ -507,6 +535,9 b' within that.'
507 $ rm -r .hg/store/meta/b/bar/orange
535 $ rm -r .hg/store/meta/b/bar/orange
508 $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
536 $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
509 b/bar/fruits.txt (glob)
537 b/bar/fruits.txt (glob)
538 $ hg diff -r '.^' -r . --stat glob:**.txt -I path:b/bar -X path:b/bar/orange
539 b/bar/fruits.txt | 1 +
540 1 files changed, 1 insertions(+), 0 deletions(-)
510 $ cp -R .hg/store-copy/. .hg/store
541 $ cp -R .hg/store-copy/. .hg/store
511
542
512 Add some more changes to the deep repo
543 Add some more changes to the deep repo
@@ -522,7 +553,7 b' Verify works'
522 checking directory manifests
553 checking directory manifests
523 crosschecking files in changesets and manifests
554 crosschecking files in changesets and manifests
524 checking files
555 checking files
525 8 files, 3 changesets, 10 total revisions
556 8 files, 4 changesets, 18 total revisions
526
557
527 Dirlogs are included in fncache
558 Dirlogs are included in fncache
528 $ grep meta/.A/00manifest.i .hg/store/fncache
559 $ grep meta/.A/00manifest.i .hg/store/fncache
@@ -563,8 +594,9 b' Verify reports missing dirlog'
563 checking directory manifests
594 checking directory manifests
564 0: empty or missing b/
595 0: empty or missing b/
565 b/@0: parent-directory manifest refers to unknown revision 67688a370455
596 b/@0: parent-directory manifest refers to unknown revision 67688a370455
566 b/@1: parent-directory manifest refers to unknown revision f38e85d334c5
597 b/@1: parent-directory manifest refers to unknown revision f065da70369e
567 b/@2: parent-directory manifest refers to unknown revision 99c9792fd4b0
598 b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b
599 b/@3: parent-directory manifest refers to unknown revision 367152e6af28
568 warning: orphan revlog 'meta/b/bar/00manifest.i'
600 warning: orphan revlog 'meta/b/bar/00manifest.i'
569 warning: orphan revlog 'meta/b/bar/orange/00manifest.i'
601 warning: orphan revlog 'meta/b/bar/orange/00manifest.i'
570 warning: orphan revlog 'meta/b/bar/orange/fly/00manifest.i'
602 warning: orphan revlog 'meta/b/bar/orange/fly/00manifest.i'
@@ -577,9 +609,9 b' Verify reports missing dirlog'
577 b/bar/orange/fly/housefly.txt@0: in changeset but not in manifest
609 b/bar/orange/fly/housefly.txt@0: in changeset but not in manifest
578 b/foo/apple/bees/flower.py@0: in changeset but not in manifest
610 b/foo/apple/bees/flower.py@0: in changeset but not in manifest
579 checking files
611 checking files
580 8 files, 3 changesets, 10 total revisions
612 8 files, 4 changesets, 18 total revisions
581 6 warnings encountered!
613 6 warnings encountered!
582 8 integrity errors encountered!
614 9 integrity errors encountered!
583 (first damaged changeset appears to be 0)
615 (first damaged changeset appears to be 0)
584 [1]
616 [1]
585 $ cp -R .hg/store-newcopy/. .hg/store
617 $ cp -R .hg/store-newcopy/. .hg/store
@@ -590,22 +622,22 b' Verify reports missing dirlog entry'
590 checking changesets
622 checking changesets
591 checking manifests
623 checking manifests
592 checking directory manifests
624 checking directory manifests
593 b/@1: parent-directory manifest refers to unknown revision f38e85d334c5
625 b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b
594 b/@2: parent-directory manifest refers to unknown revision 99c9792fd4b0
626 b/@3: parent-directory manifest refers to unknown revision 367152e6af28
595 b/bar/@?: rev 1 points to unexpected changeset 1
596 b/bar/@?: 5e03c4ee5e4a not in parent-directory manifest
597 b/bar/@?: rev 2 points to unexpected changeset 2
627 b/bar/@?: rev 2 points to unexpected changeset 2
598 b/bar/@?: 1b16940d66d6 not in parent-directory manifest
628 b/bar/@?: 44d7e1146e0d not in parent-directory manifest
599 b/bar/orange/@?: rev 1 points to unexpected changeset 2
629 b/bar/@?: rev 3 points to unexpected changeset 3
630 b/bar/@?: 70b10c6b17b7 not in parent-directory manifest
631 b/bar/orange/@?: rev 2 points to unexpected changeset 3
600 (expected None)
632 (expected None)
601 b/bar/orange/fly/@?: rev 1 points to unexpected changeset 2
633 b/bar/orange/fly/@?: rev 2 points to unexpected changeset 3
602 (expected None)
634 (expected None)
603 crosschecking files in changesets and manifests
635 crosschecking files in changesets and manifests
604 checking files
636 checking files
605 8 files, 3 changesets, 10 total revisions
637 8 files, 4 changesets, 18 total revisions
606 2 warnings encountered!
638 2 warnings encountered!
607 8 integrity errors encountered!
639 8 integrity errors encountered!
608 (first damaged changeset appears to be 1)
640 (first damaged changeset appears to be 2)
609 [1]
641 [1]
610 $ cp -R .hg/store-newcopy/. .hg/store
642 $ cp -R .hg/store-newcopy/. .hg/store
611
643
@@ -621,7 +653,7 b' We can clone even with the knob turned o'
621 adding changesets
653 adding changesets
622 adding manifests
654 adding manifests
623 adding file changes
655 adding file changes
624 added 3 changesets with 10 changes to 8 files
656 added 4 changesets with 18 changes to 8 files
625 updating to branch default
657 updating to branch default
626 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
658 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
627 No server errors.
659 No server errors.
@@ -656,7 +688,7 b' Verify passes.'
656 checking directory manifests
688 checking directory manifests
657 crosschecking files in changesets and manifests
689 crosschecking files in changesets and manifests
658 checking files
690 checking files
659 8 files, 3 changesets, 10 total revisions
691 8 files, 4 changesets, 18 total revisions
660 $ cd ..
692 $ cd ..
661
693
662 Create clones using old repo formats to use in later tests
694 Create clones using old repo formats to use in later tests
@@ -667,7 +699,7 b' Create clones using old repo formats to '
667 adding changesets
699 adding changesets
668 adding manifests
700 adding manifests
669 adding file changes
701 adding file changes
670 added 3 changesets with 10 changes to 8 files
702 added 4 changesets with 18 changes to 8 files
671 updating to branch default
703 updating to branch default
672 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
704 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
673 $ cd deeprepo-basicstore
705 $ cd deeprepo-basicstore
@@ -683,7 +715,7 b' Create clones using old repo formats to '
683 adding changesets
715 adding changesets
684 adding manifests
716 adding manifests
685 adding file changes
717 adding file changes
686 added 3 changesets with 10 changes to 8 files
718 added 4 changesets with 18 changes to 8 files
687 updating to branch default
719 updating to branch default
688 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
720 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
689 $ cd deeprepo-encodedstore
721 $ cd deeprepo-encodedstore
@@ -701,7 +733,7 b' Local clone with basicstore'
701 checking directory manifests
733 checking directory manifests
702 crosschecking files in changesets and manifests
734 crosschecking files in changesets and manifests
703 checking files
735 checking files
704 8 files, 3 changesets, 10 total revisions
736 8 files, 4 changesets, 18 total revisions
705
737
706 Local clone with encodedstore
738 Local clone with encodedstore
707 $ hg clone -U deeprepo-encodedstore local-clone-encodedstore
739 $ hg clone -U deeprepo-encodedstore local-clone-encodedstore
@@ -711,7 +743,7 b' Local clone with encodedstore'
711 checking directory manifests
743 checking directory manifests
712 crosschecking files in changesets and manifests
744 crosschecking files in changesets and manifests
713 checking files
745 checking files
714 8 files, 3 changesets, 10 total revisions
746 8 files, 4 changesets, 18 total revisions
715
747
716 Local clone with fncachestore
748 Local clone with fncachestore
717 $ hg clone -U deeprepo local-clone-fncachestore
749 $ hg clone -U deeprepo local-clone-fncachestore
@@ -721,7 +753,7 b' Local clone with fncachestore'
721 checking directory manifests
753 checking directory manifests
722 crosschecking files in changesets and manifests
754 crosschecking files in changesets and manifests
723 checking files
755 checking files
724 8 files, 3 changesets, 10 total revisions
756 8 files, 4 changesets, 18 total revisions
725
757
726 Stream clone with basicstore
758 Stream clone with basicstore
727 $ hg clone --config experimental.changegroup3=True --uncompressed -U \
759 $ hg clone --config experimental.changegroup3=True --uncompressed -U \
@@ -737,7 +769,7 b' Stream clone with basicstore'
737 checking directory manifests
769 checking directory manifests
738 crosschecking files in changesets and manifests
770 crosschecking files in changesets and manifests
739 checking files
771 checking files
740 8 files, 3 changesets, 10 total revisions
772 8 files, 4 changesets, 18 total revisions
741
773
742 Stream clone with encodedstore
774 Stream clone with encodedstore
743 $ hg clone --config experimental.changegroup3=True --uncompressed -U \
775 $ hg clone --config experimental.changegroup3=True --uncompressed -U \
@@ -753,7 +785,7 b' Stream clone with encodedstore'
753 checking directory manifests
785 checking directory manifests
754 crosschecking files in changesets and manifests
786 crosschecking files in changesets and manifests
755 checking files
787 checking files
756 8 files, 3 changesets, 10 total revisions
788 8 files, 4 changesets, 18 total revisions
757
789
758 Stream clone with fncachestore
790 Stream clone with fncachestore
759 $ hg clone --config experimental.changegroup3=True --uncompressed -U \
791 $ hg clone --config experimental.changegroup3=True --uncompressed -U \
@@ -769,11 +801,11 b' Stream clone with fncachestore'
769 checking directory manifests
801 checking directory manifests
770 crosschecking files in changesets and manifests
802 crosschecking files in changesets and manifests
771 checking files
803 checking files
772 8 files, 3 changesets, 10 total revisions
804 8 files, 4 changesets, 18 total revisions
773
805
774 Packed bundle
806 Packed bundle
775 $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg
807 $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg
776 writing 3349 bytes for 18 files
808 writing 5330 bytes for 18 files
777 bundle requirements: generaldelta, revlogv1, treemanifest
809 bundle requirements: generaldelta, revlogv1, treemanifest
778 $ hg debugbundle --spec repo-packed.hg
810 $ hg debugbundle --spec repo-packed.hg
779 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Ctreemanifest
811 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Ctreemanifest
General Comments 0
You need to be logged in to leave comments. Login now