[committed] Update copyright years, part 2

Jakub Jelinek jakub@redhat.com
Tue Jan 13 17:22:00 GMT 2015


On Tue, Jan 13, 2015 at 05:06:35PM +0000, Richard Sandiford wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
> > Patch too large to attach uncompressed, this
> > has been created with update-copyright.py --this-year.
> > Note, I had to temporarily move away gcc/jit/docs/conf.py,
> > the python script dies on that and leaves almost all files unchanged.
> 
> Thanks for doing the update.  Is the patch below OK to fix the JIT thing?
> After this change, update-copyright.py --this-year seems to update
> gcc/jit correctly (including the texinfo files).
> 
> Richard
> 
> 
> 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.

Ok, thanks.

> --- contrib/update-copyright.py	2014-08-05 10:29:02.695491816 +0100
> +++ contrib/update-copyright.py	2015-01-13 14:13:43.500812967 +0000
> @@ -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.

	Jakub



More information about the Gcc-patches mailing list