Commit 8fced9b9 by Richard Sandiford Committed by Richard Sandiford

update-copyright.py (Copyright.__init__): Add a regexp for "copyright = u'".

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
parent 1d599906
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> 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
* gcc_update (files_and_dependencies): Update rules for new * gcc_update (files_and_dependencies): Update rules for new
......
...@@ -183,6 +183,7 @@ class Copyright: ...@@ -183,6 +183,7 @@ class Copyright:
'|[Cc]opyright\s+%s' '|[Cc]opyright\s+%s'
'|[Cc]opyright\s+&copy;' '|[Cc]opyright\s+&copy;'
'|[Cc]opyright\s+@copyright{}' '|[Cc]opyright\s+@copyright{}'
'|copyright = u\''
'|@set\s+copyright[\w-]+)' '|@set\s+copyright[\w-]+)'
# 2: the years. Include the whitespace in the year, so that # 2: the years. Include the whitespace in the year, so that
...@@ -363,7 +364,8 @@ class Copyright: ...@@ -363,7 +364,8 @@ class Copyright:
return (False, orig_line, next_line) return (False, orig_line, next_line)
line = (line[:match.start (2)] line = (line[:match.start (2)]
+ ' ' + canon_form + self.separator + ('' if intro.startswith ('copyright = ') else ' ')
+ canon_form + self.separator
+ line[match.end (2):]) + line[match.end (2):])
# Use the standard (C) form. # Use the standard (C) form.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment