Patchwork D7196: py3: fix fsmonitor's _handleunavailable exception message encoding

login
register
mail settings
Submitter phabricator
Date Nov. 1, 2019, 5:28 p.m.
Message ID <b4c14ab2f8ac86aa8188683c82bf78b9@localhost.localdomain>
Download mbox | patch
Permalink /patch/42662/
State Not Applicable
Headers show

Comments

phabricator - Nov. 1, 2019, 5:28 p.m.
Closed by commit rHGb567c4365974: py3: fix fsmonitor&#039;s _handleunavailable exception message encoding (authored by touilleMan).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7196?vs=17450&id=17451

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

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

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS




To: touilleMan, #hg-reviewers, indygreg
Cc: 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
@@ -207,8 +207,8 @@ 
     if isinstance(ex, watchmanclient.Unavailable):
         # experimental config: fsmonitor.verbose
         if ex.warn and ui.configbool(b'fsmonitor', b'verbose'):
-            if b'illegal_fstypes' not in str(ex):
-                ui.warn(str(ex) + b'\n')
+            if b'illegal_fstypes' not in forcebytestr(ex):
+                ui.warn(forcebytestr(ex) + b'\n')
         if ex.invalidate:
             state.invalidate()
         # experimental config: fsmonitor.verbose