hook invocation output and -v

Matt Mackall mpm at selenic.com
Fri Aug 17 21:40:16 CDT 2012


On Wed, 2012-08-15 at 03:50 +0000, Matt Harbison wrote:
> It seems odd to me that -v will cause a line to be printed that a hook is being
> called

Well, no, not really. Whether or not a potentially important or
lunch-taking hook is being called or not is, I think, a much more
user-facing concern than what we usually use --debug for. We're not
super-consistent about this, but I think we need a message about hook
execution at this level.

However, we probably could just print something like:

 running 'precommit' hooks

if there are 1 or more hooks, and move the lower-level reports to debug
level.

I'm also noticing that we're going through the I/O redirection dance at
each hook point even if there are 0 registered hooks. That's suboptimal.

>  (and with a function address no less)

That's admittedly tacky. On the other hand, Python hooks: solidly in
use-at-your-own-risk territory, just like the API. But if you want to
pretty that up to print module and function name, that'd be great.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list