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
--- 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):