/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/test_graph.py

  • Committer: Robert Collins
  • Date: 2007-11-21 23:39:40 UTC
  • mto: This revision was merged to the branch mainline in revision 3014.
  • Revision ID: robertc@robertcollins.net-20071121233940-3l1xpdnxqdneogqe
LockingĀ inĀ test_graph.

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
    def make_graph(self, ancestors):
163
163
        tree = self.prepare_memory_tree('.')
164
164
        self.build_ancestry(tree, ancestors)
165
 
        tree.unlock()
 
165
        self.addCleanup(tree.unlock)
166
166
        return tree.branch.repository.get_graph()
167
167
 
168
168
    def prepare_memory_tree(self, location):
271
271
        """Ensure we do unique_lca using data from two repos"""
272
272
        mainline_tree = self.prepare_memory_tree('mainline')
273
273
        self.build_ancestry(mainline_tree, mainline)
274
 
        mainline_tree.unlock()
 
274
        self.addCleanup(mainline_tree.unlock)
275
275
 
276
276
        # This is cheating, because the revisions in the graph are actually
277
277
        # different revisions, despite having the same revision-id.
278
278
        feature_tree = self.prepare_memory_tree('feature')
279
279
        self.build_ancestry(feature_tree, feature_branch)
280
 
        feature_tree.unlock()
 
280
        self.addCleanup(feature_tree.unlock)
 
281
 
281
282
        graph = mainline_tree.branch.repository.get_graph(
282
283
            feature_tree.branch.repository)
283
284
        self.assertEqual('rev2b', graph.find_unique_lca('rev2a', 'rev3b'))