Ideally I’d like an answer to the title question.
However, for my particular case, I have a Perl script that I want to run from the precommit hook and I’d like to know if Mercurial was invoked with the -A option passed to the commit command (e.g. hg commit -A) and if it wasn’t, is it possible to “pass” it in at that point?
This is going to seem a little silly, but in addition to the
precommithook, there’s a pre-XXXX (and post-XXXX) hook for every command, which gets some different variables:So do a
pre-commithook instead and check those variables.