~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisiontree.py

  • Committer: wang
  • Date: 2006-10-29 13:41:32 UTC
  • mto: (2104.4.1 wang_65714)
  • mto: This revision was merged to the branch mainline in revision 2109.
  • Revision ID: wang@ubuntu-20061029134132-3d7f4216f20c4aef
Replace python's difflib by patiencediff because the worst case 
performance is cubic for difflib and people commiting large data 
files are often hurt by this. The worst case performance of patience is 
quadratic. Fix bug 65714.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Tests for the RevisionTree class."""
19
19
 
 
20
from bzrlib import (
 
21
    revision,
 
22
    )
20
23
import bzrlib
21
24
from bzrlib.tests import TestCaseWithTransport
22
25
from bzrlib.tree import RevisionTree
47
50
            [self.rev_id],
48
51
            self.t.branch.repository.revision_tree(revid_2).get_parent_ids())
49
52
        # TODO commit a merge and check it is reported correctly.
 
53
 
 
54
        # the parents for a revision_tree(None) are []:
 
55
        self.assertEqual([],
 
56
            self.t.branch.repository.revision_tree(None).get_parent_ids())
 
57
 
 
58
    def test_empty_no_root(self):
 
59
        null_tree = self.t.branch.repository.revision_tree(
 
60
            revision.NULL_REVISION)
 
61
        self.assertIs(None, null_tree.inventory.root)