I wrote a commit hook that works fine on the command line:
example.py
def saysomething(ui, repo, **kwargs):
ui.status('today is 26-May')
I set up my repository .hg \ hgrc file to include:
[hooks]
commit = python:/path/to/example.py:saysomething
And when I take the command from the command line, I get the output "today is May 26th", as expected.
But I can not convince the TortoiseHg GUI to display a completion message. Am I using the wrong syntax in my python script? Do I need to add a hook to any configuration file other than the hgrc repository? I also tried adding a hook to the global .hgrc file, but that didn't help, and that would be a bad solution for my problem.
I looked at the HG tutorial on writing hooks , the tutorial on writing extensions, and the TortoiseHg tutorial, and I see nowhere to explain how to do this.
Using TortoiseHg 2.0.4, including Mercurial 1.8, on Windows XP.
Jerry source
share