~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-04-16 11:08:11 UTC
  • mfrom: (6521 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6522.
  • Revision ID: jelmer@samba.org-20120416110811-0y996ihqy9o2bb1t
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
            'branch-format',
50
50
            bzrdir.BzrDirMetaFormat1().get_format_string(),
51
51
            mode=to_convert._get_file_mode())
52
 
        return bzrdir.BzrDir.open(to_convert.user_url)
 
52
        return controldir.ControlDir.open(to_convert.user_url)
53
53
 
54
54
 
55
55
class OldBzrDirFormat(bzrdir.BzrDirMetaFormat1):
155
155
""" % (display_url, display_url, display_url, display_url, backup_dir), out)
156
156
        self.assertEqualDiff("", err)
157
157
        self.assertTrue(isinstance(
158
 
            bzrdir.BzrDir.open(self.get_url(path))._format,
 
158
            controldir.ControlDir.open(self.get_url(path))._format,
159
159
            bzrdir.BzrDirMetaFormat1))
160
160
 
161
161
    def test_upgrade_explicit_knit(self):
179
179
""" % (display_url, display_url, display_url, display_url, backup_dir),
180
180
                             out)
181
181
        self.assertEqualDiff("", err)
182
 
        converted_dir = bzrdir.BzrDir.open(self.get_url('branch'))
 
182
        converted_dir = controldir.ControlDir.open(self.get_url('branch'))
183
183
        self.assertTrue(isinstance(converted_dir._format,
184
184
                                   bzrdir.BzrDirMetaFormat1))
185
185
        self.assertTrue(isinstance(converted_dir.open_repository()._format,
196
196
        self.run_bzr('upgrade --format=2a branch-foo %s' % (option_str,))
197
197
 
198
198
    def assertBranchFormat(self, dir, format):
199
 
        branch = bzrdir.BzrDir.open_tree_or_branch(self.get_url(dir))[1]
 
199
        branch = controldir.ControlDir.open_tree_or_branch(self.get_url(dir))[1]
200
200
        branch_format = branch._format
201
 
        meta_format = bzrdir.format_registry.make_bzrdir(format)
 
201
        meta_format = controldir.format_registry.make_bzrdir(format)
202
202
        expected_format = meta_format.get_branch_format()
203
203
        self.assertEqual(expected_format, branch_format)
204
204
 
245
245
""" % (display_url, display_url, display_url, display_url, backup_dir2), out)
246
246
        self.assertEqualDiff("", err)
247
247
        self.assertTrue(isinstance(
248
 
            bzrdir.BzrDir.open(self.get_url("old_format_branch"))._format,
 
248
            controldir.ControlDir.open(self.get_url("old_format_branch"))._format,
249
249
            bzrdir.BzrDirMetaFormat1))
250
250
        self.assertTrue(t.has(backup_dir2))
251
251