Mercurial > hg > mercurial-crew
changeset 14761:1a9256cdf10f stable
error: Add a hint argument to RepoError
This use the same mechanism than Abort. Except clause stay distinct
because RepoError add "!" at the end of the message.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sat, 25 Jun 2011 02:30:17 +0200 (2011-06-25) |
parents | cebbc6b38c05 |
children | 6beb26747430 |
files | mercurial/dispatch.py mercurial/error.py |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -125,6 +125,8 @@ commands.help_(ui, 'shortlist') except error.RepoError, inst: ui.warn(_("abort: %s!\n") % inst) + if inst.hint: + ui.warn(_("(%s)\n") % inst.hint) except error.ResponseError, inst: ui.warn(_("abort: %s") % inst.args[0]) if not isinstance(inst.args[1], basestring):