~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Martin Pool
  • Date: 2011-06-28 17:25:26 UTC
  • mfrom: (5999 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110628172526-10cok2s17dvw7x62
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from bzrlib.bzrdir import BzrDirMetaFormat1
27
27
from bzrlib.commit import Commit, NullCommitReporter
28
28
from bzrlib.config import BranchConfig
29
 
from bzrlib.errors import (PointlessCommit, BzrError, SigningFailed,
30
 
                           LockContention)
 
29
from bzrlib.errors import (
 
30
    PointlessCommit,
 
31
    BzrError,
 
32
    SigningFailed,
 
33
    LockContention,
 
34
    )
31
35
from bzrlib.tests import (
32
36
    SymlinkFeature,
33
37
    TestCaseWithTransport,
34
38
    test_foreign,
35
39
    )
 
40
from bzrlib.tests.matchers import MatchesAncestry
36
41
 
37
42
 
38
43
# TODO: Test commit with some added, and added-but-missing files
357
362
        eq = self.assertEquals
358
363
        eq(b.revision_history(), rev_ids)
359
364
        for i in range(4):
360
 
            anc = b.repository.get_ancestry(rev_ids[i])
361
 
            eq(anc, [None] + rev_ids[:i+1])
 
365
            self.assertThat(rev_ids[:i+1],
 
366
                MatchesAncestry(b.repository, rev_ids[i]))
362
367
 
363
368
    def test_commit_new_subdir_child_selective(self):
364
369
        wt = self.make_branch_and_tree('.')