/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/per_branch/test_push.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:
49
49
        # become the revision-history.
50
50
        mine = self.make_branch_and_tree('mine')
51
51
        mine.commit('1st post', rev_id='P1', allow_pointless=True)
52
 
        other = mine.bzrdir.sprout('other').open_workingtree()
 
52
        other = mine.controldir.sprout('other').open_workingtree()
53
53
        other.commit('my change', rev_id='M1', allow_pointless=True)
54
54
        mine.merge_from_branch(other.branch)
55
55
        mine.commit('merge my change', rev_id='P2')
66
66
        # directly accessible.
67
67
        mine = self.make_branch_and_tree('mine')
68
68
        mine.commit('1st post', rev_id='P1', allow_pointless=True)
69
 
        target = mine.bzrdir.sprout('target').open_workingtree()
 
69
        target = mine.controldir.sprout('target').open_workingtree()
70
70
        target.commit('my change', rev_id='M1', allow_pointless=True)
71
 
        other = mine.bzrdir.sprout('other').open_workingtree()
 
71
        other = mine.controldir.sprout('other').open_workingtree()
72
72
        other.merge_from_branch(target.branch)
73
73
        other.commit('merge my change', rev_id='O2')
74
74
        mine.merge_from_branch(other.branch)
87
87
            return
88
88
        rev1 = checkout.commit('master')
89
89
 
90
 
        other = master_tree.branch.bzrdir.sprout('other').open_workingtree()
 
90
        other = master_tree.branch.controldir.sprout('other').open_workingtree()
91
91
        rev2 = other.commit('other commit')
92
92
        # now push, which should update both checkout and master.
93
93
        other.branch.push(checkout.branch)
102
102
        except errors.UpgradeRequired:
103
103
            # cant bind this format, the test is irrelevant.
104
104
            return
105
 
        other = master_tree.branch.bzrdir.sprout('other').open_workingtree()
 
105
        other = master_tree.branch.controldir.sprout('other').open_workingtree()
106
106
        # move the branch out of the way on disk to cause a connection
107
107
        # error.
108
108
        os.rename('master', 'master_gone')
118
118
        except errors.UpgradeRequired:
119
119
            raise tests.TestNotApplicable(
120
120
                'Format does not support bound branches')
121
 
        other = bound.bzrdir.sprout('other').open_branch()
 
121
        other = bound.controldir.sprout('other').open_branch()
122
122
        try:
123
123
            other.tags.set_tag('new-tag', 'some-rev')
124
124
        except errors.TagsNotSupported:
157
157
            return
158
158
        # This is a little bit trickier because make_branch_and_tree will not
159
159
        # re-use a shared repository.
160
 
        a_bzrdir = self.make_bzrdir('repo/tree')
 
160
        a_controldir = self.make_bzrdir('repo/tree')
161
161
        try:
162
 
            a_branch = self.branch_format.initialize(a_bzrdir)
 
162
            a_branch = self.branch_format.initialize(a_controldir)
163
163
        except (errors.UninitializableFormat):
164
164
            # Cannot create these branches
165
165
            return
166
166
        try:
167
 
            tree = a_branch.bzrdir.create_workingtree()
 
167
            tree = a_branch.controldir.create_workingtree()
168
168
        except errors.NotLocalUrl:
169
169
            if self.vfs_transport_factory is test_server.LocalURLServer:
170
170
                # the branch is colocated on disk, we cannot create a checkout.
283
283
        builder.finish_series()
284
284
        trunk = builder.get_branch()
285
285
        # Sprout rev-1 to "trunk", so that we can stack on it.
286
 
        trunk.bzrdir.sprout(self.get_url('trunk'), revision_id='rev-1')
 
286
        trunk.controldir.sprout(self.get_url('trunk'), revision_id='rev-1')
287
287
        # Set a default stacking policy so that new branches will automatically
288
288
        # stack on trunk.
289
289
        self.make_bzrdir('.').get_config().set_default_stack_on('trunk')
372
372
        target.add('')
373
373
        rev1 = target.commit('rev 1')
374
374
        target.unlock()
375
 
        sourcedir = target.bzrdir.clone(self.get_url('source'))
 
375
        sourcedir = target.controldir.clone(self.get_url('source'))
376
376
        source = memorytree.MemoryTree.create_on_branch(sourcedir.open_branch())
377
377
        rev2 = source.commit('rev 2')
378
378
        branch.Branch.hooks.install_named_hook(