/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_interbranch/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:
55
55
        # become the revision-history.
56
56
        mine = self.make_from_branch_and_tree('mine')
57
57
        mine.commit('1st post', rev_id='P1', allow_pointless=True)
58
 
        other = self.sprout_to(mine.bzrdir, 'other').open_workingtree()
 
58
        other = self.sprout_to(mine.controldir, 'other').open_workingtree()
59
59
        other.commit('my change', rev_id='M1', allow_pointless=True)
60
60
        mine.merge_from_branch(other.branch)
61
61
        mine.commit('merge my change', rev_id='P2')
72
72
        # directly accessible.
73
73
        mine = self.make_from_branch_and_tree('mine')
74
74
        mine.commit('1st post', rev_id='P1', allow_pointless=True)
75
 
        target = self.sprout_to(mine.bzrdir, 'target').open_workingtree()
 
75
        target = self.sprout_to(mine.controldir, 'target').open_workingtree()
76
76
        target.commit('my change', rev_id='M1', allow_pointless=True)
77
 
        other = self.sprout_to(mine.bzrdir, 'other').open_workingtree()
 
77
        other = self.sprout_to(mine.controldir, 'other').open_workingtree()
78
78
        other.merge_from_branch(target.branch)
79
79
        other.commit('merge my change', rev_id='O2')
80
80
        mine.merge_from_branch(other.branch)
93
93
            return
94
94
        rev1 = checkout.commit('master')
95
95
 
96
 
        other_bzrdir = self.sprout_from(master_tree.branch.bzrdir, 'other')
 
96
        other_bzrdir = self.sprout_from(master_tree.branch.controldir, 'other')
97
97
        other = other_bzrdir.open_workingtree()
98
98
        rev2 = other.commit('other commit')
99
99
        # now push, which should update both checkout and master.
109
109
        except errors.UpgradeRequired:
110
110
            # cant bind this format, the test is irrelevant.
111
111
            return
112
 
        other_bzrdir = self.sprout_from(master_tree.branch.bzrdir, 'other')
 
112
        other_bzrdir = self.sprout_from(master_tree.branch.controldir, 'other')
113
113
        other = other_bzrdir.open_workingtree()
114
114
        # move the branch out of the way on disk to cause a connection
115
115
        # error.
116
 
        master_tree.bzrdir.destroy_branch()
 
116
        master_tree.controldir.destroy_branch()
117
117
        # try to push, which should raise a BoundBranchConnectionFailure.
118
118
        self.assertRaises(errors.BoundBranchConnectionFailure,
119
119
                other.branch.push, checkout.branch)
152
152
            # Cannot create these branches
153
153
            return
154
154
        try:
155
 
            tree = a_branch.bzrdir.create_workingtree()
 
155
            tree = a_branch.controldir.create_workingtree()
156
156
        except errors.UnsupportedOperation:
157
 
            self.assertFalse(a_branch.bzrdir._format.supports_workingtrees)
 
157
            self.assertFalse(a_branch.controldir._format.supports_workingtrees)
158
158
            tree = a_branch.create_checkout('repo/tree', lightweight=True)
159
159
        except errors.NotLocalUrl:
160
160
            if self.vfs_transport_factory is test_server.LocalURLServer:
220
220
        builder.finish_series()
221
221
        trunk = builder.get_branch()
222
222
        # Sprout rev-1 to "trunk", so that we can stack on it.
223
 
        trunk.bzrdir.sprout(self.get_url('trunk'), revision_id='rev-1')
 
223
        trunk.controldir.sprout(self.get_url('trunk'), revision_id='rev-1')
224
224
        # Set a default stacking policy so that new branches will automatically
225
225
        # stack on trunk.
226
226
        self.make_bzrdir('.').get_config().set_default_stack_on('trunk')
257
257
        builder.finish_series()
258
258
        local = branch.Branch.open(self.get_vfs_only_url('local'))
259
259
        # Initial push of three revisions
260
 
        remote_bzrdir = local.bzrdir.sprout(
 
260
        remote_bzrdir = local.controldir.sprout(
261
261
            self.get_url('remote'), revision_id='third')
262
262
        remote = remote_bzrdir.open_branch()
263
263
        # Push fourth revision
364
364
        target.add('')
365
365
        rev1 = target.commit('rev 1')
366
366
        target.unlock()
367
 
        sourcedir = target.branch.bzrdir.clone(self.get_url('source'))
 
367
        sourcedir = target.branch.controldir.clone(self.get_url('source'))
368
368
        source = MemoryTree.create_on_branch(sourcedir.open_branch())
369
369
        rev2 = source.commit('rev 2')
370
370
        Branch.hooks.install_named_hook('post_push',