Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 663
keflavich Avatar asked Dec 26 '22 09:12

keflavich


2 Answers

According to this bugfeature, the following skips local hooks:

hg --config alias._pull=pull _pull

Obviously this is a hack, but it has worked since 2011, and is the only way to skip local hooks given the lack of a '--no-hooks' option.

like image 99
Chris Dunder Avatar answered Jan 14 '23 07:01

Chris Dunder


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_"'
like image 26
andref Avatar answered Jan 14 '23 06:01

andref