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

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2018, 10:43 a.m.
Message ID <fe48c021edb36979a2accccfcfd05587@localhost.localdomain>
Download mbox | patch
Permalink /patch/28311/
State Not Applicable
Headers show

Comments

phabricator - Feb. 24, 2018, 10:43 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6f6063553502: py3: use util.forcebytestr instead of str to convert error messages (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2411?vs=6030&id=6035

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

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
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()