[Updated] D11467: encoding: force a few Errors to bytes before passing to `error.Abort`
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Wed Sep 22 07:56:39 UTC 2021
Closed by commit rHG28c62f83b652: encoding: force a few Errors to bytes before passing to `error.Abort` (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11467?vs=30341&id=30359
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11467/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11467
AFFECTED FILES
mercurial/encoding.py
CHANGE DETAILS
diff --git a/mercurial/encoding.py b/mercurial/encoding.py
--- a/mercurial/encoding.py
+++ b/mercurial/encoding.py
@@ -240,7 +240,9 @@
b"decoding near '%s': %s!" % (sub, pycompat.bytestr(inst))
)
except LookupError as k:
- raise error.Abort(k, hint=b"please check your locale settings")
+ raise error.Abort(
+ pycompat.bytestr(k), hint=b"please check your locale settings"
+ )
def unitolocal(u):
@@ -306,7 +308,9 @@
except UnicodeError:
return s.lower() # we don't know how to fold this except in ASCII
except LookupError as k:
- raise error.Abort(k, hint=b"please check your locale settings")
+ raise error.Abort(
+ pycompat.bytestr(k), hint=b"please check your locale settings"
+ )
def upper(s):
@@ -333,7 +337,9 @@
except UnicodeError:
return s.upper() # we don't know how to fold this except in ASCII
except LookupError as k:
- raise error.Abort(k, hint=b"please check your locale settings")
+ raise error.Abort(
+ pycompat.bytestr(k), hint=b"please check your locale settings"
+ )
if not _nativeenviron:
To: mharbison72, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210922/dee0dac4/attachment-0002.html>
More information about the Mercurial-patches
mailing list