Bug: "hg version" copyright needs updated year and language

Martin Geisler mg at daimi.au.dk
Wed Feb 18 10:46:15 CST 2009


Ted Pavlic <ted at tedpavlic.com> writes:

> My "hg version" reports:
>
> =====
> Mercurial Distributed SCM (version b8d750daadde)
>
> Copyright (C) 2005-2008 Matt Mackall <mpm at selenic.com> and others
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> =====
>
> A couple of things...
>
> *) Creative work was done in 2009, and so the 2008 should be changed
> to 2009.

Good idea! I would actually like to see a general cleanup of all file
headers. Currently they contain outdated year ranges and a silly mix of
author names.

Putting names in the files is redundant and can imply some sort of
ownership over the file, when infact most files are edited by many
people, of which only some has a dedicated copyright notice.

I suggest we standardize all file headers to look like this:

----
# Copyright 200x-200y Matt Mackall <mpm at selenic.com> and others
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.

"""Short file description as a docstring."""
----

The x and y should be the first and last year in which the file was
updated. Emacs has a nice hook for this -- simply add

  (add-hook 'before-save-hook 'copyright-update)

to your ~/.emacs file and it will automatically prompt you as needed.


If people think this is a good idea, I would be happy to see if I can
make a script which will update the files.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20090218/401b5502/attachment.pgp 


More information about the Mercurial mailing list