~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-03-11 13:47:06 UTC
  • mfrom: (5051.3.16 use-branch-open)
  • Revision ID: pqm@pqm.ubuntu.com-20100311134706-kaerqhx3lf7xn6rh
(Jelmer) Pass colocated branch names further down the call stack.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    )
37
37
import bzrlib.branch
38
38
from bzrlib.errors import (NotBranchError,
 
39
                           NoColocatedBranchSupport,
39
40
                           UnknownFormatError,
40
41
                           UnsupportedFormatError,
41
42
                           )
206
207
        """See BzrDir.open_repository."""
207
208
        return SampleRepository(self)
208
209
 
209
 
    def create_branch(self):
 
210
    def create_branch(self, name=None):
210
211
        """See BzrDir.create_branch."""
 
212
        if name is not None:
 
213
            raise NoColocatedBranchSupport(self)
211
214
        return SampleBranch(self)
212
215
 
213
216
    def create_workingtree(self):
468
471
        # Make stackable source branch with an unstackable repo format.
469
472
        source_bzrdir = self.make_bzrdir('source')
470
473
        pack_repo.RepositoryFormatKnitPack1().initialize(source_bzrdir)
471
 
        source_branch = bzrlib.branch.BzrBranchFormat7().initialize(source_bzrdir)
 
474
        source_branch = bzrlib.branch.BzrBranchFormat7().initialize(
 
475
            source_bzrdir)
472
476
        # Make a directory with a default stacking policy
473
477
        parent_bzrdir = self.make_bzrdir('parent')
474
478
        stacked_on = self.make_branch('parent/stacked-on', format='pack-0.92')