/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: Canonical.com Patch Queue Manager
  • Date: 2007-12-04 03:52:13 UTC
  • mfrom: (1551.19.15 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20071204035213-2kot5u403spjchen
Merge warns when criss-cross encountered + docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
                         graph.find_unique_lca(NULL_REVISION, 'rev1'))
237
237
        self.assertEqual('rev1', graph.find_unique_lca('rev1', 'rev1'))
238
238
        self.assertEqual('rev1', graph.find_unique_lca('rev2a', 'rev2b'))
 
239
        self.assertEqual(('rev1', 1,),
 
240
                         graph.find_unique_lca('rev2a', 'rev2b',
 
241
                         count_steps=True))
239
242
 
240
243
    def test_unique_lca_criss_cross(self):
241
244
        """Ensure we don't pick non-unique lcas in a criss-cross"""
242
245
        graph = self.make_graph(criss_cross)
243
246
        self.assertEqual('rev1', graph.find_unique_lca('rev3a', 'rev3b'))
 
247
        lca, steps = graph.find_unique_lca('rev3a', 'rev3b', count_steps=True)
 
248
        self.assertEqual('rev1', lca)
 
249
        self.assertEqual(2, steps)
244
250
 
245
251
    def test_unique_lca_null_revision(self):
246
252
        """Ensure we pick NULL_REVISION when necessary"""