Mercurial > hg
changeset 36421:1df7e7b8558e
subrepo: use util.forcebytestr() instead of str() on exception
Differential Revision: https://phab.mercurial-scm.org/D2437
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 25 Feb 2018 22:30:14 -0500 |
parents | a39126a40be6 |
children | 04c319a07c7b |
files | mercurial/subrepo.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/subrepo.py Sun Feb 25 22:29:28 2018 -0500 +++ b/mercurial/subrepo.py Sun Feb 25 22:30:14 2018 -0500 @@ -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())