What are the hook parameters passed to the external hook / script program?

The name reads: I'm looking for variable names (HG_ *), so I can use them in my script hook ..

+5
source share
2 answers

Oben has a better answer, but for specific cases or poorly documented parameters, you can easily test specific hooks using a hook that simply prints variables:

hg --config hooks.pre-commit="export| grep HG_" commit

Where there pre-commitcan be any hook you want to test, and there commitcan be any team you want to test.

For example, shown:

export HG_ARGS='commit'
export HG_OPTS='{'"'"'exclude'"'"': [], '"'"'message'"'"': '"''"', '"'"'addremove'"'"': None, '"'"'include'"'"': [], '"'"'close_branch'"'"': None, '"'"'user'"'"': '"''"', '"'"'date'"'"': '"''"', '"'"'logfile'"'"': '"''"', '"'"'mq'"'"': None}'
export HG_PATS='[]'
+9
source
+8

All Articles