~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-01-18 17:47:06 UTC
  • mto: (6437.3.9 2.5)
  • mto: This revision was merged to the branch mainline in revision 6444.
  • Revision ID: jelmer@samba.org-20120118174706-33pxrecbgbfd8ryx
UseĀ ControlDir.set_branch_reference.

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
        # Use switch to change it to 'anotherbranch'
184
184
        repo = self.make_repository('branch-1', format='development-colo')
185
185
        target_branch = repo.bzrdir.create_branch(name='foo')
186
 
        branch.BranchReferenceFormat().initialize(
187
 
            repo.bzrdir, target_branch=target_branch)
 
186
        repo.bzrdir.set_branch_reference(target_branch)
188
187
        tree = repo.bzrdir.create_workingtree()
189
188
        self.build_tree(['branch-1/file-1', 'branch-1/file-2'])
190
189
        tree.add('file-1')
203
202
        # Use switch to create 'anotherbranch' which derives from that
204
203
        repo = self.make_repository('branch-1', format='development-colo')
205
204
        target_branch = repo.bzrdir.create_branch(name='foo')
206
 
        branch.BranchReferenceFormat().initialize(
207
 
            repo.bzrdir, target_branch=target_branch)
 
205
        repo.bzrdir.set_branch_reference(target_branch)
208
206
        tree = repo.bzrdir.create_workingtree()
209
207
        self.build_tree(['branch-1/file-1', 'branch-1/file-2'])
210
208
        tree.add('file-1')
223
221
        self.requireFeature(UnicodeFilenameFeature)
224
222
        repo = self.make_repository('branch-1', format='development-colo')
225
223
        target_branch = repo.bzrdir.create_branch(name='foo')
226
 
        branch.BranchReferenceFormat().initialize(
227
 
            repo.bzrdir, target_branch=target_branch)
 
224
        repo.bzrdir.set_branch_reference(target_branch)
228
225
        tree = repo.bzrdir.create_workingtree()
229
226
        self.build_tree(['branch-1/file-1', 'branch-1/file-2'])
230
227
        tree.add('file-1')