# HG changeset patch
# User Yuya Nishihara
# Date 1544950397 -32400
# Sun Dec 16 17:53:17 2018 +0900
# Node ID 8c8fcb385c46890e1dc5d00ce3ced360974cecef
# Parent 7654291091cf35aade1d8e628def25a2fc3b567a
py3: use forcebytestr() to stringify hook exception
This fixes test-narrow-exchange.t.
diff --git a/mercurial/hook.py b/mercurial/hook.py
--- a/mercurial/hook.py
+++ b/mercurial/hook.py
@@ -102,7 +102,7 @@ def pythonhook(ui, repo, htype, hname, f
(hname, exc.args[0]))
else:
ui.warn(_('error: %s hook raised an exception: '
- '%s\n') % (hname, encoding.strtolocal(str(exc
+ '%s\n') % (hname, stringutil.forcebytestr(exc)))
if throw:
raise
if not ui.tracebackflag:
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel