D7670: ui: convert exception data to bytes when printing chained exception info

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Mon Dec 16 01:31:08 EST 2019


Closed by commit rHGe63b27fb0595: ui: convert exception data to bytes when printing chained exception info (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7670?vs=18734&id=18746

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

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

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1857,9 +1857,9 @@
                 # exclude frame where 'exc' was chained and rethrown from exctb
                 self.write_err(
                     b'Traceback (most recent call last):\n',
-                    b''.join(exctb[:-1]),
-                    b''.join(causetb),
-                    b''.join(exconly),
+                    encoding.strtolocal(''.join(exctb[:-1])),
+                    encoding.strtolocal(''.join(causetb)),
+                    encoding.strtolocal(''.join(exconly)),
                 )
             else:
                 output = traceback.format_exception(exc[0], exc[1], exc[2])



To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list