Rev 9: Update the documentation for this plugin. in http://bazaar.launchpad.net/~bzr/bzr-update-copyright/trunk
John Arbash Meinel
john at arbash-meinel.com
Mon Jan 11 18:13:09 GMT 2010
At http://bazaar.launchpad.net/~bzr/bzr-update-copyright/trunk
------------------------------------------------------------
revno: 9
revision-id: john at arbash-meinel.com-20100111181245-jtr71baqd6bvjzjb
parent: john at arbash-meinel.com-20100108213639-ucpnweq2au3xwiah
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Mon 2010-01-11 12:12:45 -0600
message:
Update the documentation for this plugin.
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py 2010-01-08 21:19:07 +0000
+++ b/__init__.py 2010-01-11 18:12:45 +0000
@@ -20,6 +20,12 @@
This looks in the bzr metadata for a given file and determines what years the
file was actually modified. It then sets a copyright header as the first line
of the file.
+
+This plugin also provides a 'start_commit' hook, that will check to see what
+files are modified in your working directory, and ensure that all of them have
+an up-to-date Copyright header. You can enable this by setting
+"auto_update_copyright = True" in individual branches, or in bazaar.conf if you
+want it active everywhere.
"""
@@ -33,7 +39,17 @@
class cmd_update_copyright(commands.Command):
- """Update the Copyright header for files using the bzr metadata."""
+ """Update the Copyright header for files using the bzr metadata.
+
+ With no extra arguments, 'bzr update-copyright' will check all versioned
+ files and update a Copyright header that is found. With '--only-changed' it
+ will only update files which are already marked as modified.
+
+ You can also just supply a list of paths to be checked.
+
+ See also plugins/update_copyright for information on how to configure a
+ start_commit hook to auto-update all modified files.
+ """
takes_args = ['path*']
takes_options = [option.Option('only-changed',
@@ -71,6 +87,7 @@
conf = tree.branch.get_config()
auto_update = conf.get_user_option_as_bool('auto_update_copyright')
if auto_update is None or not auto_update:
+ trace.mutter('Auto-update set to %s' % (auto_update,))
return
import update_copyright
res = update_copyright.update_tree_copyright(tree, None, only_changed=True)
More information about the bazaar-commits
mailing list