/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/per_workingtree/test_parents.py

  • Committer: Jelmer Vernooij
  • Date: 2018-06-19 18:31:46 UTC
  • mto: (6973.12.2 python3-k)
  • mto: This revision was merged to the branch mainline in revision 7005.
  • Revision ID: jelmer@jelmer.uk-20180619183146-vswp38w2zexg9u94
Fix tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
    def test_set_one_ghost_parent_ids_force(self):
150
150
        t = self.make_branch_and_tree('.')
151
151
        if t._format.supports_leftmost_parent_id_as_ghost:
152
 
            t.set_parent_ids(['missing-revision-id'],
 
152
            t.set_parent_ids([b'missing-revision-id'],
153
153
                allow_leftmost_as_ghost=True)
154
 
            self.assertConsistentParents(['missing-revision-id'], t)
 
154
            self.assertConsistentParents([b'missing-revision-id'], t)
155
155
        else:
156
156
            self.assertRaises(
157
157
                errors.GhostRevisionUnusableHere, t.set_parent_ids,
158
 
                ['missing-revision-id'], allow_leftmost_as_ghost=True)
 
158
                [b'missing-revision-id'], allow_leftmost_as_ghost=True)
159
159
 
160
160
    def test_set_two_parents_one_ghost_ids(self):
161
161
        t = self.make_branch_and_tree('.')
164
164
        uncommit(t.branch, tree=t)
165
165
        rev_tree = t.branch.repository.revision_tree(revision_in_repo)
166
166
        if t._format.supports_righthand_parent_id_as_ghost:
167
 
            t.set_parent_ids([revision_in_repo, 'another-missing'])
168
 
            self.assertConsistentParents([revision_in_repo, 'another-missing'], t)
 
167
            t.set_parent_ids([revision_in_repo, b'another-missing'])
 
168
            self.assertConsistentParents([revision_in_repo, b'another-missing'], t)
169
169
        else:
170
170
            self.assertRaises(errors.GhostRevisionUnusableHere,
171
 
                t.set_parent_ids, [revision_in_repo, 'another-missing'])
 
171
                t.set_parent_ids, [revision_in_repo, b'another-missing'])
172
172
 
173
173
    def test_set_three_parents_ids(self):
174
174
        t = self.make_branch_and_tree('.')