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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-06-30 12:37:04 UTC
  • mfrom: (6973.10.9 python3-i)
  • Revision ID: breezy.the.bot@gmail.com-20180630123704-jq2qazweqd3u5ssp
Add more bees.

Merged from https://code.launchpad.net/~jelmer/brz/python3-i/+merge/348244

Show diffs side-by-side

added added

removed removed

Lines of Context:
488
488
    def test_fetch_ghosts(self):
489
489
        self.make_tree_and_repo()
490
490
        self.tree.commit('first commit', rev_id=b'left-parent')
491
 
        self.tree.add_parent_tree_id('ghost-parent')
492
 
        fork = self.tree.controldir.sprout('fork', 'null:').open_workingtree()
 
491
        self.tree.add_parent_tree_id(b'ghost-parent')
 
492
        fork = self.tree.controldir.sprout('fork', b'null:').open_workingtree()
493
493
        fork.commit('not a ghost', rev_id=b'not-ghost-parent')
494
494
        self.tree.branch.repository.fetch(fork.branch.repository,
495
 
                                     'not-ghost-parent')
496
 
        self.tree.add_parent_tree_id('not-ghost-parent')
 
495
                                     b'not-ghost-parent')
 
496
        self.tree.add_parent_tree_id(b'not-ghost-parent')
497
497
        self.tree.commit('second commit', rev_id=b'second-id')
498
 
        self.repo.fetch(self.tree.branch.repository, 'second-id')
 
498
        self.repo.fetch(self.tree.branch.repository, b'second-id')
499
499
        root_id = self.tree.get_root_id()
500
500
        self.assertEqual(
501
 
            ((root_id, 'left-parent'), (root_id, 'not-ghost-parent')),
502
 
            self.get_parents(root_id, 'second-id'))
 
501
            ((root_id, b'left-parent'), (root_id, b'not-ghost-parent')),
 
502
            self.get_parents(root_id, b'second-id'))
503
503
 
504
504
    def make_two_commits(self, change_root, fetch_twice):
505
505
        self.make_tree_and_repo()
508
508
            self.tree.set_root_id(b'unique-id')
509
509
        self.tree.commit('second commit', rev_id=b'second-id')
510
510
        if fetch_twice:
511
 
            self.repo.fetch(self.tree.branch.repository, 'first-id')
512
 
        self.repo.fetch(self.tree.branch.repository, 'second-id')
 
511
            self.repo.fetch(self.tree.branch.repository, b'first-id')
 
512
        self.repo.fetch(self.tree.branch.repository, b'second-id')
513
513
 
514
514
    def test_fetch_changed_root(self):
515
515
        self.make_two_commits(change_root=True, fetch_twice=False)
516
 
        self.assertEqual((), self.get_parents('unique-id', 'second-id'))
 
516
        self.assertEqual((), self.get_parents(b'unique-id', b'second-id'))
517
517
 
518
518
    def test_two_fetch_changed_root(self):
519
519
        self.make_two_commits(change_root=True, fetch_twice=True)