~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_pack_repository.py

Get a working chk_map using inventory implementation bootstrapped.

Show diffs side-by-side

added added

removed removed

Lines of Context:
511
511
            # can only stack on repositories that have compatible internal
512
512
            # metadata
513
513
            if getattr(repo._format, 'supports_tree_reference', False):
514
 
                matching_format_name = 'pack-0.92-subtree'
 
514
                if repo._format.supports_chks:
 
515
                    matching_format_name = 'development3-subtree'
 
516
                else:
 
517
                    matching_format_name = 'pack-0.92-subtree'
515
518
            else:
516
519
                matching_format_name = 'rich-root-pack'
517
520
            mismatching_format_name = 'pack-0.92'
518
521
        else:
519
 
            matching_format_name = 'pack-0.92'
 
522
            if repo._format.supports_chks:
 
523
                matching_format_name = 'development3'
 
524
            else:
 
525
                matching_format_name = 'pack-0.92'
520
526
            mismatching_format_name = 'pack-0.92-subtree'
521
527
        base = self.make_repository('base', format=matching_format_name)
522
528
        repo.add_fallback_repository(base)
527
533
            repo.add_fallback_repository, bad_repo)
528
534
        self.assertContainsRe(str(e),
529
535
            r'(?m)KnitPackRepository.*/mismatch/.*\nis not compatible with\n'
530
 
            r'KnitPackRepository.*/repo/.*\n'
 
536
            r'.*Repository.*/repo/.*\n'
531
537
            r'different rich-root support')
532
538
 
533
539
    def test_stack_checks_serializers_compatibility(self):
535
541
        if getattr(repo._format, 'supports_tree_reference', False):
536
542
            # can only stack on repositories that have compatible internal
537
543
            # metadata
538
 
            matching_format_name = 'pack-0.92-subtree'
 
544
            if repo._format.supports_chks:
 
545
                matching_format_name = 'development3-subtree'
 
546
            else:
 
547
                matching_format_name = 'pack-0.92-subtree'
539
548
            mismatching_format_name = 'rich-root-pack'
540
549
        else:
541
550
            if repo.supports_rich_root():
553
562
            repo.add_fallback_repository, bad_repo)
554
563
        self.assertContainsRe(str(e),
555
564
            r'(?m)KnitPackRepository.*/mismatch/.*\nis not compatible with\n'
556
 
            r'KnitPackRepository.*/repo/.*\n'
 
565
            r'.*Repository.*/repo/.*\n'
557
566
            r'different serializers')
558
567
 
559
568
    def test_adding_pack_does_not_record_pack_names_from_other_repositories(self):