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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sat Feb 24 10:43:18 UTC 2018


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

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



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


More information about the Mercurial-devel mailing list