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()