move hintutil.show after runcommand

Summary: This will allow us to trigger hints from functions that wrap runcommand itself.

Reviewed By: quark-zju

Differential Revision: D8591974

fbshipit-source-id: e8e4742d6728ca347b85d10adc2e2ab7ab06ef16
This commit is contained in:
Mateusz Kwapich 2018-06-25 07:31:47 -07:00 committed by Facebook Github Bot
parent 51d851c20a
commit b7bf572019

View File

@ -1043,7 +1043,6 @@ def runcommand(lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions):
pats=cmdpats,
opts=cmdoptions,
)
hintutil.show(lui)
except Exception:
# run failure hook and re-raise
hook.hook(
@ -1316,9 +1315,11 @@ def _dispatch(req):
strcmdopt = pycompat.strkwargs(cmdoptions)
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
try:
return runcommand(
ret = runcommand(
lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
)
hintutil.show(lui)
return ret
finally:
for func in deferred:
func()