py3: use util.forcebytestr instead of str to convert error messages
authorPulkit Goyal <7895pulkit@gmail.com>
Sat, 24 Feb 2018 01:20:20 +0530
changeset 36388 6f6063553502
parent 36387 dbf34d0ef9f6
child 36389 469c7e146c8f
py3: use util.forcebytestr instead of str to convert error messages Differential Revision: https://phab.mercurial-scm.org/D2411
hgext/mq.py
--- a/hgext/mq.py	Sat Feb 24 01:19:26 2018 +0530
+++ b/hgext/mq.py	Sat Feb 24 01:20:20 2018 +0530
@@ -855,7 +855,7 @@
                                   files=files, eolmode=None)
             return (True, list(files), fuzz)
         except Exception as inst:
-            self.ui.note(str(inst) + '\n')
+            self.ui.note(util.forcebytestr(inst) + '\n')
             if not self.ui.verbose:
                 self.ui.warn(_("patch failed, unable to continue (try -v)\n"))
             self.ui.traceback()