/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_upgrade.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 23:19:12 UTC
  • mfrom: (7180 work)
  • mto: This revision was merged to the branch mainline in revision 7294.
  • Revision ID: jelmer@jelmer.uk-20181116231912-e043vpq22bdkxa6q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
    def test_upgrade_rich_root(self):
41
41
        tree = self.make_branch_and_tree('tree', format='rich-root')
42
 
        rev_id = tree.commit('first post')
 
42
        tree.commit('first post')
43
43
        upgrade.upgrade('tree')
44
44
 
45
45
    def test_convert_branch5_branch6(self):
48
48
        b.set_parent('file:///EF')
49
49
        b.set_bound_location('file:///GH')
50
50
        b.set_push_location('file:///IJ')
51
 
        target = controldir.format_registry.make_controldir('dirstate-with-subtree')
 
51
        target = controldir.format_registry.make_controldir(
 
52
            'dirstate-with-subtree')
52
53
        converter = b.controldir._format.get_converter(target)
53
54
        converter.convert(b.controldir, None)
54
55
        new_branch = branch.Branch.open(self.get_url('branch'))
109
110
        self.assertIs(new_tree.__class__, workingtree_4.WorkingTree4)
110
111
        self.assertEqual(rev_id, new_tree.last_revision())
111
112
        for path in ['basis-inventory-cache', 'inventory', 'last-revision',
112
 
            'pending-merges', 'stat-cache']:
 
113
                     'pending-merges', 'stat-cache']:
113
114
            self.assertPathDoesNotExist('tree/.bzr/checkout/' + path)
114
115
 
115
116
    def test_convert_knit_merges_dirstate(self):
116
117
        tree = self.make_branch_and_tree('tree', format='knit')
117
 
        rev_id = tree.commit('first post')
 
118
        tree.commit('first post')
118
119
        merge_tree = tree.controldir.sprout('tree2').open_workingtree()
119
120
        rev_id2 = tree.commit('second post')
120
121
        rev_id3 = merge_tree.commit('second merge post')
127
128
        self.assertEqual(rev_id2, new_tree.last_revision())
128
129
        self.assertEqual([rev_id2, rev_id3], new_tree.get_parent_ids())
129
130
        for path in ['basis-inventory-cache', 'inventory', 'last-revision',
130
 
            'pending-merges', 'stat-cache']:
 
131
                     'pending-merges', 'stat-cache']:
131
132
            self.assertPathDoesNotExist('tree/.bzr/checkout/' + path)
132
133
 
133
134
 
170
171
 
171
172
    def make_repo_with_branches(self):
172
173
        repo = self.make_repository('repo', shared=True,
173
 
            format=self.from_format)
 
174
                                    format=self.from_format)
174
175
        # Note: self.make_branch() always creates a new repo at the location
175
176
        # so we need to avoid using that here ...
176
 
        b1 = controldir.ControlDir.create_branch_convenience("repo/branch1",
177
 
            format=self.from_format)
178
 
        b2 = controldir.ControlDir.create_branch_convenience("repo/branch2",
179
 
            format=self.from_format)
 
177
        controldir.ControlDir.create_branch_convenience(
 
178
            "repo/branch1", format=self.from_format)
 
179
        b2 = controldir.ControlDir.create_branch_convenience(
 
180
            "repo/branch2", format=self.from_format)
180
181
        return repo.controldir
181
182
 
182
183
    def test_upgrade_repo_with_branches(self):