From 8dfd8582e31a17c3adda9cba0f41545620289e5a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 20 Oct 2011 14:26:26 -0700 Subject: update_copyright: don't hardcode 1999 start year We want repoman to be applicable to as many repositories as possible. If necessary, we can add another layout.conf attribute that configures the copyright start years for all files. --- pym/repoman/utilities.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'pym') diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index a3fdf12e0..7f7d62acf 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -548,12 +548,13 @@ def update_copyright(fn_path, year, pretend): new_header.append(line) break - # these two regexes are taken from - # echangelog update_copyright() + # These two regexes are taken from echangelog + # update_copyright(), except that we don't hardcode + # 1999 here (in order to be more generic). line = re.sub(r'^(# Copyright \d+) ', r'\1-%s ' % year, line) - line = re.sub(r'^(# Copyright) \d\d\d\d-\d\d\d\d', - r'\1 1999-%s' % year, line) + line = re.sub(r'^(# Copyright \d\d\d\d)-\d\d\d\d', + r'\1-%s' % year, line) new_header.append(line) difflines = 0 -- cgit v1.2.3-1-g7c22