mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
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:
parent
51d851c20a
commit
b7bf572019
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user