diff options
author | W. Trevor King <wking@drexel.edu> | 2009-11-17 09:51:18 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-11-17 09:51:18 -0500 |
commit | 5563818b85a7c9f68ede85cae902aceea42e5679 (patch) | |
tree | 674a4de9a5f63c5e67ed07b15a76f4b1fcedf398 /libbe/hg.py | |
parent | 0b51c1b9a7495821dcdf444eb636b4764b96c0b1 (diff) | |
parent | f108f5a0fb0984c0daccd8be72ea0ffa309b3fff (diff) | |
download | bugseverywhere-5563818b85a7c9f68ede85cae902aceea42e5679.tar.gz |
Fixed bug with unicode handling reported by Nicolas Alvarez.
Date: Mon, 16 Nov 2009 20:34:50 -0300
From: Nicolas Alvarez <nicolas.alvarez@gmail.com>
Subject: [Be-devel] Mercurial + BE + Unicode doesn't work
My username in ~/.hgrc contains a Unicode character. When I run "be new" on
a Mercurial repository, I get an unhandled Python exception:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13:
ordinal not in range(128)
The following shell script should reproduce the error:
#!/bin/sh
repo=/tmp/`mktemp -d bug-repro.XXXX`
hg init $repo
cd $repo
/usr/bin/printf "[ui]\nusername = Nicol\u00e1s\n" > $repo/.hg/hgrc
be set-root $repo
be new "Testing"
rm -rf /tmp/$repo
[WTK:
Note that the
be set-root
usage is out of date, it is now
be init
]
Diffstat (limited to 'libbe/hg.py')
-rw-r--r-- | libbe/hg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbe/hg.py b/libbe/hg.py index 7cd4c2f..40739b6 100644 --- a/libbe/hg.py +++ b/libbe/hg.py @@ -45,10 +45,10 @@ class Hg(vcs.VCS): return True return False def _vcs_root(self, path): - status,output,error = self._u_invoke_client("root", directory=path) + status,output,error = self._u_invoke_client("root", cwd=path) return output.rstrip('\n') def _vcs_init(self, path): - self._u_invoke_client("init", directory=path) + self._u_invoke_client("init", cwd=path) def _vcs_get_user_id(self): status,output,error = self._u_invoke_client("showconfig","ui.username") return output.rstrip('\n') |