/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_switch.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-24 17:48:04 UTC
  • mfrom: (6921 work)
  • mto: This revision was merged to the branch mainline in revision 6923.
  • Revision ID: jelmer@jelmer.uk-20180324174804-xf22o05byoj12x1q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
        tree = self.make_branch_and_tree('branch-1')
161
161
        self.build_tree(['branch-1/file-1'])
162
162
        tree.add('file-1')
163
 
        tree.commit(rev_id=b'rev1', message='rev1')
 
163
        tree.commit(rev_id='rev1', message='rev1')
164
164
        self.build_tree(['branch-1/file-2'])
165
165
        tree.add('file-2')
166
 
        tree.commit(rev_id=b'rev2', message='rev2')
 
166
        tree.commit(rev_id='rev2', message='rev2')
167
167
        # Check it out and switch to revision 1
168
168
        checkout = tree.branch.create_checkout('checkout',
169
169
            lightweight=self.lightweight)
174
174
    def test_switch_changing_root_id(self):
175
175
        tree = self._setup_tree()
176
176
        tree2 = self.make_branch_and_tree('tree-2')
177
 
        tree2.set_root_id(b'custom-root-id')
 
177
        tree2.set_root_id('custom-root-id')
178
178
        self.build_tree(['tree-2/file-2'])
179
179
        tree2.add(['file-2'])
180
180
        tree2.commit('rev1b')
192
192
            'test factory')
193
193
        foo = self.make_branch('foo')
194
194
        checkout = foo.create_checkout('checkout', lightweight=True)
195
 
        self.build_tree_contents([('checkout/file', b'a')])
 
195
        self.build_tree_contents([('checkout/file', 'a')])
196
196
        checkout.add('file')
197
197
        checkout.commit('a')
198
198
        bar = foo.controldir.sprout('bar').open_workingtree()
199
 
        self.build_tree_contents([('bar/file', b'b')])
 
199
        self.build_tree_contents([('bar/file', 'b')])
200
200
        bar.commit('b')
201
201
        self.build_tree_contents([('checkout/file', 'c')])
202
202
        switch.switch(checkout.controldir, bar.branch)