[MERGE][1.14] Fix bug #355454 by casting to unicode.

John Arbash Meinel john at arbash-meinel.com
Tue Apr 7 18:15:34 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vincent Ladeuil wrote:
> Tweaked as discussed on IRC with jam who gave a BB:tweak.
> 
> Bob, it's up to you now, the fix is also available at
> lp:~vila/bzr/355454-unicode-warning
> 
>         Vincent
> 
> 

BB:approve

The 'abspath' that directory walking code has may be a 8-bit path,
because we want to avoid decoding every path (especially for ones that
haven't changed.)

That said, we might consider pushing this down one level, and having the
iter_changes() code do the decode if it knows that it has a utf-8 path.

The main goal is to not .decode() paths that haven't changed. However,
by the time we are calling sha1() or stat_and_sha1() we are already
doing an expensive operation, so having it decode the path at that time
is probably reasonable.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknbijYACgkQJdeBCYSNAAO4AQCcCpEGbRJWi//I1AAiqZE8gw0U
lwEAoM+oA17QflLhY6zNHE7lgt8Aa4ab
=3i8r
-----END PGP SIGNATURE-----



More information about the bazaar mailing list