Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG1df7e7b8558e: subrepo: use util.forcebytestr() instead of str() on exception
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/subrepo.py (3 lines) |
def decoratedmethod(self, *args, **kargs): | def decoratedmethod(self, *args, **kargs): | ||||
try: | try: | ||||
res = func(self, *args, **kargs) | res = func(self, *args, **kargs) | ||||
except SubrepoAbort as ex: | except SubrepoAbort as ex: | ||||
# This exception has already been handled | # This exception has already been handled | ||||
raise ex | raise ex | ||||
except error.Abort as ex: | except error.Abort as ex: | ||||
subrepo = subrelpath(self) | 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 | # avoid handling this exception by raising a SubrepoAbort exception | ||||
raise SubrepoAbort(errormsg, hint=ex.hint, subrepo=subrepo, | raise SubrepoAbort(errormsg, hint=ex.hint, subrepo=subrepo, | ||||
cause=sys.exc_info()) | cause=sys.exc_info()) | ||||
return res | return res | ||||
return decoratedmethod | return decoratedmethod | ||||
def _updateprompt(ui, sub, dirty, local, remote): | def _updateprompt(ui, sub, dirty, local, remote): | ||||
if dirty: | if dirty: |