From b7bf572019c81a46036a40074334a2ccf355717a Mon Sep 17 00:00:00 2001 From: Mateusz Kwapich Date: Mon, 25 Jun 2018 07:31:47 -0700 Subject: [PATCH] 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 --- mercurial/dispatch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py index da59e030e7..ccb60219e7 100644 --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -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()