From 0265260484c0796c7678d7568f1aa8b863d166fa Mon Sep 17 00:00:00 2001 From: "rvargas@chromium.org" Date: Fri, 14 Mar 2014 19:43:20 +0000 Subject: [PATCH] Presubmit: fix accepted copyright dates. 2006-2009/10 was a valid copyright date format before 2011 (when we decided to use only one year, not a range). The current directive with copyright is in fact to not change old copyright dates, so there is no plan to go back and "fix" old files. As such, the presubmit checks should not be complaining about old files. BUG=none Review URL: https://codereview.chromium.org/200643002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@257181 0039d316-1c4b-4281-b951-d872f2087c98 --- presubmit_canned_checks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index bc8c3934d..d0376bd79 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -956,11 +956,11 @@ def PanProjectChecks(input_api, output_api, project_name = project_name or 'Chromium' # Accept any year number from 2006 to the current year, or the special - # 2006-2008 string used on the oldest files. 2006-2008 is deprecated, but - # tolerate it until it's removed from all files. + # 2006-20xx string used on the oldest files. 2006-20xx is deprecated, but + # tolerated on old files. current_year = int(input_api.time.strftime('%Y')) allowed_years = (str(s) for s in reversed(xrange(2006, current_year + 1))) - years_re = '(' + '|'.join(allowed_years) + '|2006-2008)' + years_re = '(' + '|'.join(allowed_years) + '|2006-2008|2006-2009|2006-2010)' # The (c) is deprecated, but tolerate it until it's removed from all files. license_header = license_header or (