Rev 6030: Backport fix for bug #822571 in http://bazaar.launchpad.net/~vila/bzr/2.4-integration/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Aug 11 08:44:54 UTC 2011
At http://bazaar.launchpad.net/~vila/bzr/2.4-integration/
------------------------------------------------------------
revno: 6030
revision-id: v.ladeuil+lp at free.fr-20110811084454-e315jdlsmaju8ebp
parent: pqm at pqm.ubuntu.com-20110810170153-hs7vuauw37vqi8qu
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 2.4.0-dev
timestamp: Thu 2011-08-11 10:44:54 +0200
message:
Backport fix for bug #822571
-------------- next part --------------
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py 2011-07-25 07:51:35 +0000
+++ b/bzrlib/config.py 2011-08-11 08:44:54 +0000
@@ -1504,14 +1504,16 @@
raise errors.BzrError('You must have one of BZR_HOME, APPDATA,'
' or HOME set')
return osutils.pathjoin(base, 'bazaar', '2.0')
- elif sys.platform == 'darwin':
+ else:
+ if base is not None:
+ base = base.decode(osutils._fs_enc)
+ if sys.platform == 'darwin':
if base is None:
# this takes into account $HOME
base = os.path.expanduser("~")
return osutils.pathjoin(base, '.bazaar')
else:
if base is None:
-
xdg_dir = os.environ.get('XDG_CONFIG_HOME', None)
if xdg_dir is None:
xdg_dir = osutils.pathjoin(os.path.expanduser("~"), ".config")
@@ -1520,7 +1522,6 @@
trace.mutter(
"Using configuration in XDG directory %s." % xdg_dir)
return xdg_dir
-
base = os.path.expanduser("~")
return osutils.pathjoin(base, ".bazaar")
More information about the bazaar-commits
mailing list