bzr-update-copyright

John Arbash Meinel john at arbash-meinel.com
Fri Jan 8 21:45:47 GMT 2010


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

Gordon Tyler wrote:
> On 07/01/2010 3:31 PM, John Arbash Meinel wrote:
>> I just hacked together a new plugin, which I thought people might be
>> interested in. It is currently available from:
>>   bzr branch lp:~jameinel/+junk/bzr-update-copyright update_copyright
>>
>> The basic idea is that it will look in the bzr data to determine when
>> the file was modified and then update a Copyright line.
> 
> Neat! I never thought of using VCS history to update that.
> 
>> Running this over bzr.dev shows 609 files updated. I'm not 100% sure if
>> we want to use this or not. But I was getting annoyed manually update
>> the lines when I came across them, when I know that we already have that
>> data available.
> 
> How about an option to make it only operate on files which are currently
> modified or added in the working tree?
> 
> Ciao,
> Gordon
> 

So having thought about this a bit, I realized there is a *really* good
use case for this. I went even one step further and the plugin now
installs a 'start_commit' hook. Which means that if you have the plugin
installed, and set "auto_update_copyright=True" in your configuration,
every time you commit I'll scan for modified files, and then check to
make sure that their copyright headers are correct.

IOW, it will permanently keep your Copyright headers in sync with the
data that Bazaar has for the file. (For files which you modify.)

This is a neat enough feature that I'm turning bzr-update-copyright into
its own project.

 lp:bzr-update-copyright

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

iEYEARECAAYFAktHp4sACgkQJdeBCYSNAAPjGACfbPtdkKni5/WWazR1lrCULkvv
uo0AnR241IqtS4raGdY2NVOpxqG395bs
=Vegh
-----END PGP SIGNATURE-----



More information about the bazaar mailing list