mercurialmercurial-hook

Temporarily disable a hook?


Is it possible to temporarily disable a hook when running a mercurial command? e.g., something like:

hg push --no-hook

Solution

  • You can't disable a remote repository's hook. But you could enable or disable a local hook via --config option:

    $ hg commit -m test --config 'hooks.commit.info=set | grep "^HG_"'