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(): |