~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-06-18 11:43:07 UTC
  • mfrom: (6437.54.10 2.5)
  • mto: This revision was merged to the branch mainline in revision 6525.
  • Revision ID: jelmer@samba.org-20120618114307-zeazlym311p38m98
MergeĀ 2.5.

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)