copyright check pre-commit hook

John Arbash Meinel john at arbash-meinel.com
Fri Jan 8 00:20:28 GMT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Erik de Castro Lopo wrote:
> Erik de Castro Lopo wrote:
> 
>> Thanks John, thats enough to get me started.
> 
> Actually its not. What do I need in the __init__.py file to 
> register the pre-commit-hook. All the examples I can find
> are for registering a new command.
> 
> Erik

from bzrlib import branch
branch.Branch.hooks.install_named_hook('pre_commit', copyright_hook,
'copyright-hook')

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktGekwACgkQJdeBCYSNAAN4uQCfcMZEJbwnH9aM27KRKS7i+SJi
/VoAoI05IApecOsPMYLm3dmeYfeDqTb7
=MhO9
-----END PGP SIGNATURE-----



More information about the bazaar mailing list