update-copyright.py (Copyright.__init__): Add a regexp for "copyright = u'".
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 15 Jan 2015 22:09:13 +0000 (22:09 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 15 Jan 2015 22:09:13 +0000 (22:09 +0000)
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.

From-SVN: r219692

contrib/ChangeLog
contrib/update-copyright.py

index f062ea9073801fc1c1e54bb64816d034cd0e004e..b4ac7d990006405a4a5ca8f34bd804aa2a7eb679 100644 (file)
@@ -1,3 +1,10 @@
+2015-01-15  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * 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  <thomas@codesourcery.com>
 
        * gcc_update (files_and_dependencies): Update rules for new
index 42d0bfbf2a3ec88c2439d085c7c34ac3f015087c..f7b522a135501513ffd1e8f10eba496866a3212e 100644 (file)
@@ -183,6 +183,7 @@ class Copyright:
             '|[Cc]opyright\s+%s'
             '|[Cc]opyright\s+&copy;'
             '|[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.