changeset 43723:eab0b7383cd3 stable

patch: fix a str + bytes issue in an exception handler Flagged by pytype. Differential Revision: https://phab.mercurial-scm.org/D7466
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 21 Nov 2019 14:28:28 -0500
parents aff3f6e407a1
children 5be128f669d4
files mercurial/patch.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Wed Nov 20 08:11:21 2019 -0800
+++ b/mercurial/patch.py	Thu Nov 21 14:28:28 2019 -0500
@@ -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