At http://people.samba.org/bzr/jelmer/bzr-svn/0.5
------------------------------------------------------------
revno: 2246
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: 0.5
timestamp: Mon 2008-12-08 18:52:11 +0100
message:
make sure encoding for cache dir is correct.
modified:
cache.py cache.py-20070520185908-qbtlcet08bllgs0f-1
=== modified file 'cache.py'
--- a/cache.py 2008-09-09 11:32:56 +0000
+++ b/cache.py 2008-12-08 17:52:11 +0000
@@ -16,9 +16,16 @@
"""Subversion cache directory access."""
import bzrlib
-from bzrlib import debug
-from bzrlib.config import config_dir, ensure_config_dir_exists
+from bzrlib import (
+ debug,
+ osutils,
+ )
+from bzrlib.config import (
+ config_dir,
+ ensure_config_dir_exists,
+ )
from bzrlib.trace import mutter, warning
+
from bzrlib.plugins.svn import version_info
import os, sys
@@ -41,8 +48,13 @@
except ImportError:
base_cache_dir = config_dir()
else:
- base_cache_dir = get_local_appdata_location()
- assert base_cache_dir is not None
+ s = get_local_appdata_location()
+ assert s is not None
+ # This can return a unicode string or a plain string in
+ # user encoding
+ if type(s) == str:
+ s = s.decode(osutils.get_user_encoding())
+ base_cache_dir = s.encode(osutils._fs_enc)
else:
base_cache_dir = config_dir()
cache_dir = os.path.join(base_cache_dir, name)
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits