From 205c33315fb321daec60bfbef4a61adb7f10e6ab Mon Sep 17 00:00:00 2001 From: rsandifo Date: Thu, 15 Jan 2015 22:09:13 +0000 Subject: [PATCH] contrib/ * update-copyright.py (Copyright.__init__): Add a regexp for "copyright = u'". (Copyright.update_copyright): Don't add a space before the year in that case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219692 138bc75d-0d04-0410-961f-82ee72b054a4 --- contrib/ChangeLog | 7 +++++++ contrib/update-copyright.py | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index f062ea90738..b4ac7d99000 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,10 @@ +2015-01-15 Richard Sandiford + + * update-copyright.py (Copyright.__init__): Add a regexp for + "copyright = u'". + (Copyright.update_copyright): Don't add a space before the year + in that case. + 2015-01-15 Thomas Schwinge * gcc_update (files_and_dependencies): Update rules for new diff --git a/contrib/update-copyright.py b/contrib/update-copyright.py index 42d0bfbf2a3..f7b522a1355 100644 --- a/contrib/update-copyright.py +++ b/contrib/update-copyright.py @@ -183,6 +183,7 @@ class Copyright: '|[Cc]opyright\s+%s' '|[Cc]opyright\s+©' '|[Cc]opyright\s+@copyright{}' + '|copyright = u\'' '|@set\s+copyright[\w-]+)' # 2: the years. Include the whitespace in the year, so that @@ -363,7 +364,8 @@ class Copyright: return (False, orig_line, next_line) line = (line[:match.start (2)] - + ' ' + canon_form + self.separator + + ('' if intro.startswith ('copyright = ') else ' ') + + canon_form + self.separator + line[match.end (2):]) # Use the standard (C) form. -- 2.11.4.GIT