pre-commit wont trigger if set using setconfig
Created originally on Bitbucket by Anonymous
I am writing a small extension and it uses pre-commit to apply a template to the commit message like so:
def uisetup(ui):
ui.setconfig('hooks', 'pre-commit.issue_id_prepend', precommit_hook)
def precommit_hook(ui, repo, **kwargs):
sys.stdout.write("precommit_hook triggered\n")
This works fine from the command line and works if I manually setup the hook in tortoisehg directly to precommit_hook. but as an enxtension I would ideally prefer it doesn't require manual setup.
Am I doing something wrong.
This guy also has the same issue but with an older version: http://comments.gmane.org/gmane.comp.version-control.mercurial.tortoisehg.user/2824