~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

  • Committer: Robert Collins
  • Date: 2006-07-04 17:23:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1840.
  • Revision ID: robertc@robertcollins.net-20060704172300-c4af39f04babcab8
(robertc) Teach repository.get_revision_graph, and revision.common_ancestor, about NULL_REVISION.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from bzrlib.graph import Graph
24
24
from bzrlib.revision import (find_present_ancestors, combined_graph,
25
25
                             common_ancestor,
26
 
                             is_ancestor, MultipleRevisionSources)
 
26
                             is_ancestor, MultipleRevisionSources,
 
27
                             NULL_REVISION)
27
28
from bzrlib.tests import TestCaseWithTransport
28
29
from bzrlib.trace import mutter
29
30
from bzrlib.workingtree import WorkingTree
221
222
        self.assertTrue(common_ancestor(revisions_2[6], revisions[5], sources),
222
223
                        (revisions[4], revisions_2[5]))
223
224
        self.assertEqual(None, common_ancestor(None, revisions[5], sources))
 
225
        self.assertEqual(NULL_REVISION,
 
226
            common_ancestor(NULL_REVISION, NULL_REVISION, sources))
 
227
        self.assertEqual(NULL_REVISION,
 
228
            common_ancestor(revisions[0], NULL_REVISION, sources))
 
229
        self.assertEqual(NULL_REVISION,
 
230
            common_ancestor(NULL_REVISION, revisions[0], sources))
224
231
 
225
232
    def test_combined(self):
226
233
        """combined_graph