~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2012-06-18 12:59:19 UTC
  • mfrom: (6524.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20120618125919-jf2dy5p1apoljtan
(jelmer) Merge 2.5. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
        checkout = checkout.bzrdir.open_workingtree()
175
175
        self.assertEqual(tree2.branch.base, checkout.branch.base)
176
176
 
 
177
    def test_switch_finds_relative_unicode_branch(self):
 
178
        """Switch will find 'foo' relative to the branch the checkout is of."""
 
179
        self.requireFeature(UnicodeFilenameFeature)
 
180
        self.build_tree(['repo/'])
 
181
        tree1 = self.make_branch_and_tree('repo/brancha')
 
182
        tree1.commit('foo')
 
183
        tree2 = self.make_branch_and_tree(u'repo/branch\xe9')
 
184
        tree2.pull(tree1.branch)
 
185
        branchb_id = tree2.commit('bar')
 
186
        checkout =  tree1.branch.create_checkout('checkout', lightweight=True)
 
187
        self.run_bzr(['switch', u'branch\xe9'], working_dir='checkout')
 
188
        self.assertEqual(branchb_id, checkout.last_revision())
 
189
        checkout = checkout.bzrdir.open_workingtree()
 
190
        self.assertEqual(tree2.branch.base, checkout.branch.base)
 
191
 
177
192
    def test_switch_revision(self):
178
193
        tree = self._create_sample_tree()
179
194
        checkout = tree.branch.create_checkout('checkout', lightweight=True)