I am trying to make my first commit hook and it is not working. I got the idea from here http://doc.bazaar.canonical.com/beta/en/user-guide/hooks.html
What I am trying todo is to start by making my own custom commit message. but this does not work. please can you help?
I made a python file called commit_hook.py
from bzrlib import branch
def my_commit_hook(push_result):
print "I made this and the new revno is %d" % commit_result.new_revno
branch.Branch.hooks.install_named_hook('post_commit', post_commit_hook,
'My post_commit hook')
I put the file commit_hook.py in my .bzr hidden folder in my repository. I made the plugins directory? is that correct?
.bzr/
├──
├── branch-format
├── branch-lock
├── plugins
│ └── commit_hook.py
├── README
Per the docs:
Therefore,
Also,
post_commit_hook
should bemy_commit_hook
: