Patchwork D7194: py3: fix crecord.py's editpatchwitheditor exception message encoding

login
register
mail settings
Submitter phabricator
Date Nov. 1, 2019, 4:47 p.m.
Message ID <differential-rev-PHID-DREV-cb27ijaybhemjgyo6mwt-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42659/
State Superseded
Headers show

Comments

phabricator - Nov. 1, 2019, 4:47 p.m.
touilleMan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/crecord.py

CHANGE DETAILS




To: touilleMan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -1816,7 +1816,7 @@ 
             try:
                 patch = self.ui.edit(patch.getvalue(), b"", action=b"diff")
             except error.Abort as exc:
-                self.errorstr = str(exc)
+                self.errorstr = stringutil.forcebytestr(exc)
                 return None
             finally:
                 self.stdscr.clear()