/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 bzrlib/tests/repository_implementations/test_commit_builder.py

Merge updated set_parents api.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        # but thats all the current contract guarantees anyway.
68
68
        self.assertEqual('foo', tree.branch.repository.get_inventory('foo').revision_id)
69
69
 
 
70
    def test_commit_without_root(self):
 
71
        """This should cause a deprecation warning, not an assertion failure"""
 
72
        tree = self.make_branch_and_tree(".")
 
73
        self.build_tree(['foo'])
 
74
        tree.add('foo', 'foo-id')
 
75
        entry = tree.inventory['foo-id']
 
76
        builder = tree.branch.get_commit_builder([])
 
77
        self.assertDeprecated(['Root entry should be supplied to'
 
78
            ' record_entry_contents, as of bzr 0.10.'], 
 
79
            builder.record_entry_contents, entry, [], 'foo', tree)
 
80
        builder.finish_inventory()
 
81
        rev_id = builder.commit('foo bar')
 
82
 
70
83
    def test_commit(self):
71
84
        tree = self.make_branch_and_tree(".")
72
85
        builder = tree.branch.get_commit_builder([])