/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_stacking.py

  • Committer: Aaron Bentley
  • Date: 2008-06-16 20:59:37 UTC
  • mto: (3242.3.25 stacking-policy)
  • mto: This revision was merged to the branch mainline in revision 3538.
  • Revision ID: aaron@aaronbentley.com-20080616205937-947qqp3c3o0jvuml
Fix test failures

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
        new_tree.commit('something local')
61
61
 
62
62
    def test_clone_from_stacked_branch(self):
63
 
        # We can clone from the bzrdir of a stacked branch. The cloned
64
 
        # branch is stacked on the same branch as the original.
 
63
        # We can clone from the bzrdir of a stacked branch. If
 
64
        # preserve_stacking is True, the cloned branch is stacked on the
 
65
        # same branch as the original.
65
66
        tree = self.make_branch_and_tree('stacked-on')
66
67
        tree.commit('Added foo')
67
68
        try:
68
69
            stacked_bzrdir = tree.branch.bzrdir.sprout(
69
 
                'stacked', tree.branch.last_revision(), shallow=True)
 
70
                'stacked', tree.branch.last_revision(), stacked=True)
70
71
        except (errors.UnstackableBranchFormat,
71
72
                errors.UnstackableRepositoryFormat):
72
73
            # not a testable combination.
73
74
            return
74
 
        cloned_bzrdir = stacked_bzrdir.clone('cloned')
 
75
        cloned_bzrdir = stacked_bzrdir.clone('cloned', preserve_stacking=True)
75
76
        try:
76
77
            self.assertEqual(
77
78
                stacked_bzrdir.open_branch().get_stacked_on(),
79
80
        except (errors.UnstackableBranchFormat,
80
81
                errors.UnstackableRepositoryFormat):
81
82
            pass
 
83
        cloned_unstacked_bzrdir = stacked_bzrdir.clone('cloned-unstacked',
 
84
                                                       preserve_stacking=False)
 
85
        unstacked_branch = cloned_unstacked_bzrdir.open_branch()
 
86
        self.assertRaises(errors.NotStacked, unstacked_branch.get_stacked_on)