/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_branch.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:
63
63
        self.run_bzr('branch a c -r 1')
64
64
        # previously was erroneously created by branching
65
65
        self.assertFalse(b._transport.has('branch-name'))
66
 
        b.bzrdir.open_workingtree().commit(message='foo', allow_pointless=True)
 
66
        b.controldir.open_workingtree().commit(message='foo', allow_pointless=True)
67
67
 
68
68
    def test_branch_no_to_location(self):
69
69
        """The to_location is derived from the source branch name."""
97
97
    def test_from_colocated(self):
98
98
        """Branch from a colocated branch into a regular branch."""
99
99
        tree = self.example_branch('a', format='development-colo')
100
 
        tree.bzrdir.create_branch(name='somecolo')
 
100
        tree.controldir.create_branch(name='somecolo')
101
101
        out, err = self.run_bzr('branch %s,branch=somecolo' %
102
102
            local_path_to_url('a'))
103
103
        self.assertEqual('', out)
208
208
        shared_repo.set_make_working_trees(True)
209
209
 
210
210
        def make_shared_tree(path):
211
 
            shared_repo.bzrdir.root_transport.mkdir(path)
 
211
            shared_repo.controldir.root_transport.mkdir(path)
212
212
            controldir.ControlDir.create_branch_convenience('repo/' + path)
213
213
            return WorkingTree.open('repo/' + path)
214
214
        tree_a = make_shared_tree('a')
263
263
        self.build_tree(['source/file1'])
264
264
        source.add('file1')
265
265
        source.commit('added file')
266
 
        source.bzrdir.sprout('second')
 
266
        source.controldir.sprout('second')
267
267
        out, err = self.run_bzr('branch source target --files-from second'
268
268
                                ' --hardlink')
269
269
        source_stat = os.stat('source/file1')
387
387
            format='1.9')
388
388
        branch_tree.branch.set_stacked_on_url(trunk_tree.branch.base)
389
389
        # with some work on it
390
 
        work_tree = trunk_tree.branch.bzrdir.sprout('local').open_workingtree()
 
390
        work_tree = trunk_tree.branch.controldir.sprout('local').open_workingtree()
391
391
        work_tree.commit('moar work plz')
392
392
        work_tree.branch.push(branch_tree.branch)
393
393
        # branching our local branch gives us a new stacked branch pointing at
413
413
            format='1.9')
414
414
        branch_tree.branch.set_stacked_on_url(trunk_tree.branch.base)
415
415
        # with some work on it
416
 
        work_tree = trunk_tree.branch.bzrdir.sprout('local').open_workingtree()
 
416
        work_tree = trunk_tree.branch.controldir.sprout('local').open_workingtree()
417
417
        branch_revid = work_tree.commit('moar work plz')
418
418
        work_tree.branch.push(branch_tree.branch)
419
419
        # you can chain branches on from there
529
529
        t = self.make_branch_and_tree('trunk')
530
530
        for count in range(8):
531
531
            t.commit(message='commit %d' % count)
532
 
        tree2 = t.branch.bzrdir.sprout('feature', stacked=True
 
532
        tree2 = t.branch.controldir.sprout('feature', stacked=True
533
533
            ).open_workingtree()
534
 
        local_tree = t.branch.bzrdir.sprout('local-working').open_workingtree()
 
534
        local_tree = t.branch.controldir.sprout('local-working').open_workingtree()
535
535
        local_tree.commit('feature change')
536
536
        local_tree.branch.push(tree2.branch)
537
537
        self.reset_smart_call_log()