Switching to a local sibling with non-ascii name causes error

Bug #317778 reported by philyoon
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Jelmer Vernooij

Bug Description

Here is the fix:

=== modified file 'bzrlib/builtins.py'
--- bzrlib/builtins.py 2009-01-15 05:18:22 +0000
+++ bzrlib/builtins.py 2009-01-16 05:59:12 +0000
@@ -4804,6 +4804,9 @@
             # If not, use a local sibling
             if this_url is None:
                 this_url = this_branch.base
+ if isinstance(to_location, unicode):
+ import urllib
+ to_location = urllib.quote(to_location.encode('utf-8'))
             to_branch = Branch.open(
                 urlutils.join(this_url, '..', to_location))
         switch.switch(control_dir, to_branch, force)

Tags: switch

Related branches

Revision history for this message
philyoon (philyoon) wrote :

Whitespaces in the description seem to be merged. Attaching the patch file.

Revision history for this message
philyoon (philyoon) wrote :

Whitespaces in the description seem to be merged. Attaching the patch file.

John A Meinel (jameinel)
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

mp here https://code.edge.launchpad.net/~jameinel/bzr/2.0.5-switch-unicode-317778/+merge/19121

seems to need some more work to handle differences between urls and paths, and a test

Changed in bzr:
status: Confirmed → In Progress
Revision history for this message
Robert Collins (lifeless) wrote :

See also the conversation on the merge proposal. This bug is probably a few hours work for someone to pick up and polish.

Jelmer Vernooij (jelmer)
tags: added: switch
Jelmer Vernooij (jelmer)
Changed in bzr:
status: In Progress → Fix Released
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Martin Packman (gz) wrote :
Changed in bzr:
milestone: none → 2.5b4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.