~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge pt1 hooks branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
    def test_upgrade_explicit_metaformat(self):
110
110
        # users can force an upgrade to metadir format.
111
111
        path = self.make_format_5_branch()
112
 
        url = transport.get_transport(self.get_url(path)).base
 
112
        url = self.get_transport(path).base
113
113
        # check --format takes effect
114
114
        controldir.ControlDirFormat._set_default_format(bzrdir.BzrDirFormat5())
115
115
        backup_dir = 'backup.bzr.~1~'
134
134
        # users can force an upgrade to knit format from a metadir weave
135
135
        # branch
136
136
        self.make_metadir_weave_branch()
137
 
        url = transport.get_transport(self.get_url('metadir_weave_branch')).base
 
137
        url = self.get_transport('metadir_weave_branch').base
138
138
        # check --format takes effect
139
139
        controldir.ControlDirFormat._set_default_format(bzrdir.BzrDirFormat5())
140
140
        backup_dir = 'backup.bzr.~1~'
196
196
 
197
197
    def test_upgrade_with_existing_backup_dir(self):
198
198
        path = self.make_format_5_branch()
199
 
        t = transport.get_transport(self.get_url(path))
 
199
        t = self.get_transport(path)
200
200
        url = t.base
201
201
        controldir.ControlDirFormat._set_default_format(bzrdir.BzrDirFormat5())
202
202
        backup_dir1 = 'backup.bzr.~1~'
222
222
            bzrdir.BzrDirMetaFormat1))
223
223
        self.assertTrue(t.has(backup_dir2))
224
224
 
 
225
 
225
226
class SFTPTests(TestCaseWithSFTPServer):
226
227
    """Tests for upgrade over sftp."""
227
228
 
228
229
    def test_upgrade_url(self):
229
230
        self.run_bzr('init --format=weave')
230
 
        t = transport.get_transport(self.get_url())
 
231
        t = self.get_transport()
231
232
        url = t.base
232
233
        out, err = self.run_bzr(['upgrade', '--format=knit', url])
233
234
        backup_dir = 'backup.bzr.~1~'