~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-20 02:28:21 UTC
  • mfrom: (1666.1.10 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060420022821-4337b8fa4942d8fe
Make knits the default format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import os
22
22
 
 
23
import bzrlib
23
24
import bzrlib.bzrdir as bzrdir
24
25
import bzrlib.repository as repository
25
26
from bzrlib.tests import TestCaseWithTransport
34
35
    def setUp(self):
35
36
        super(TestWithUpgradableBranches, self).setUp()
36
37
        self.old_format = bzrdir.BzrDirFormat.get_default_format()
 
38
        self.old_repo_format = \
 
39
            bzrlib.repository.RepositoryFormat.get_default_format()
37
40
        self.old_ui_factory = ui.ui_factory
38
41
        self.addCleanup(self.restoreDefaults)
39
42
 
40
43
        ui.ui_factory = TestUIFactory()
41
44
        bzrdir.BzrDirFormat.set_default_format(bzrdir.BzrDirMetaFormat1())
 
45
        bzrlib.repository.RepositoryFormat.set_default_format(
 
46
            bzrlib.repository.RepositoryFormat7())
42
47
        # FIXME RBC 20060120 we should be able to do this via ui calls only.
43
48
        # setup a format 5 branch we can upgrade from.
44
49
        t = get_transport(self.get_url())
56
61
 
57
62
    def restoreDefaults(self):
58
63
        bzrdir.BzrDirFormat.set_default_format(self.old_format)
 
64
        bzrlib.repository.RepositoryFormat.set_default_format(
 
65
            self.old_repo_format)
59
66
        ui.ui_factory = self.old_ui_factory
60
67
 
61
68
    def test_readonly_url_error(self):