/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 breezy/tests/blackbox/test_reconfigure.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 00:17:06 UTC
  • mto: (6670.4.8 move-bzr)
  • mto: This revision was merged to the branch mainline in revision 6681.
  • Revision ID: jelmer@jelmer.uk-20170610001706-xn6jiuev350246mr
Rename a number of attributes from bzrdir to controldir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
        repo = self.make_repository('repo', shared=True)
81
81
        self.run_bzr('reconfigure --use-shared', working_dir='repo/tree')
82
82
        tree = workingtree.WorkingTree.open('repo/tree')
83
 
        self.assertNotEqual(tree.bzrdir.root_transport.base,
84
 
            tree.branch.repository.bzrdir.root_transport.base)
 
83
        self.assertNotEqual(tree.controldir.root_transport.base,
 
84
            tree.branch.repository.controldir.root_transport.base)
85
85
 
86
86
    def test_use_shared_to_standalone(self):
87
87
        repo = self.make_repository('repo', shared=True)
88
88
        branch = controldir.ControlDir.create_branch_convenience('repo/tree')
89
 
        self.assertNotEqual(branch.bzrdir.root_transport.base,
90
 
            branch.repository.bzrdir.root_transport.base)
 
89
        self.assertNotEqual(branch.controldir.root_transport.base,
 
90
            branch.repository.controldir.root_transport.base)
91
91
        self.run_bzr('reconfigure --standalone', working_dir='repo/tree')
92
92
        tree = workingtree.WorkingTree.open('repo/tree')
93
 
        self.assertEqual(tree.bzrdir.root_transport.base,
94
 
            tree.branch.repository.bzrdir.root_transport.base)
 
93
        self.assertEqual(tree.controldir.root_transport.base,
 
94
            tree.branch.repository.controldir.root_transport.base)
95
95
 
96
96
    def test_make_with_trees(self):
97
97
        repo = self.make_repository('repo', shared=True)
137
137
    def test_shared_format_to_standalone(self, format=None):
138
138
        repo = self.make_repository('repo', shared=True, format=format)
139
139
        branch = controldir.ControlDir.create_branch_convenience('repo/tree')
140
 
        self.assertNotEqual(branch.bzrdir.root_transport.base,
141
 
            branch.repository.bzrdir.root_transport.base)
 
140
        self.assertNotEqual(branch.controldir.root_transport.base,
 
141
            branch.repository.controldir.root_transport.base)
142
142
        tree = workingtree.WorkingTree.open('repo/tree')
143
143
        self.build_tree_contents([('repo/tree/file', 'foo\n')]);
144
144
        tree.add(['file'])
149
149
        self.check_file_contents('repo/tree/file', 'bar\n')
150
150
        self.run_bzr('revert', working_dir='repo/tree')
151
151
        self.check_file_contents('repo/tree/file', 'foo\n')
152
 
        self.assertEqual(tree.bzrdir.root_transport.base,
153
 
            tree.branch.repository.bzrdir.root_transport.base)
 
152
        self.assertEqual(tree.controldir.root_transport.base,
 
153
            tree.branch.repository.controldir.root_transport.base)
154
154
 
155
155
    def test_shared_knit_to_standalone(self):
156
156
        self.test_shared_format_to_standalone('knit')
236
236
        tree_1.commit('add foo')
237
237
        branch_1 = tree_1.branch
238
238
        # now branch and commit again
239
 
        bzrdir_2 = tree_1.bzrdir.sprout('b2')
 
239
        bzrdir_2 = tree_1.controldir.sprout('b2')
240
240
        tree_2 = bzrdir_2.open_workingtree()
241
241
        branch_2 = tree_2.branch
242
242
        # now reconfigure to be stacked
250
250
        self.assertContainsRe(out, '^.*/b2/ is now stacked on ../b1\n$')
251
251
        self.assertEqual('', err)
252
252
        # Refresh the branch as 'reconfigure' modified it
253
 
        branch_2 = branch_2.bzrdir.open_branch()
 
253
        branch_2 = branch_2.controldir.open_branch()
254
254
        # It should be given a relative URL to the destination, if possible,
255
255
        # because that's most likely to work across different transports
256
256
        self.assertEqual('../b1', branch_2.get_stacked_on_url())
263
263
            '^.*/b2/ is now not stacked\n$')
264
264
        self.assertEqual('', err)
265
265
        # Refresh the branch as 'reconfigure' modified it
266
 
        branch_2 = branch_2.bzrdir.open_branch()
 
266
        branch_2 = branch_2.controldir.open_branch()
267
267
        self.assertRaises(errors.NotStacked, branch_2.get_stacked_on_url)
268
268
 
269
269
    # XXX: Needs a test for reconfiguring stacking and shape at the same time;