Patchwork D2176: py3: convert traceback representation to bytes when logging

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 2:48 a.m.
Message ID <324fc53642cc9039de29aee420544119@localhost.localdomain>
Download mbox | patch
Permalink /patch/27777/
State Not Applicable
Headers show

Comments

phabricator - Feb. 13, 2018, 2:48 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9446246e4d1a: py3: convert traceback representation to bytes when logging (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2176?vs=5477&id=5598

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

AFFECTED FILES
  mercurial/dispatch.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, pulkit, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -992,6 +992,7 @@ 
     this function returns False, ignored otherwise.
     """
     warning = _exceptionwarning(ui)
-    ui.log("commandexception", "%s\n%s\n", warning, traceback.format_exc())
+    ui.log("commandexception", "%s\n%s\n", warning,
+           pycompat.sysbytes(traceback.format_exc()))
     ui.warn(warning)
     return False  # re-raise the exception