diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py --- a/mercurial/pycompat.py +++ b/mercurial/pycompat.py @@ -337,7 +337,11 @@ ret = shlex.split(s.decode('latin-1'), comments, posix) return [a.encode('latin-1') for a in ret] - shlexquote = shlex.quote + def shlexquote(s): + s = s.decode('latin-1') + s = shlex.quote(s) + return s.encode('latin-1') + iteritems = lambda x: x.items() itervalues = lambda x: x.values()