Patchwork D7206: fsmonitor: coerce watchman exception to bytes

login
register
mail settings
Submitter phabricator
Date Nov. 4, 2019, 4:27 p.m.
Message ID <925274953c055468d63a60b6668674b7@localhost.localdomain>
Download mbox | patch
Permalink /patch/42716/
State Not Applicable
Headers show

Comments

phabricator - Nov. 4, 2019, 4:27 p.m.
Closed by commit rHG5fa8ac91190e: fsmonitor: coerce watchman exception to bytes (authored by indygreg).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7206?vs=17504&id=17522

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7206/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7206

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mjpieters, mercurial-devel

Patch

diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -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):