~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_reconcile.py

  • Committer: Shannon Weyrick
  • Date: 2011-11-04 13:40:04 UTC
  • mfrom: (6238 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6256.
  • Revision ID: weyrick@mozek.us-20111104134004-033t2wqhc3ydzm0a
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Tests for branch implementations - test reconcile() functionality"""
18
18
 
19
19
from bzrlib import errors, reconcile
 
20
from bzrlib.branch import BzrBranch
20
21
from bzrlib.symbol_versioning import deprecated_in
21
22
from bzrlib.tests.per_branch import TestCaseWithBranch
 
23
from bzrlib.tests import TestNotApplicable
22
24
 
23
25
 
24
26
class TestBranchReconcile(TestCaseWithBranch):
25
27
 
26
28
    def test_reconcile_fixes_invalid_revhistory(self):
 
29
        if not isinstance(self.branch_format, BzrBranch):
 
30
            raise TestNotApplicable("test only applies to bzr formats")
27
31
        # Different formats have different ways of handling invalid revision
28
32
        # histories, so the setup portion is customized
29
33
        tree = self.make_branch_and_tree('test')
75
79
 
76
80
    def test_reconcile_handles_ghosts_in_revhistory(self):
77
81
        tree = self.make_branch_and_tree('test')
 
82
        if not tree.branch.repository._format.supports_ghosts:
 
83
            raise TestNotApplicable("repository format does not support ghosts")
78
84
        tree.set_parent_ids(["spooky"], allow_leftmost_as_ghost=True)
79
85
        r1 = tree.commit('one')
80
86
        r2 = tree.commit('two')