How to execute a command line application (bat) before doing mercurial commit?

I would like to execute a command line application before each push (push) to the central repository. If the application fails to execute, commit must end with some message.

I found some examples of python hooks but said nothing about calling bats or exe.

+4
source share
1 answer

You just put the exe / batch file as a command for the hook (you probably don't need the bat and exe extensions):

[hooks] pre-commit.example1 = /path/to/somebatfile.bat pre-commit.example2 = /path/to/someexefile.exe 
+4
source

All Articles