/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: Canonical.com Patch Queue Manager
  • Date: 2006-09-26 21:59:10 UTC
  • mfrom: (2041.1.5 commit-perf)
  • Revision ID: pqm@pqm.ubuntu.com-20060926215910-c87762786b24e444
(jam) fix commit performance regression

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
        # precisely test that - a repository that wants to can add it on deserialisation,
96
96
        # but thats all the current contract guarantees anyway.
97
97
        self.assertEqual(rev_id, tree.branch.repository.get_inventory(rev_id).revision_id)
 
98
 
 
99
    def test_revision_tree(self):
 
100
        tree = self.make_branch_and_tree(".")
 
101
        builder = tree.branch.get_commit_builder([])
 
102
        self.record_root(builder, tree)
 
103
        builder.finish_inventory()
 
104
        rev_id = builder.commit('foo bar')
 
105
        rev_tree = builder.revision_tree()
 
106
        # Just a couple simple tests to ensure that it actually follows
 
107
        # the RevisionTree api.
 
108
        self.assertEqual(rev_id, rev_tree.get_revision_id())
 
109
        self.assertEqual([], rev_tree.get_parent_ids())