~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_upgrade.py

Branch now uses BzrDir reasonably sanely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
import bzrlib.branch as branch
27
27
from bzrlib.branch import Branch
 
28
import bzrlib.bzrdir as bzrdir
 
29
import bzrlib.repository as repository
28
30
from bzrlib.revision import is_ancestor
29
31
from bzrlib.tests import TestCase, TestCaseInTempDir
30
32
from bzrlib.transport import get_transport
44
46
        eq = self.assertEquals
45
47
        self.build_tree_contents(_upgrade1_template)
46
48
        upgrade(u'.')
47
 
        b = Branch.open(u'.')
 
49
        control = bzrdir.BzrDir.open('.')
 
50
        b = control.open_branch()
 
51
        r = control.open_repository()
48
52
        # tsk, peeking under the covers.
49
 
        self.failUnless(isinstance(b._branch_format, branch.BzrBranchFormat6))
 
53
        self.failUnless(isinstance(control._format, bzrdir.BzrDirFormat6))
 
54
        self.failUnless(isinstance(b._format, branch.BzrBranchFormat4))
 
55
        self.failUnless(isinstance(r._format, repository.RepositoryFormat6))
50
56
        rh = b.revision_history()
51
57
        eq(rh,
52
58
           ['mbp@sourcefrog.net-20051004035611-176b16534b086b3c',