Mercurial > hg-stable
changeset 43374:65c37b431e76 stable
py3: fix fsmonitor's _watchmantofsencoding exception message encoding
Differential Revision: https://phab.mercurial-scm.org/D7190
author | Emmanuel Leblond <emmanuel.leblond@gmail.com> |
---|---|
date | Fri, 01 Nov 2019 11:02:47 -0700 |
parents | de2c8722a787 |
children | c2c3ee8794dd |
files | hgext/fsmonitor/__init__.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/fsmonitor/__init__.py Thu Oct 31 15:03:12 2019 -0700 +++ b/hgext/fsmonitor/__init__.py Fri Nov 01 11:02:47 2019 -0700 @@ -246,12 +246,14 @@ try: decoded = path.decode(_watchmanencoding) except UnicodeDecodeError as e: - raise error.Abort(str(e), hint=b'watchman encoding error') + raise error.Abort( + stringutil.forcebytestr(e), hint=b'watchman encoding error' + ) try: encoded = decoded.encode(_fsencoding, 'strict') except UnicodeEncodeError as e: - raise error.Abort(str(e)) + raise error.Abort(stringutil.forcebytestr(e)) return encoded