~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(jelmer) Merge colocated branch support back into the 2a format. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
        #  => new branch will be created, but switch fails and the current
156
156
        #     branch is unmodified
157
157
        self.example_branch('a')
158
 
        self.make_branch_and_tree('current')
 
158
        tree = self.make_branch_and_tree('current')
 
159
        c1 = tree.commit('some diverged change')
159
160
        self.run_bzr_error(['Cannot switch a branch, only a checkout'],
160
161
            'branch --switch ../a ../b', working_dir='current')
161
162
        a = branch.Branch.open('a')
162
163
        b = branch.Branch.open('b')
163
164
        self.assertEqual(a.last_revision(), b.last_revision())
164
165
        work = branch.Branch.open('current')
165
 
        self.assertEqual(work.last_revision(), _mod_revision.NULL_REVISION)
 
166
        self.assertEqual(work.last_revision(), c1)
166
167
 
167
168
    def test_branch_into_empty_dir(self):
168
169
        t = self.example_branch('source')