param( $Username, $Password ) $token = (":" -f $Username, $Password) $token Bytes = [System.
As you can see, you can run an arbitrary shell command in a hook.
Mercurial passes extra information to the hook using environment variables (look for event occurs.
Instead, you can set up your policies for use of Mercurial so that people are expected to propagate changes through a well-known “” server that you have locked down and configured appropriately.
One way to do this is via a combination of social engineering and technology.
In some cases, you can even control Mercurial's response to those events.