~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/bzrdir_implementations/test_bzrdir.py

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
537
537
            target.open_repository())
538
538
        target.open_workingtree().revert()
539
539
 
 
540
    def test_clone_on_transport_preserves_repo_format(self):
 
541
        if self.bzrdir_format == bzrdir.format_registry.make_bzrdir('default'):
 
542
            format = 'knit'
 
543
        else:
 
544
            format = None
 
545
        source_branch = self.make_branch('source', format=format)
 
546
        # Ensure no format data is cached
 
547
        a_dir = bzrlib.branch.Branch.open_from_transport(
 
548
            self.get_transport('source')).bzrdir
 
549
        target_transport = a_dir.root_transport.clone('..').clone('target')
 
550
        target_bzrdir = a_dir.clone_on_transport(target_transport)
 
551
        target_repo = target_bzrdir.open_repository()
 
552
        self.assertEqual(target_repo._format, source_branch.repository._format)
 
553
 
540
554
    def test_revert_inventory(self):
541
555
        tree = self.make_branch_and_tree('source')
542
556
        self.build_tree(['source/foo'])