What are all steps required to validate commit message with set of regular expressions?
We want to work in semi-centralized set-up so I need a solution for the developer clone (local repository
) and for our central clone (global repository
). I read about Mercurial Hooks but I am a little bit lost how to put all things together.
For local repository
I need a way to distribute validation script across my developers. I know that hooks do not propagate when cloning so I need to a way to "enable" them in each fresh clone. It would be done as a part of our PrepareEnvironement.bat
script that we run anyway on each clean clone.
To be double safe I need similar validation on my global repository
. It should not be possible to push into global repository
commit that are not validating. I can configure it manually - it is one time job.
I am on Windows so installing anything except TortoiseHG should not be required. It was already a fight to get Mercurial deployed. Any other dependencies are not welcomed.