Patchwork D7190: py3: fix fsmonitor's _watchmantofsencoding exception message encoding

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

Comments

phabricator - Nov. 1, 2019, 5:39 p.m.
Closed by commit rHG29e75689d4a2: py3: fix fsmonitor&#039;s _watchmantofsencoding 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/D7190?vs=17444&id=17464

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

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

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
@@ -245,12 +245,12 @@ 
     try:
         decoded = path.decode(_watchmanencoding)
     except UnicodeDecodeError as e:
-        raise error.Abort(str(e), hint=b'watchman encoding error')
+        raise error.Abort(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(forcebytestr(e))
 
     return encoded