Patchwork D7466: patch: fix a str + bytes issue in an exception handler

login
register
mail settings
Submitter phabricator
Date Nov. 22, 2019, 2:50 a.m.
Message ID <b174e180ca2d14031b491eef35108884@localhost.localdomain>
Download mbox | patch
Permalink /patch/43398/
State Not Applicable
Headers show

Comments

phabricator - Nov. 22, 2019, 2:50 a.m.
Closed by commit rHGeab0b7383cd3: patch: fix a str + bytes issue in an exception handler (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7466?vs=18264&id=18270

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7466/new/

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

AFFECTED FILES
  mercurial/patch.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel

Patch

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -2290,7 +2290,7 @@ 
             try:
                 current_file = patcher(ui, gp, backend, store, eolmode=eolmode)
             except PatchError as inst:
-                ui.warn(str(inst) + b'\n')
+                ui.warn(stringutil.forcebytestr(inst) + b'\n')
                 current_file = None
                 rejects += 1
                 continue