/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/blackbox/test_bound_branches.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
        base_tree, child_tree = self.create_branches()
108
108
 
109
109
        self.build_tree_contents([
110
 
            ('base/a',  b'new base contents\n'   ),
 
110
            ('base/a', b'new base contents\n'),
111
111
            ('child/b', b'new b child contents\n')])
112
112
        base_tree.commit(message='base')
113
113
        self.check_revno(2, 'base')
114
114
 
115
115
        self.check_revno(1, 'child')
116
116
        self.assertRaises(errors.BoundBranchOutOfDate, child_tree.commit,
117
 
                                                            message='child')
 
117
                          message='child')
118
118
        self.check_revno(1, 'child')
119
119
 
120
120
        child_tree.update()
134
134
        # Refresh the child tree object as 'unbind' modified it
135
135
        child2_tree = controldir.ControlDir.open('child2').open_workingtree()
136
136
        self.assertRaises(errors.CommitToDoubleBoundBranch,
137
 
                child2_tree.commit, message='child2', allow_pointless=True)
 
137
                          child2_tree.commit, message='child2', allow_pointless=True)
138
138
 
139
139
    def test_unbinding(self):
140
140
        base_tree, child_tree = self.create_branches()
141
141
 
142
142
        self.build_tree_contents([
143
 
            ('base/a',  b'new base contents\n'   ),
 
143
            ('base/a', b'new base contents\n'),
144
144
            ('child/b', b'new b child contents\n')])
145
145
 
146
146
        base_tree.commit(message='base')
171
171
 
172
172
    def test_pull_updates_both(self):
173
173
        base_tree = self.create_branches()[0]
174
 
        newchild_tree = base_tree.controldir.sprout('newchild').open_workingtree()
 
174
        newchild_tree = base_tree.controldir.sprout(
 
175
            'newchild').open_workingtree()
175
176
        self.build_tree_contents([('newchild/b', b'newchild b contents\n')])
176
177
        newchild_tree.commit(message='newchild')
177
178
        self.check_revno(2, 'newchild')
184
185
 
185
186
    def test_pull_local_updates_local(self):
186
187
        base_tree = self.create_branches()[0]
187
 
        newchild_tree = base_tree.controldir.sprout('newchild').open_workingtree()
 
188
        newchild_tree = base_tree.controldir.sprout(
 
189
            'newchild').open_workingtree()
188
190
        self.build_tree_contents([('newchild/b', b'newchild b contents\n')])
189
191
        newchild_tree.commit(message='newchild')
190
192
        self.check_revno(2, 'newchild')
221
223
        child_tree.commit(message='merged')
222
224
        self.check_revno(3, 'child')
223
225
        self.assertEqual(child_tree.branch.last_revision(),
224
 
                          base_tree.branch.last_revision())
 
226
                         base_tree.branch.last_revision())
225
227
 
226
228
    def test_bind_parent_ahead(self):
227
229
        base_tree = self.create_branches()[0]