~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: 2011-11-16 02:32:20 UTC
  • mto: This revision was merged to the branch mainline in revision 6276.
  • Revision ID: jelmer@samba.org-20111116023220-kyobbt7ccl25ft66
Fix switching to unicode branch names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        self.assertEqual(branchb_id, checkout.last_revision())
154
154
        self.assertEqual(tree2.branch.base, checkout.branch.get_bound_location())
155
155
 
 
156
    def test_switch_finds_relative_unicode_branch(self):
 
157
        """Switch will find 'foo' relative to the branch the checkout is of."""
 
158
        self.build_tree(['repo/'])
 
159
        tree1 = self.make_branch_and_tree('repo/brancha')
 
160
        tree1.commit('foo')
 
161
        tree2 = self.make_branch_and_tree(u'repo/branch\xe9')
 
162
        tree2.pull(tree1.branch)
 
163
        branchb_id = tree2.commit('bar')
 
164
        checkout =  tree1.branch.create_checkout('checkout', lightweight=True)
 
165
        self.run_bzr(['switch', u'branch\xe9'], working_dir='checkout')
 
166
        self.assertEqual(branchb_id, checkout.last_revision())
 
167
        checkout = checkout.bzrdir.open_workingtree()
 
168
        self.assertEqual(tree2.branch.base, checkout.branch.base)
 
169
 
156
170
    def test_switch_revision(self):
157
171
        tree = self._create_sample_tree()
158
172
        checkout = tree.branch.create_checkout('checkout', lightweight=True)