/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

  • Committer: Robert Collins
  • Date: 2007-10-03 06:15:06 UTC
  • mfrom: (2879 +trunk)
  • mto: (2592.3.161 repository)
  • mto: This revision was merged to the branch mainline in revision 2880.
  • Revision ID: robertc@robertcollins.net-20071003061506-2hbze42e1sokni8j
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
                tree.unlock()
53
53
            parent_tree = tree.branch.repository.revision_tree(None)
54
54
            parent_invs = []
55
 
            builder.record_entry_contents(ie, parent_invs, '', tree)
 
55
            builder.record_entry_contents(ie, parent_invs, '', tree,
 
56
                tree.path_content_summary(''))
56
57
 
57
58
    def test_finish_inventory(self):
58
59
        tree = self.make_branch_and_tree(".")
130
131
            entry = tree.inventory['foo-id']
131
132
            builder = tree.branch.get_commit_builder([])
132
133
            self.assertRaises(errors.RootMissing,
133
 
                builder.record_entry_contents, entry, [], 'foo', tree)
 
134
                builder.record_entry_contents, entry, [], 'foo', tree,
 
135
                    tree.path_content_summary('foo'))
134
136
            builder.abort()
135
137
        finally:
136
138
            tree.unlock()
147
149
            ie = inventory.make_entry('directory', '', None,
148
150
                    tree.inventory.root.file_id)
149
151
            delta, version_recorded = builder.record_entry_contents(
150
 
                ie, [parent_tree.inventory], '', tree)
 
152
                ie, [parent_tree.inventory], '', tree,
 
153
                tree.path_content_summary(''))
151
154
            self.assertFalse(version_recorded)
152
155
            self.assertEqual(None, delta)
153
156
            builder.abort()
352
355
            # root
353
356
            builder.record_entry_contents(
354
357
                inventory.make_entry('directory', '', None,
355
 
                    tree.inventory.root.file_id), parent_invs, '', tree)
 
358
                    tree.inventory.root.file_id), parent_invs, '', tree,
 
359
                    tree.path_content_summary(''))
356
360
            def commit_id(file_id):
357
361
                old_ie = tree.inventory[file_id]
358
362
                path = tree.id2path(file_id)
359
363
                ie = inventory.make_entry(tree.kind(file_id), old_ie.name,
360
364
                    old_ie.parent_id, file_id)
361
 
                return builder.record_entry_contents(ie, parent_invs, path, tree)
 
365
                return builder.record_entry_contents(ie, parent_invs, path,
 
366
                    tree, tree.path_content_summary(path))
362
367
 
363
368
            file_id = tree.path2id(new_name)
364
369
            parent_id = tree.inventory[file_id].parent_id