~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_upgrade.py

Replace copy_tree with transport logic in upgreade.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.branch import Branch
28
28
from bzrlib.revision import is_ancestor
29
29
from bzrlib.tests import TestCase, TestCaseInTempDir
 
30
from bzrlib.transport import get_transport
30
31
from bzrlib.upgrade import upgrade
31
32
 
32
33
 
55
56
        eq(t.get_file_text(foo_id), 'initial contents\n')
56
57
        t = b.revision_tree(rh[1])
57
58
        eq(t.get_file_text(foo_id), 'new contents\n')
 
59
        # check a backup was made:
 
60
        transport = get_transport(b.base)
 
61
        transport.stat('.bzr.backup')
 
62
        transport.stat('.bzr.backup/README')
 
63
        transport.stat('.bzr.backup/branch-format')
 
64
        transport.stat('.bzr.backup/revision-history')
 
65
        transport.stat('.bzr.backup/merged-patches')
 
66
        transport.stat('.bzr.backup/pending-merged-patches')
 
67
        transport.stat('.bzr.backup/pending-merges')
 
68
        transport.stat('.bzr.backup/branch-name')
 
69
        transport.stat('.bzr.backup/branch-lock')
 
70
        transport.stat('.bzr.backup/inventory')
 
71
        transport.stat('.bzr.backup/stat-cache')
 
72
        transport.stat('.bzr.backup/text-store')
 
73
        transport.stat('.bzr.backup/text-store/foo-20051004035611-1591048e9dc7c2d4.gz')
 
74
        transport.stat('.bzr.backup/text-store/foo-20051004035756-4081373d897c3453.gz')
 
75
        transport.stat('.bzr.backup/inventory-store/')
 
76
        transport.stat('.bzr.backup/inventory-store/mbp@sourcefrog.net-20051004035611-176b16534b086b3c.gz')
 
77
        transport.stat('.bzr.backup/inventory-store/mbp@sourcefrog.net-20051004035756-235f2b7dcdddd8dd.gz')
 
78
        transport.stat('.bzr.backup/revision-store/')
 
79
        transport.stat('.bzr.backup/revision-store/mbp@sourcefrog.net-20051004035611-176b16534b086b3c.gz')
 
80
        transport.stat('.bzr.backup/revision-store/mbp@sourcefrog.net-20051004035756-235f2b7dcdddd8dd.gz')
58
81
 
59
82
    def test_upgrade_with_ghosts(self):
60
83
        """Upgrade v0.0.4 tree containing ghost references.