Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Unified Diff: projects.py

Issue 6880115: Add post_processing code to update copyright year automatically. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « post_process/mangle.py ('k') | tests/mangle_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: projects.py
diff --git a/projects.py b/projects.py
index 69e0b1b03a930180cd961165f5e888b1b528f5b8..a80a8f0b65f4dd778da499c4ffdb78c8331c72b3 100644
--- a/projects.py
+++ b/projects.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
"""Define the supported projects."""
+import datetime
import os
import re
import sys
@@ -14,6 +15,7 @@ import committer_list
import creds
import errors
import pending_manager
+from post_process import mangle
from verification import presubmit_check
from verification import project_base
from verification import reviewer_lgtm
@@ -41,6 +43,14 @@ CHROMITES = r'^[\w\-\+\%\.]+\@chromium\.org$'
GOOGLERS_OR_CHROMITES = r'^[\w\-\+\%\.]+\@(google\.com|chromium\.org)$'
+# Will mangle the copyright line.
+COPYRIGHT_MANGLER = mangle.CopyrightMangle(
+ r'^(.*)Copyright \(c\) \d\d\d\d The Chromium Authors. '
+ r'All rights reserved.$',
+ r'\1Copyright (c) %s The Chromium Authors. All rights reserved.' %
+ datetime.date.today().year)
Dirk Pranke 2011/04/21 20:26:13 I think it's a little weird to (a) use a CONSTANT
+
+
def _get_escaped_committers(root_dir):
filepath = os.path.join(root_dir, '.committers_pwd')
try:
@@ -106,11 +116,14 @@ def _gen_chromium(user, root_dir, rietveld_obj, git_svn, no_try):
verifiers.append(tree_status.TreeStatusVerifier(
'http://chromium-status.appspot.com/status'))
+
+ post_processors = [COPYRIGHT_MANGLER.process]
return pending_manager.PendingManager(
rietveld_obj,
local_checkout,
verifiers_no_patch,
- verifiers)
+ verifiers,
+ post_processors)
def _gen_nacl(user, root_dir, rietveld_obj, git_svn, no_try):
@@ -184,7 +197,8 @@ def _gen_nacl(user, root_dir, rietveld_obj, git_svn, no_try):
rietveld_obj,
local_checkout,
verifiers_no_patch,
- verifiers)
+ verifiers,
+ [])
def _gen_build(user, root_dir, rietveld_obj, git_svn, no_try):
@@ -249,11 +263,13 @@ def _internal_simple(path, user, root_dir, rietveld_obj, git_svn, no_try):
presubmit_check.PresubmitCheckVerifier(),
]
+ post_processors = [COPYRIGHT_MANGLER.process]
return pending_manager.PendingManager(
rietveld_obj,
local_checkout,
verifiers_no_patch,
- verifiers)
+ verifiers,
+ post_processors)
def supported_projects():
« no previous file with comments | « post_process/mangle.py ('k') | tests/mangle_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698