Patchwork D2411: py3: use util.forcebytestr instead of str to convert error messages

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2018, 9:40 a.m.
Message ID <differential-rev-PHID-DREV-6t635qz5enlickchdrmr-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28304/
State Superseded
Headers show

Comments

phabricator - Feb. 24, 2018, 9:40 a.m.
pulkit 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/D2411

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -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()