D7466: patch: fix a str + bytes issue in an exception handler
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Thu Nov 21 23:23:38 UTC 2019
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Flagged by pytype.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D7466
AFFECTED FILES
mercurial/patch.py
CHANGE DETAILS
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
To: mharbison72, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list