~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_bound_sftp.py

  • Committer: Patch Queue Manager
  • Date: 2012-03-06 19:49:19 UTC
  • mfrom: (6472.2.6 use-bzr-controldir)
  • Revision ID: pqm@pqm.ubuntu.com-20120306194919-kt7mj6xmhifsgees
(jelmer) Use bzrlib.controldir for generic access to control directories,
 rather than bzrlib.bzrdir. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from bzrlib import (
23
23
    branch,
24
 
    bzrdir,
 
24
    controldir,
25
25
    errors,
26
26
    tests,
27
27
    )
39
39
 
40
40
    def create_branches(self):
41
41
        self.build_tree(['base/', 'base/a', 'base/b'])
42
 
        format = bzrdir.format_registry.make_bzrdir('knit')
 
42
        format = controldir.format_registry.make_bzrdir('knit')
43
43
        try:
44
 
            wt_base = bzrdir.BzrDir.create_standalone_workingtree(
 
44
            wt_base = controldir.ControlDir.create_standalone_workingtree(
45
45
                self.get_url('base'), format=format)
46
46
        except errors.NotLocalUrl:
47
47
            raise tests.TestSkipped('Not a local URL')
63
63
    def test_simple_binding(self):
64
64
        self.build_tree(['base/', 'base/a', 'base/b', 'child/'])
65
65
        try:
66
 
            wt_base = bzrdir.BzrDir.create_standalone_workingtree(
 
66
            wt_base = controldir.ControlDir.create_standalone_workingtree(
67
67
                self.get_url('base'))
68
68
        except errors.NotLocalUrl:
69
69
            raise tests.TestSkipped('Not a local URL')
76
76
        # manually make a branch we can bind, because the default format
77
77
        # may not be bindable-from, and we want to test the side effects etc
78
78
        # of bondage.
79
 
        format = bzrdir.format_registry.make_bzrdir('knit')
80
 
        b_child = bzrdir.BzrDir.create_branch_convenience(
 
79
        format = controldir.format_registry.make_bzrdir('knit')
 
80
        b_child = controldir.ControlDir.create_branch_convenience(
81
81
            'child', format=format)
82
82
        self.assertEqual(None, b_child.get_bound_location())
83
83
        self.assertEqual(None, b_child.get_master_branch())
144
144
                wt_child2.commit, 'child2', rev_id='r@d-2')
145
145
 
146
146
    def test_unbinding(self):
147
 
        from bzrlib import transport
148
147
        b_base, wt_child = self.create_branches()
149
148
 
150
149
        # TestCaseWithSFTPServer only allows you to connect one time