changeset 40658:4ec8bee15930

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.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 15 Nov 2018 17:50:14 -0500
parents 2eb48aa0acce
children 8863f08c1630
files mercurial/scmutil.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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: