Mercurial > hg-stable
changeset 43390:5fa8ac91190e stable
fsmonitor: coerce watchman exception to bytes
Without this, we get errors due to passing str to a function
which expects bytes.
Differential Revision: https://phab.mercurial-scm.org/D7206
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 02 Nov 2019 13:08:20 -0700 |
parents | e6ce1599af74 |
children | ffdf0bf28212 |
files | hgext/fsmonitor/__init__.py |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/fsmonitor/__init__.py Sat Nov 02 13:04:47 2019 -0700 +++ b/hgext/fsmonitor/__init__.py Sat Nov 02 13:08:20 2019 -0700 @@ -214,9 +214,17 @@ state.invalidate() # experimental config: fsmonitor.verbose if ui.configbool(b'fsmonitor', b'verbose'): - ui.log(b'fsmonitor', b'Watchman unavailable: %s\n', ex.msg) + ui.log( + b'fsmonitor', + b'Watchman unavailable: %s\n', + stringutil.forcebytestr(ex.msg), + ) else: - ui.log(b'fsmonitor', b'Watchman exception: %s\n', ex) + ui.log( + b'fsmonitor', + b'Watchman exception: %s\n', + stringutil.forcebytestr(ex), + ) def _hashignore(ignore):