Updating license and copyright in file headers

Florian Moesch florian.moesch at draeger.com
Wed Apr 15 10:33:18 CDT 2009


> Hi everybody
Hi Martin, hi everybody else!
> I would like to update the copyright and license information in the file
> headers to be more consistent and correct:
> * Some files list only 'Matt Mackall' as the author, despite being
>   edited by many others.
As long as Matt was the original author, the information is correct.
To be more precise, one could list the co-authors in addition to the copyright
holder which is Matt as long as he startet the work on a file. If an author
wants to be mentioned as co-author, he or she should add his name to the list of
co-authors on his own.

> * The years mentioned in the copyright lines are often outdated or wrong
>   compared to the information we have on file via 'hg log'.
If an author created a file a few years ago, he "created" the copyright in that
year. (BTW: even in the US, the copyright does not necessarily need to be
explicitely claimed anymore for some years now.) If someone choses to modify,
change, enhance, do anything else with te file, the copyright still stays with
the original author. (At least here in germany, that right cannot even be
transferred at all.) It might thus be correct that the last change date and the
copyright date differ.

> * Some files put the copyright and license information into a docstring,
>   others put it into a comment block.
That could be unified to avoid confusion.

> * Most files say "GPL" when "GPLv2" is meant.
I'm not sure if that is true for all files. It is well possible that some
authors ment exactly what they wrote. If they wanted to express that their
particular contribution shall be licensed using "GPL version 2 or later" or
even "any version of the GPL", we have to accept their decision.

> Instead of listing individual authors in the files I suggest that we
> either put something like
>   #  Copyright 2005-2009 Matt Mackall <mpm <at> selenic.com>
> or maybe
>   #  Copyright 2005-2009 Mercurial Developers [...]
> into each file. Then there will be one year to update when the file is
> saved the first time in a new year. As it is right now I haven't updated
> any of the years when editing files since it feels strange to update a
> line like this from archival.py:
>   #  Copyright 2006 Vadim Gelfer <vadim.gelfer <at> gmail.com>
> where Vadim hasn't made any commits since 2006.
I'd say that this would not only feel strange to me but probably be illegal at
least in some countries: as I mentioned before, the copyright (we call the
equivalent right "Urheberrecht" in Germany) is a non transferrable right in
some countries (like here in Germnay). If I wrote a source file, I'd
automatically own the copyright for it here in germany. Even if someone else
changed bigger parts of the file, I could not transfer - not even donate -
the copyright to him here.

> The GPL says that one must put in "appropriate copyright notices" and
> license the modified work under the GPL as well, so I think we can
> safely change a line like the above to
>   #  Copyright 2006-2009 Mercurial Developers [...]
> without having to contact people. If anybody knows more this I would of
> course be happy to hear it?
As I mentioned: a copyright is a non transferable, personal right in some
countries and I think it is a really bad idea to remove a copyright notice
that mentiones a particular author. I have no idea why that would make sense
anyway. In particular, I think it would be completely wrong to insert another
person in place of the original author in the files copyright notice. 

> The GPL is also only concerned with the distribution of programs, not
> the use, so I suggest we simplify the header from:
>   # This software may be used and distributed according to the terms of
>   # the GNU General Public License, incorporated herein by reference.
> to
>   # This software may be distributed according to the terms of the GNU
>   # General Public License version 2, incorporated herein by reference.
> where I removed 'used and ' and put in ' version 2'.
I would suggest to use - if you'd choose to change the files at all - the
header that was originally formulated by the authors of the GPL to avoid any
confusion:
-----
[one line to give the program's name and an idea of what it does.]
Copyright (C) [yyyy]  [name of author]

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-----
For those files that have been explicitely tied to version 2 (and no other
version) of the GPL, the part "either version 2 of the License, or (at your
option) any later version" would need to be changed accordingly, of course.
That header expresses well annd unambiguously what the authors of the license
ment when they wrote the original license text.
As you might have seen, the authors of the GPL explicitly placed a line stating
the name of a person as copyright holder in their template.

> I have made a small script which can update the files automatically, it
> puts in the new license text and uses 'hg log -f file' to figure out
> when each file was edited. It can also switch the headers to use a
> comment block or a docstring depending on what we want.
Personally, I don't like the idea to automatically change copyright information
by a script.

> But I would like to hear from Matt and others if they even think it's a
> good idea to do this?
Well, no... I don't think it's a good idea to touch the copyright information
at all. I don't see any necessity for a change of the file headers. For
unification it might be a nice idea to have a file header template somewhere
on the wiki eg. (maybe there is one? I didn't check) but why should one limit
a file to version 2 only if the original author explicitely or implicitely
left the decision to use any later version of the GPL to the user of the
software?

All in all I must say that I am somewhat impressed that the same discussion
appears again and again every few weeks in every single open-source software
project I have ever been in touch with. In this case, Matts statement in the
Wiki written a few months ago was absolutely clear: "Mercurial as a whole is
licensed under GPL version 2 only." and on the other hand "You are free to
copy files marked 'GPL version 2 or later' on their own for use with GPLv3
software."
So, why should we change anything at all?

Kind regards,
  Florian



More information about the Mercurial-devel mailing list