~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Alexander Belchenko
  • Date: 2007-11-19 22:54:30 UTC
  • mfrom: (3006 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3008.
  • Revision ID: bialix@ukr.net-20071119225430-x0ewosrsagis0yno
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
525
525
        self.skipIfNoWorkingTree(target)
526
526
        self.assertEqual(['1'], target.open_workingtree().get_parent_ids())
527
527
 
 
528
    def test_clone_bzrdir_into_notrees_repo(self):
 
529
        """Cloning into a no-trees repo should not create a working tree"""
 
530
        tree = self.make_branch_and_tree('source')
 
531
        self.build_tree(['source/foo'])
 
532
        tree.add('foo')
 
533
        tree.commit('revision 1')
 
534
 
 
535
        try:
 
536
            repo = self.make_repository('repo', shared=True)
 
537
        except errors.IncompatibleFormat:
 
538
            raise TestNotApplicable('must support shared repositories')
 
539
        if repo.make_working_trees():
 
540
            repo.set_make_working_trees(False)
 
541
            self.assertFalse(repo.make_working_trees())
 
542
 
 
543
        dir = tree.bzrdir
 
544
        a_dir = dir.clone(self.get_url('repo/a'))
 
545
        a_dir.open_branch()
 
546
        self.assertRaises(errors.NoWorkingTree, a_dir.open_workingtree)
 
547
 
528
548
    def test_get_branch_reference_on_reference(self):
529
549
        """get_branch_reference should return the right url."""
530
550
        referenced_branch = self.make_branch('referenced')