On 21-10-2011 06:09:57 +0000, Zac Medico wrote:
> UpdateChangeLog: split out/test copyright regex
> This also fixes a case where something like "Copyright 2011 " would be
> replaced with "Copyright 2011-2011 ".
I like this, but it should only happen when one would live in 1999
(that's why I added it unconditionally), see below. I'm affraid we need
the 1999 to be configured, for legal reasons (though I don't claim to be
an expert on this case, just judging from the comments from echangelog).
> + def testCopyrightUpdate(self):
> + test_cases = (
> + (
> + '2011',
> + '# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2',
> + '# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2',
we should add a case like
# Copyright 2010-2011 Gentoo Foundation; Distributed ...
echangelog would have rewritten it to 1999-2011, because of legal
> +def _update_copyright_year(year, line):
> + """
> + These two regexes are taken from echangelog
> + update_copyright(), except that we don't hardcode
> + 1999 here (in order to be more generic).
This comment makes little to no more sense, since the patterns taken
from echangelog have changed considerably now
Gentoo on a different level