~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_reconfigure.py

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
from bzrlib import (
 
18
    bzrdir,
18
19
    errors,
19
20
    tests,
20
21
    workingtree,
66
67
        branch = self.make_branch('branch')
67
68
        checkout = branch.create_checkout('checkout')
68
69
        self.run_bzr('reconfigure --lightweight-checkout checkout')
 
70
 
 
71
    def test_standalone_to_use_shared(self):
 
72
        self.build_tree(['repo/'])
 
73
        tree = self.make_branch_and_tree('repo/tree')
 
74
        repo = self.make_repository('repo', shared=True)
 
75
        self.run_bzr('reconfigure --use-shared', working_dir='repo/tree')
 
76
        tree = workingtree.WorkingTree.open('repo/tree')
 
77
        self.assertNotEqual(tree.bzrdir.root_transport.base,
 
78
            tree.branch.repository.bzrdir.root_transport.base)
 
79
 
 
80
    def test_use_shared_to_standalone(self):
 
81
        repo = self.make_repository('repo', shared=True)
 
82
        branch = bzrdir.BzrDir.create_branch_convenience('repo/tree')
 
83
        self.assertNotEqual(branch.bzrdir.root_transport.base,
 
84
            branch.repository.bzrdir.root_transport.base)
 
85
        self.run_bzr('reconfigure --standalone', working_dir='repo/tree')
 
86
        tree = workingtree.WorkingTree.open('repo/tree')
 
87
        self.assertEqual(tree.bzrdir.root_transport.base,
 
88
            tree.branch.repository.bzrdir.root_transport.base)