copyright check pre-commit hook
John Arbash Meinel
john at arbash-meinel.com
Sat Jan 9 13:23:45 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.
>
> I haven't coded much Python since about 2003, but I code C, C++, Ocaml and
> Haskell regularly. That means Python was as painful for me as Haskell
> would be for most of you.
>
> However, with help from John Arbash Meinel here and Rob Collins on
> irc i have managed to come up with this:
>
> bzr get http://www.mega-nerd.com/Bzr/bzr-plugins/bzr-copyright-check
>
> which still needs some work, but does meet my minimal needs for this
> plugin.
>
> Thanks John and Rob.
>
> Cheers,
> Erik
You might also want to add something with:
future_rev = local_branch.repository.get_revision(new_revid)
committer = future_rev.committer
authors = future_rev.get_apparent_authors()
# Inspect copyright lines to make sure there is one with the current
# year and the current committer/authors
'authors' is one or more authors, meant to indicate who actually wrote
the code. (In the case that someone sent you a patch that you are
committing for them.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAktIg2EACgkQJdeBCYSNAANb9ACgkn1MzXI6lcXU3eYThvX152E8
VzkAnjxJZfvB8wzf1CQ+CfNaEB7yU3ly
=3twE
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list