Disable hook temporarily?

Is it possible to temporarily disable the hook when executing a mercurial command? for example something like:

hg push --no-hook

      

+3


source to share


3 answers


You cannot disable the remote repository. But you can enable or disable local capture with the option --config

:



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

      

+2


source


According to this error , the following missing local interceptors:

hg --config alias._pull=pull _pull

      



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

+5


source


If it is a host outgoing

or preoutgoing

that is configured locally, it can be disabled by commenting out its entry in [hooks]

the .hg/hgrc

. If this is a trick that is configured in the repository to which you press ( changegroup

, incoming

, prechangegroup

, pretxnchangegroup

), you will need to comment on his record [hooks]

in the target repository .hg/hgrc

(if you have access to it).

0


source







All Articles