~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2010-08-06 18:14:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5374.
  • Revision ID: john@arbash-meinel.com-20100806181422-puv63wplscz2mc0w
As suggested by Martin <gz>, switch to tuple unpacking for attribute assignment

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from bzrlib import (
22
22
    bzrdir,
23
 
    controldir,
 
23
    repository,
24
24
    transport,
25
25
    )
26
26
from bzrlib.tests import (
27
27
    features,
 
28
    TestCaseInTempDir,
28
29
    TestCaseWithTransport,
29
30
    )
30
31
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
37
38
 
38
39
    def setUp(self):
39
40
        super(TestWithUpgradableBranches, self).setUp()
40
 
        self.addCleanup(controldir.ControlDirFormat._set_default_format,
41
 
                        controldir.ControlDirFormat.get_default_format())
 
41
        self.addCleanup(bzrdir.BzrDirFormat._set_default_format,
 
42
                        bzrdir.BzrDirFormat.get_default_format())
42
43
 
43
44
    def make_current_format_branch_and_checkout(self):
44
45
        current_tree = self.make_branch_and_tree('current_format_branch',
103
104
        self.make_format_5_branch()
104
105
        url = transport.get_transport(self.get_url('format_5_branch')).base
105
106
        # check --format takes effect
106
 
        controldir.ControlDirFormat._set_default_format(bzrdir.BzrDirFormat5())
 
107
        bzrdir.BzrDirFormat._set_default_format(bzrdir.BzrDirFormat5())
107
108
        backup_dir = 'backup.bzr.~1~'
108
109
        (out, err) = self.run_bzr(
109
110
            ['upgrade', '--format=metaweave', url])
127
128
        self.make_metadir_weave_branch()
128
129
        url = transport.get_transport(self.get_url('metadir_weave_branch')).base
129
130
        # check --format takes effect
130
 
        controldir.ControlDirFormat._set_default_format(bzrdir.BzrDirFormat5())
 
131
        bzrdir.BzrDirFormat._set_default_format(bzrdir.BzrDirFormat5())
131
132
        backup_dir = 'backup.bzr.~1~'
132
133
        (out, err) = self.run_bzr(
133
134
            ['upgrade', '--format=knit', url])
165
166
        self.make_format_5_branch()
166
167
        t = transport.get_transport(self.get_url('format_5_branch'))
167
168
        url = t.base
168
 
        controldir.ControlDirFormat._set_default_format(bzrdir.BzrDirFormat5())
 
169
        bzrdir.BzrDirFormat._set_default_format(bzrdir.BzrDirFormat5())
169
170
        backup_dir1 = 'backup.bzr.~1~'
170
171
        backup_dir2 = 'backup.bzr.~2~'
171
172
        # explicitly create backup_dir1. bzr should create the .~2~ directory