~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_branch.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:
379
379
        self.assertEqual(committed.properties["branch-nick"],
380
380
                         "My happy branch")
381
381
 
 
382
    def test_create_colocated(self):
 
383
        try:
 
384
            repo = self.make_repository('.', shared=True)
 
385
        except errors.IncompatibleFormat:
 
386
            return
 
387
        self.assertEquals(0, len(repo.bzrdir.list_branches()))
 
388
        try:
 
389
            child_branch1 = self.branch_format.initialize(repo.bzrdir, 
 
390
                name='branch1')
 
391
        except (errors.UninitializableFormat, errors.NoColocatedBranchSupport):
 
392
            # branch references are not default init'able and
 
393
            # not all bzrdirs support colocated branches.
 
394
            return
 
395
        self.assertEquals(1, len(repo.bzrdir.list_branches()))
 
396
        self.branch_format.initialize(repo.bzrdir, name='branch2')
 
397
        self.assertEquals(2, len(repo.bzrdir.list_branches()))
 
398
 
382
399
    def test_create_open_branch_uses_repository(self):
383
400
        try:
384
401
            repo = self.make_repository('.', shared=True)