~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_switch.py

  • Committer: Vincent Ladeuil
  • Date: 2012-03-08 18:30:33 UTC
  • mfrom: (6487 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6488.
  • Revision ID: v.ladeuil+lp@free.fr-20120308183033-bccqnbr1tpozs711
Merge bzr.dev resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import os
22
22
 
23
 
from bzrlib.bzrdir import BzrDir
 
23
from bzrlib.controldir import ControlDir
24
24
from bzrlib import (
25
 
        osutils,
26
 
        urlutils,
27
 
        branch,
28
 
        )
 
25
    osutils,
 
26
    urlutils,
 
27
    branch,
 
28
    )
29
29
from bzrlib.workingtree import WorkingTree
30
30
from bzrlib.tests import (
31
 
        TestCaseWithTransport,
32
 
        script,
33
 
        )
 
31
    TestCaseWithTransport,
 
32
    script,
 
33
    )
34
34
from bzrlib.tests.features import UnicodeFilenameFeature
35
35
from bzrlib.directory_service import directories
36
36
 
191
191
        revid2 = tree.commit('rev2')
192
192
        self.run_bzr(['switch', '-b', 'anotherbranch'])
193
193
        self.assertEquals(
194
 
            ['', 'anotherbranch'],
195
 
            tree.branch.bzrdir.get_branches().keys())
 
194
            set(['', 'anotherbranch']),
 
195
            set(tree.branch.bzrdir.get_branches().keys()))
196
196
 
197
197
    def test_switch_into_unrelated_colocated(self):
198
198
        # Create a new colocated branch from an existing non-colocated branch.
237
237
        tree.add('file-1')
238
238
        revid1 = tree.commit('rev1')
239
239
        self.run_bzr(['switch', '-b', 'anotherbranch'], working_dir='branch-1')
240
 
        bzrdir = BzrDir.open("branch-1")
 
240
        bzrdir = ControlDir.open("branch-1")
241
241
        self.assertEquals(
242
242
            set([b.name for b in bzrdir.list_branches()]),
243
243
            set(["foo", "anotherbranch"]))
256
256
        tree.add('file-1')
257
257
        revid1 = tree.commit('rev1')
258
258
        self.run_bzr(['switch', '-b', u'branch\xe9'], working_dir='branch-1')
259
 
        bzrdir = BzrDir.open("branch-1")
 
259
        bzrdir = ControlDir.open("branch-1")
260
260
        self.assertEquals(
261
261
            set([b.name for b in bzrdir.list_branches()]),
262
262
            set(["foo", u"branch\xe9"]))
475
475
        # become necessary for this use case. Please do not adjust this number
476
476
        # upwards without agreement from bzr's network support maintainers.
477
477
        self.assertLength(24, self.hpss_calls)
478
 
        self.assertLength(5, self.hpss_connections)
 
478
        self.assertLength(4, self.hpss_connections)
479
479
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)