/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/branch_implementations/test_branch.py

  • Committer: Aaron Bentley
  • Date: 2007-12-20 00:56:46 UTC
  • mfrom: (3131 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3133.
  • Revision ID: aaron.bentley@utoronto.ca-20071220005646-cfebcxoxqtpsk3uo
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    transactions,
29
29
    remote,
30
30
    repository,
 
31
    tests,
31
32
    )
32
33
from bzrlib.branch import Branch, needs_read_lock, needs_write_lock
33
34
from bzrlib.delta import TreeDelta
638
639
        try:
639
640
            branch.bind(branch2)
640
641
        except errors.UpgradeRequired:
641
 
            raise TestSkipped('Format does not support binding')
 
642
            raise tests.TestNotApplicable('Format does not support binding')
642
643
        self.assertTrue(branch.unbind())
643
644
        self.assertFalse(branch.unbind())
644
645
        self.assertIs(None, branch.get_bound_location())
648
649
        try:
649
650
            self.assertIs(None, branch.get_old_bound_location())
650
651
        except errors.UpgradeRequired:
651
 
            raise TestSkipped('Format does not store old bound locations')
 
652
            raise tests.TestNotApplicable(
 
653
                    'Format does not store old bound locations')
652
654
        branch2 = self.make_branch('branch2')
653
655
        branch.bind(branch2)
654
656
        self.assertIs(None, branch.get_old_bound_location())
655
657
        branch.unbind()
656
658
        self.assertContainsRe(branch.get_old_bound_location(), '\/branch2\/$')
657
659
 
 
660
    def test_bind_diverged(self):
 
661
        tree_a = self.make_branch_and_tree('tree_a')
 
662
        tree_a.commit('rev1a')
 
663
        tree_b = tree_a.bzrdir.sprout('tree_b').open_workingtree()
 
664
        tree_a.commit('rev2a')
 
665
        tree_b.commit('rev2b')
 
666
        try:
 
667
            tree_b.branch.bind(tree_a.branch)
 
668
        except errors.UpgradeRequired:
 
669
            raise tests.TestNotApplicable('Format does not support binding')
 
670
 
658
671
 
659
672
class TestStrict(TestCaseWithBranch):
660
673