Mercurial > hg-stable
changeset 16067:467a85ced564 stable
i18n: use util.pconvert() instead of 'str.replace()' for problematic encoding
some problematic encodings use backslash as part of multi-byte characters.
util.pconvert() can treat strings in such encodings correctly, if
win32mbcs is enabled, but str.replace() can not.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sun, 05 Feb 2012 22:58:31 +0900 |
parents | 6a42846cf769 |
children | 73aaff46175b |
files | hgext/convert/subversion.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Sun Feb 05 22:58:31 2012 +0900 +++ b/hgext/convert/subversion.py Sun Feb 05 22:58:31 2012 +0900 @@ -197,7 +197,7 @@ proto = 'file' path = os.path.abspath(url) if proto == 'file': - path = path.replace(os.sep, '/') + path = util.pconvert(path) check = protomap.get(proto, lambda *args: False) while '/' in path: if check(ui, path, proto):