/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

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from bzrlib import inventory
20
20
from bzrlib.errors import UnsupportedOperation
21
21
from bzrlib.repository import CommitBuilder
 
22
from bzrlib import tests
22
23
from bzrlib.tests.repository_implementations.test_repository import TestCaseWithRepository
23
24
 
24
25
 
33
34
        if builder.record_root_entry is True:
34
35
            ie = tree.inventory.root
35
36
            parent_tree = tree.branch.repository.revision_tree(None)
36
 
            parent_invs = [parent_tree.inventory]
 
37
            parent_invs = []
37
38
            builder.record_entry_contents(ie, parent_invs, '', tree)
38
39
 
39
40
    def test_finish_inventory(self):
70
71
    def test_commit_without_root(self):
71
72
        """This should cause a deprecation warning, not an assertion failure"""
72
73
        tree = self.make_branch_and_tree(".")
 
74
        if tree.branch.repository._format.rich_root_data:
 
75
            raise tests.TestSkipped('Format requires root')
73
76
        self.build_tree(['foo'])
74
77
        tree.add('foo', 'foo-id')
75
78
        entry = tree.inventory['foo-id']
76
79
        builder = tree.branch.get_commit_builder([])
77
80
        self.callDeprecated(['Root entry should be supplied to'
78
 
            ' record_entry_contents, as of bzr 0.10.'], 
 
81
            ' record_entry_contents, as of bzr 0.10.'],
79
82
            builder.record_entry_contents, entry, [], 'foo', tree)
80
83
        builder.finish_inventory()
81
84
        rev_id = builder.commit('foo bar')