I want to write a hook that performs some actions each time I run hg branch branch_name (e.g. set “In progress” status for a JIRA ticket), but I can’t find anything that runs during branching. Is there a way I can do it?
I want to write a hook that performs some actions each time I run
Share
The is a
pre-<command>hook (with a hyphen) for each command. Note that is is distinct from any hook that may exist without a hyphen, sush asprecommit.Thus you can do:
to invoke:
when you run:
Full details on the generic
pre-<command>(andpost-<command>) hooks can be found on the hgrc man page.It also looks like
pushkeyhook might do what you want, butpre-bookmark(or better,post-bookmark) is probably more straightforward.