~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2012-01-23 15:31:35 UTC
  • mfrom: (6443.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20120123153135-8v3r3z1lx055vmpl
(jelmer) Merge the 2.5 series branch. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
376
376
        referenced_branch = self.make_branch('referencced')
377
377
        dir = self.make_bzrdir('source')
378
378
        try:
379
 
            reference = bzrlib.branch.BranchReferenceFormat().initialize(dir,
380
 
                target_branch=referenced_branch)
 
379
            dir.set_branch_reference(referenced_branch)
381
380
        except errors.IncompatibleFormat:
382
381
            # this is ok too, not all formats have to support references.
383
382
            return
420
419
        referenced_branch = self.make_branch('referencced')
421
420
        dir = self.make_bzrdir('source')
422
421
        try:
423
 
            reference = bzrlib.branch.BranchReferenceFormat().initialize(dir,
424
 
                target_branch=referenced_branch)
 
422
            dir.set_branch_reference(referenced_branch)
425
423
        except errors.IncompatibleFormat:
426
424
            # this is ok too, not all formats have to support references.
427
425
            return
691
689
            target_branch = repo.bzrdir.create_branch(name='foo')
692
690
        except errors.NoColocatedBranchSupport:
693
691
            raise TestNotApplicable('Format does not support colocation')
694
 
        reference = branch.BranchReferenceFormat().initialize(
695
 
            repo.bzrdir, target_branch=target_branch)
 
692
        repo.bzrdir.set_branch_reference(target_branch)
696
693
        self.assertEqual(set(["", 'foo']),
697
694
                         set(repo.bzrdir.get_branches().keys()))