/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-03-25 11:54:30 UTC
  • mfrom: (6855.4.10 more-bees)
  • Revision ID: breezy.the.bot@gmail.com-20180325115430-75xnlbrmzjoomd83
Add more bees. In particular:

* for file ids
* for revision ids
* for file contents in build_tree_contents()

Merged from https://code.launchpad.net/~jelmer/brz/more-bees/+merge/337919

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
    def test_bound_commit(self):
95
95
        child_tree = self.create_branches()[1]
96
96
 
97
 
        self.build_tree_contents([('child/a', 'new contents')])
 
97
        self.build_tree_contents([('child/a', b'new contents')])
98
98
        child_tree.commit(message='child')
99
99
 
100
100
        self.check_revno(2, 'child')
107
107
        base_tree, child_tree = self.create_branches()
108
108
 
109
109
        self.build_tree_contents([
110
 
            ('base/a',  'new base contents\n'   ),
111
 
            ('child/b', 'new b child contents\n')])
 
110
            ('base/a',  b'new base contents\n'   ),
 
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
 
140
140
        base_tree, child_tree = self.create_branches()
141
141
 
142
142
        self.build_tree_contents([
143
 
            ('base/a',  'new base contents\n'   ),
144
 
            ('child/b', 'new b child contents\n')])
 
143
            ('base/a',  b'new base contents\n'   ),
 
144
            ('child/b', b'new b child contents\n')])
145
145
 
146
146
        base_tree.commit(message='base')
147
147
        self.check_revno(2, 'base')
172
172
    def test_pull_updates_both(self):
173
173
        base_tree = self.create_branches()[0]
174
174
        newchild_tree = base_tree.controldir.sprout('newchild').open_workingtree()
175
 
        self.build_tree_contents([('newchild/b', 'newchild b contents\n')])
 
175
        self.build_tree_contents([('newchild/b', b'newchild b contents\n')])
176
176
        newchild_tree.commit(message='newchild')
177
177
        self.check_revno(2, 'newchild')
178
178
 
185
185
    def test_pull_local_updates_local(self):
186
186
        base_tree = self.create_branches()[0]
187
187
        newchild_tree = base_tree.controldir.sprout('newchild').open_workingtree()
188
 
        self.build_tree_contents([('newchild/b', 'newchild b contents\n')])
 
188
        self.build_tree_contents([('newchild/b', b'newchild b contents\n')])
189
189
        newchild_tree.commit(message='newchild')
190
190
        self.check_revno(2, 'newchild')
191
191
 
293
293
        other_tree = child_tree.controldir.sprout('other').open_workingtree()
294
294
        other_branch = other_tree.branch
295
295
 
296
 
        self.build_tree_contents([('other/c', 'file c\n')])
 
296
        self.build_tree_contents([('other/c', b'file c\n')])
297
297
        other_tree.add('c')
298
298
        other_tree.commit(message='adding c')
299
299
        new_rev_id = other_branch.last_revision()
322
322
 
323
323
        other_tree = child_tree.controldir.sprout('other').open_workingtree()
324
324
 
325
 
        self.build_tree_contents([('other/a', 'new contents\n')])
 
325
        self.build_tree_contents([('other/a', b'new contents\n')])
326
326
        other_tree.commit(message='changed a')
327
327
        self.check_revno(2, 'other')
328
328
        self.build_tree_contents([
329
 
            ('other/a', 'new contents\nand then some\n')])
 
329
            ('other/a', b'new contents\nand then some\n')])
330
330
        other_tree.commit(message='another a')
331
331
        self.check_revno(3, 'other')
332
332
        self.build_tree_contents([
333
 
            ('other/a', 'new contents\nand then some\nand some more\n')])
 
333
            ('other/a', b'new contents\nand then some\nand some more\n')])
334
334
        other_tree.commit('yet another a')
335
335
        self.check_revno(4, 'other')
336
336
 
337
 
        self.build_tree_contents([('child/a', 'also changed a\n')])
 
337
        self.build_tree_contents([('child/a', b'also changed a\n')])
338
338
        child_tree.commit(message='child modified a')
339
339
 
340
340
        self.check_revno(2, 'child')