/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_branch/test_branch.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:
103
103
        """Test fetch-revision operation."""
104
104
        wt = self.make_branch_and_tree('b1')
105
105
        b1 = wt.branch
106
 
        self.build_tree_contents([('b1/foo', 'hello')])
 
106
        self.build_tree_contents([('b1/foo', b'hello')])
107
107
        wt.add(['foo'])
108
108
        rev1 = wt.commit('lala!', allow_pointless=False)
109
109
 
119
119
    def get_unbalanced_tree_pair(self):
120
120
        """Return two branches, a and b, with one file in a."""
121
121
        tree_a = self.make_branch_and_tree('a')
122
 
        self.build_tree_contents([('a/b', 'b')])
 
122
        self.build_tree_contents([('a/b', b'b')])
123
123
        tree_a.add('b')
124
124
        tree_a.commit("silly commit")
125
125
 
424
424
        tree_a = self.make_branch_and_tree('a')
425
425
        branch_a = tree_a.branch
426
426
        checkout_b = branch_a.create_checkout('b')
427
 
        self.assertEqual('null:', checkout_b.last_revision())
 
427
        self.assertEqual(b'null:', checkout_b.last_revision())
428
428
        try:
429
429
            rev1 = checkout_b.commit('rev1')
430
430
        except errors.NoRoundtrippingSupport:
1119
1119
    def test_get_unshelver(self):
1120
1120
        tree = self.make_branch_and_tree('tree')
1121
1121
        tree.commit('')
1122
 
        self.build_tree_contents([('tree/file', 'contents1')])
 
1122
        self.build_tree_contents([('tree/file', b'contents1')])
1123
1123
        tree.add('file')
1124
1124
        with skip_if_storing_uncommitted_unsupported():
1125
1125
            tree.store_uncommitted()
1129
1129
    def test_get_unshelver_bound(self):
1130
1130
        tree = self.make_branch_and_tree('tree')
1131
1131
        tree.commit('')
1132
 
        self.build_tree_contents([('tree/file', 'contents1')])
 
1132
        self.build_tree_contents([('tree/file', b'contents1')])
1133
1133
        tree.add('file')
1134
1134
        with skip_if_storing_uncommitted_unsupported():
1135
1135
            tree.store_uncommitted()