Rev 4787: unescape_for_display returns a Unicode string, we need to be careful in http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-pull-v

John Arbash Meinel john at arbash-meinel.com
Tue Dec 8 17:48:20 GMT 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-pull-v

------------------------------------------------------------
revno: 4787
revision-id: john at arbash-meinel.com-20091208174804-2eai7wn4ekuhg4tt
parent: john at arbash-meinel.com-20091208174623-7wkd3o75sbr1eyc4
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1.0b4-pull-v
timestamp: Tue 2009-12-08 11:48:04 -0600
message:
  unescape_for_display returns a Unicode string, we need to be careful
  to not try to ascii decode revision ids.
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2009-12-08 17:46:23 +0000
+++ b/bzrlib/builtins.py	2009-12-08 17:48:04 +0000
@@ -1023,7 +1023,10 @@
                     result = branch_to.pull(
                         branch_from, overwrite, revision_id, local=local)
 
-                target = urlutils.unescape_for_display(branch_to.base, 'utf8')
+                target = urlutils.unescape_for_display(branch_to.base, 'utf-8')
+                # Encode target because it may have non-ascii characters, and
+                # so can the revids.
+                target = target.encode('utf-8')
                 mutter('In branch %s pulled\n from revid:%s\n   => revid:%s'
                        % (target, result.old_revid, result.new_revid))
                 result.report(self.outf)



More information about the bazaar-commits mailing list