Submitter | Yuya Nishihara |
---|---|
Date | March 2, 2018, 12:26 a.m. |
Message ID | <42239a898f18efa76829.1519950387@mimosa> |
Download | mbox | patch |
Permalink | /patch/28632/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/encoding.py b/mercurial/encoding.py --- a/mercurial/encoding.py +++ b/mercurial/encoding.py @@ -181,7 +181,8 @@ def fromlocal(s): return u.encode("utf-8") except UnicodeDecodeError as inst: sub = s[max(0, inst.start - 10):inst.start + 10] - raise error.Abort("decoding near '%s': %s!" % (sub, inst)) + raise error.Abort("decoding near '%s': %s!" + % (sub, pycompat.bytestr(inst))) except LookupError as k: raise error.Abort(k, hint="please check your locale settings")