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

  • Committer: Jelmer Vernooij
  • Date: 2018-03-25 12:47:13 UTC
  • mfrom: (6928 work)
  • mto: (6940.2.6 base)
  • mto: This revision was merged to the branch mainline in revision 6941.
  • Revision ID: jelmer@jelmer.uk-20180325124713-dq64vm9bhch1gjow
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
                HasPathRelations(
100
100
                    tree_a, [('', ''), ('xyz/', None), ('xyz/m', 'a/m')]))
101
101
 
102
 
        self.build_tree_contents([('A/a/n', 'new contents for n\n')])
 
102
        self.build_tree_contents([('A/a/n', b'new contents for n\n')])
103
103
        tree_a.commit('change n in A')
104
104
 
105
105
        # Merging from A should introduce conflicts because 'n' was modified
145
145
        self.build_tree(['a'])
146
146
        tree.smart_add(['.'])
147
147
        tree.commit('setup test')
148
 
        self.build_tree_contents([('a', 'new contents for "a"\n')])
 
148
        self.build_tree_contents([('a', b'new contents for "a"\n')])
149
149
        self.assertRaises(PointlessCommit, tree.commit, 'test',
150
150
            exclude=['a'], allow_pointless=False)
151
151
 
175
175
    def test_commit_sets_last_revision(self):
176
176
        tree = self.make_branch_and_tree('tree')
177
177
        if tree.branch.repository._format.supports_setting_revision_ids:
178
 
            committed_id = tree.commit('foo', rev_id='foo')
 
178
            committed_id = tree.commit('foo', rev_id=b'foo')
179
179
            # the commit should have returned the same id we asked for.
180
180
            self.assertEqual('foo', committed_id)
181
181
        else:
419
419
        tree.get_reference_revision('subtree')
420
420
        child_revid = subtree.last_revision()
421
421
        # now change the child tree
422
 
        self.build_tree_contents([('subtree/file', 'new-content')])
 
422
        self.build_tree_contents([('subtree/file', b'new-content')])
423
423
        # and commit in the parent should commit the child and grab its revid,
424
424
        # we test with allow_pointless=False here so that we are simulating
425
425
        # what users will see.