~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_upgrade.py

first cut at merge from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        eq(rh,
52
52
           ['mbp@sourcefrog.net-20051004035611-176b16534b086b3c',
53
53
            'mbp@sourcefrog.net-20051004035756-235f2b7dcdddd8dd'])
54
 
        t = b.revision_tree(rh[0])
 
54
        t = b.repository.revision_tree(rh[0])
55
55
        foo_id = 'foo-20051004035605-91e788d1875603ae'
56
56
        eq(t.get_file_text(foo_id), 'initial contents\n')
57
 
        t = b.revision_tree(rh[1])
 
57
        t = b.repository.revision_tree(rh[1])
58
58
        eq(t.get_file_text(foo_id), 'new contents\n')
59
59
        # check a backup was made:
60
60
        transport = get_transport(b.base)
83
83
        """Upgrade v0.0.4 tree containing ghost references.
84
84
 
85
85
        That is, some of the parents of revisions mentioned in the branch
86
 
        aren't present in the branches storage. 
 
86
        aren't present in the branch's storage. 
87
87
 
88
88
        This shouldn't normally happen in branches created entirely in 
89
 
        bzr but can happen in imports from baz and arch, or from other  
90
 
        systems, where the importer knows about a revision but not 
 
89
        bzr, but can happen in branches imported from baz and arch, or from
 
90
        other systems, where the importer knows about a revision but not 
91
91
        its contents."""
92
92
        eq = self.assertEquals
93
93
        self.build_tree_contents(_ghost_template)
94
94
        upgrade(u'.')
95
95
        b = Branch.open(u'.')
96
96
        revision_id = b.revision_history()[1]
97
 
        rev = b.get_revision(revision_id)
 
97
        rev = b.repository.get_revision(revision_id)
98
98
        eq(len(rev.parent_ids), 2)
99
99
        eq(rev.parent_ids[1], 'wibble@wobble-2')
100
100