D2437: subrepo: use util.forcebytestr() instead of str() on exception
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Mon Feb 26 03:49:16 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2437
AFFECTED FILES
mercurial/subrepo.py
CHANGE DETAILS
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -73,7 +73,8 @@
raise ex
except error.Abort as ex:
subrepo = subrelpath(self)
- errormsg = str(ex) + ' ' + _('(in subrepository "%s")') % subrepo
+ errormsg = (util.forcebytestr(ex) + ' '
+ + _('(in subrepository "%s")') % subrepo)
# avoid handling this exception by raising a SubrepoAbort exception
raise SubrepoAbort(errormsg, hint=ex.hint, subrepo=subrepo,
cause=sys.exc_info())
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list