diff -r 8ca92bcb3083 -r 7eb701e355bd mercurial/patch.py --- a/mercurial/patch.py Thu Nov 21 15:46:35 2019 -0500 +++ b/mercurial/patch.py Fri Nov 22 21:42:04 2019 +0900 @@ -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