747
748
source = self.make_repository('source', format='pack-0.92')
748
749
target = self.make_repository('target', format='pack-0.92')
749
750
stream_source = source._get_source(target._format)
750
self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
751
self.assertIsInstance(stream_source, knitpack_repo.KnitPackStreamSource)
752
753
def test_source_to_exact_pack_rich_root_pack(self):
753
754
source = self.make_repository('source', format='rich-root-pack')
754
755
target = self.make_repository('target', format='rich-root-pack')
755
756
stream_source = source._get_source(target._format)
756
self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
757
self.assertIsInstance(stream_source, knitpack_repo.KnitPackStreamSource)
758
759
def test_source_to_exact_pack_19(self):
759
760
source = self.make_repository('source', format='1.9')
760
761
target = self.make_repository('target', format='1.9')
761
762
stream_source = source._get_source(target._format)
762
self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
763
self.assertIsInstance(stream_source, knitpack_repo.KnitPackStreamSource)
764
765
def test_source_to_exact_pack_19_rich_root(self):
765
766
source = self.make_repository('source', format='1.9-rich-root')
766
767
target = self.make_repository('target', format='1.9-rich-root')
767
768
stream_source = source._get_source(target._format)
768
self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
769
self.assertIsInstance(stream_source, knitpack_repo.KnitPackStreamSource)
770
771
def test_source_to_remote_exact_pack_19(self):
771
772
trans = self.make_smart_server('target')
774
775
target = self.make_repository('target', format='1.9')
775
776
target = repository.Repository.open(trans.base)
776
777
stream_source = source._get_source(target._format)
777
self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
778
self.assertIsInstance(stream_source, knitpack_repo.KnitPackStreamSource)
779
780
def test_stream_source_to_non_exact(self):
780
781
source = self.make_repository('source', format='pack-0.92')