If you put a .py file with this in it into the ~/.bazaar/plugins/ directory then the Python prints a list of changed files out when you make a commit to Bazaar.
This is already done by Bazaar of course... step 2 is to make it poke that list into a web service... I'll look at that reference which I also found.
from bzrlib import (branch,errors,lazy_import,)
__version__ = '0.0.1'
version_info = 0,1,0
def pre_commit_hook(local, master, old_revno, old_revid, future_revno, future_revid, tree_delta, future_tree):
"""This hook executes pre-commit."""
# For all added files...
for path, file_id, kind in tree_delta.added:
print "Added " +path
# For all files with modifications...
for path, file_id, kind, text_modified, meta_modified in tree_delta.modified:
if not text_modified:
continue
print "Modified " +path
# For all renamed files
for (oldpath, newpath, file_id, kind,text_modified, meta_modified) in tree_delta.renamed:
if not text_modified:
continue
print "Renamed " +newpath
branch.Branch.hooks.install_named_hook('pre_commit', pre_commit_hook, '***Custom pre_commit hook')