/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: Andrew Bennetts
  • Date: 2007-10-26 01:09:10 UTC
  • mfrom: (2944 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2945.
  • Revision ID: andrew.bennetts@canonical.com-20071026010910-5ibwby7sfga11llr
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
        self.assertEqual(rev_id, basis_tree.inventory.root.revision)
214
214
 
215
215
    def _get_revtrees(self, tree, revision_ids):
216
 
        trees = list(tree.branch.repository.revision_trees(revision_ids))
217
 
        for tree in trees:
218
 
            tree.lock_read()
219
 
            self.addCleanup(tree.unlock)
220
 
        return trees
 
216
        tree.lock_read()
 
217
        try:
 
218
            trees = list(tree.branch.repository.revision_trees(revision_ids))
 
219
            for _tree in trees:
 
220
                _tree.lock_read()
 
221
                self.addCleanup(_tree.unlock)
 
222
            return trees
 
223
        finally:
 
224
            tree.unlock()
221
225
 
222
226
    def test_last_modified_revision_after_commit_root_unchanged(self):
223
227
        # commiting without changing the root does not change the