# HG changeset patch # User Matt Harbison # Date 1542322214 18000 # Node ID 4ec8bee15930d0b9e4b00c759bf50c92e060a572 # Parent 2eb48aa0acceeca507c0195950f98e8f865d1ea2 scmutil: display the optional hint when handling StorageError in catchall() Other than CensoredNodeError (which is also a StorageError), it looks like all exceptions with a hint display them. I'm not sure that it makes sense to have a hint for censored nodes, so I'm not bothering with that. It looks like nobody is using this yet, as the tests don't change. diff -r 2eb48aa0acce -r 4ec8bee15930 mercurial/scmutil.py --- a/mercurial/scmutil.py Thu Nov 15 14:57:26 2018 +0100 +++ b/mercurial/scmutil.py Thu Nov 15 17:50:14 2018 -0500 @@ -212,6 +212,8 @@ ui.error(_("abort: file censored %s!\n") % inst) except error.StorageError as inst: ui.error(_("abort: %s!\n") % inst) + if inst.hint: + ui.error(_("(%s)\n") % inst.hint) except error.InterventionRequired as inst: ui.error("%s\n" % inst) if inst.hint: