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

  • Committer: Jelmer Vernooij
  • Date: 2018-05-22 02:05:12 UTC
  • mto: (6973.12.2 python3-k)
  • mto: This revision was merged to the branch mainline in revision 6992.
  • Revision ID: jelmer@jelmer.uk-20180522020512-btpj2jchdlehi3en
Add more bees.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        checkout_branch = checkout.controldir.open_branch()
93
93
        self.assertEqual(checkout_branch.controldir.root_transport.base,
94
94
                         checkout.controldir.root_transport.base)
95
 
        self.assertEqual('rev1', checkout_branch.last_revision())
 
95
        self.assertEqual(b'rev1', checkout_branch.last_revision())
96
96
        repo = checkout.controldir.open_repository()
97
 
        repo.get_revision('rev1')
 
97
        repo.get_revision(b'rev1')
98
98
 
99
99
    def test_lightweight_checkout_to_branch_tags(self):
100
100
        reconfiguration, checkout = \
245
245
        wt = checkout.controldir.open_workingtree()
246
246
        self.assertTrue(parent.repository.has_same_location(
247
247
            wt.branch.repository))
248
 
        parent.repository.get_revision('new-commit')
 
248
        parent.repository.get_revision(b'new-commit')
249
249
        self.assertRaises(errors.NoRepositoryPresent,
250
250
                          checkout.controldir.open_repository)
251
251
 
267
267
        wt = child.controldir.open_workingtree()
268
268
        self.assertTrue(parent.repository.has_same_location(
269
269
            wt.branch.repository))
270
 
        parent.repository.get_revision('new-commit')
 
270
        parent.repository.get_revision(b'new-commit')
271
271
        self.assertRaises(errors.NoRepositoryPresent,
272
272
                          child.controldir.open_repository)
273
273
 
335
335
        reconfiguration.apply()
336
336
        tree = workingtree.WorkingTree.open('root/tree')
337
337
        self.assertTrue(repo.has_same_location(tree.branch.repository))
338
 
        self.assertEqual('Hello', repo.get_revision('hello-id').message)
 
338
        self.assertEqual('Hello', repo.get_revision(b'hello-id').message)
339
339
 
340
340
    def add_dead_head(self, tree):
341
341
        revno, revision_id = tree.branch.last_revision_info()
352
352
        reconfiguration = reconfigure.Reconfigure.to_use_shared(tree.controldir)
353
353
        reconfiguration.apply()
354
354
        tree = workingtree.WorkingTree.open('root/tree')
355
 
        message = repo.get_revision('dead-head-id').message
 
355
        message = repo.get_revision(b'dead-head-id').message
356
356
        self.assertEqual('Dead head', message)
357
357
 
358
358
    def make_repository_tree(self):
375
375
        repo = tree.branch.repository
376
376
        self.assertEqual(repo.controldir.root_transport.base,
377
377
                         tree.controldir.root_transport.base)
378
 
        self.assertEqual('Hello', repo.get_revision('hello-id').message)
 
378
        self.assertEqual('Hello', repo.get_revision(b'hello-id').message)
379
379
 
380
380
    def test_use_shared_to_standalone_preserves_dead_heads(self):
381
381
        tree = self.make_repository_tree()