Patchwork [1,of,4,STABLE,V3] misc: update year in copyright lines

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Feb. 10, 2017, 3:30 p.m.
Message ID <f4dcd9cdb900f46557c9.1486740603@speaknoevil>
Download mbox | patch
Permalink /patch/18397/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - Feb. 10, 2017, 3:30 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1486740233 -32400
#      Sat Feb 11 00:23:53 2017 +0900
# Branch stable
# Node ID f4dcd9cdb900f46557c9bd15abb73b0c5f03403b
# Parent  af3b5aa61fc05a124697809bf472a5592f38489c
misc: update year in copyright lines

This patch also does below:

  - add new check-code.py pattern to detect outdated copyright year
    according to the date at testing

  - make some expected output lines in tests glob-ed for persistence
Augie Fackler - Feb. 10, 2017, 9:03 p.m.
On Sat, Feb 11, 2017 at 12:30:03AM +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1486740233 -32400
> #      Sat Feb 11 00:23:53 2017 +0900
> # Branch stable
> # Node ID f4dcd9cdb900f46557c9bd15abb73b0c5f03403b
> # Parent  af3b5aa61fc05a124697809bf472a5592f38489c
> misc: update year in copyright lines
> 
> This patch also does below:
> 
>  - add new check-code.py pattern to detect outdated copyright year
>    according to the date at testing
> 
>  - make some expected output lines in tests glob-ed for persistence

I've queued the other patches in this series, but am dropping this
one, because it's only sort of
correct. https://news.ycombinator.com/item?id=8809853 for details
(DannyBee is an Actual Lawyer who also is an engineer), but the short
version is we don't actually /want/ to update copyright on files
unless they're updated.

As far as the copyright on the entire program (eg in the .iss file)
and in setup.py, that's probably the right thing to do, but I'm not
sure if we should have a test that goes red when the year changes
(which, keep in mind, varies a bit on timezone, so we'd have a 24 hour
period where the tests necessarily did not pass for everyone). I guess
let's do the html/iss/setup.py whole-app lines and ignore the test?

> 
> diff --git a/contrib/check-code.py b/contrib/check-code.py
> --- a/contrib/check-code.py
> +++ b/contrib/check-code.py
> @@ -20,6 +20,7 @@ when a rule triggers wrong, do one of th
> """
> 
> from __future__ import absolute_import, print_function
> +import datetime
> import glob
> import keyword
> import optparse
> @@ -448,10 +449,18 @@ webtemplatepats = [
> 
> allfilesfilters = []
> 
> +# to check outdated copyright year according to the date at testing
> +thisyear = int(datetime.date.today().strftime('%Y'))
> +
> allfilespats = [
>   [
>     (r'(http|https)://[a-zA-Z0-9./]*selenic.com/',
>      'use mercurial-scm.org domain URL'),
> +    (r'(?i)(?<!# )copyright.* 2005-(%s|%s).*Matt Mackall' %
> +     (thisyear - 1, thisyear - 2),
> +     # for safety, "thisyear - 2" is also checked (this can cover the
> +     # issue fixed in af3b5aa61fc0)
> +     'outdated copyright year'),
>   ],
>   # warnings
>   [],
> diff --git a/contrib/win32/ReadMe.html b/contrib/win32/ReadMe.html
> --- a/contrib/win32/ReadMe.html
> +++ b/contrib/win32/ReadMe.html
> @@ -140,7 +140,7 @@ editor = whatever
>     </p>
> 
>     <p>
> -      Mercurial is Copyright 2005-2016 Matt Mackall and others. See
> +      Mercurial is Copyright 2005-2017 Matt Mackall and others. See
>       the <tt>Contributors.txt</tt> file for a list of contributors.
>     </p>
> 
> diff --git a/contrib/win32/mercurial.iss b/contrib/win32/mercurial.iss
> --- a/contrib/win32/mercurial.iss
> +++ b/contrib/win32/mercurial.iss
> @@ -21,7 +21,7 @@
> #endif
> 
> [Setup]
> -AppCopyright=Copyright 2005-2016 Matt Mackall and others
> +AppCopyright=Copyright 2005-2017 Matt Mackall and others
> AppName=Mercurial
> AppVersion={#VERSION}
> #if ARCH == "x64"
> @@ -45,7 +45,7 @@ AppContact=mercurial@selenic.com
> DefaultDirName={pf}\Mercurial
> SourceDir=..\..
> VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
> -VersionInfoCopyright=Copyright 2005-2016 Matt Mackall and others
> +VersionInfoCopyright=Copyright 2005-2017 Matt Mackall and others
> VersionInfoCompany=Matt Mackall and others
> InternalCompressLevel=max
> SolidCompression=true
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -6576,7 +6576,7 @@ def version_(ui, **opts):
>              util.version())
>     license = _(
>         "(see https://mercurial-scm.org for more information)\n"
> -        "\nCopyright (C) 2005-2016 Matt Mackall and others\n"
> +        "\nCopyright (C) 2005-2017 Matt Mackall and others\n"
>         "This is free software; see the source for copying conditions. "
>         "There is NO\nwarranty; "
>         "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
> diff --git a/mercurial/help/hg-ssh.8.txt b/mercurial/help/hg-ssh.8.txt
> --- a/mercurial/help/hg-ssh.8.txt
> +++ b/mercurial/help/hg-ssh.8.txt
> @@ -64,7 +64,7 @@ Mailing list: https://www.mercurial-scm.
> 
> Copying
> """""""
> -Copyright (C) 2005-2016 Matt Mackall.
> +Copyright (C) 2005-2017 Matt Mackall.
> Free use of this software is granted under the terms of the GNU General
> Public License version 2 or any later version.
> 
> diff --git a/mercurial/help/hg.1.txt b/mercurial/help/hg.1.txt
> --- a/mercurial/help/hg.1.txt
> +++ b/mercurial/help/hg.1.txt
> @@ -112,7 +112,7 @@ Mailing list: https://www.mercurial-scm.
> 
> Copying
> """""""
> -Copyright (C) 2005-2016 Matt Mackall.
> +Copyright (C) 2005-2017 Matt Mackall.
> Free use of this software is granted under the terms of the GNU General
> Public License version 2 or any later version.
> 
> diff --git a/mercurial/help/hgignore.5.txt b/mercurial/help/hgignore.5.txt
> --- a/mercurial/help/hgignore.5.txt
> +++ b/mercurial/help/hgignore.5.txt
> @@ -26,7 +26,7 @@ See Also
> Copying
> =======
> This manual page is copyright 2006 Vadim Gelfer.
> -Mercurial is copyright 2005-2016 Matt Mackall.
> +Mercurial is copyright 2005-2017 Matt Mackall.
> Free use of this software is granted under the terms of the GNU General
> Public License version 2 or any later version.
> 
> diff --git a/mercurial/help/hgrc.5.txt b/mercurial/help/hgrc.5.txt
> --- a/mercurial/help/hgrc.5.txt
> +++ b/mercurial/help/hgrc.5.txt
> @@ -34,7 +34,7 @@ See Also
> Copying
> =======
> This manual page is copyright 2005 Bryan O'Sullivan.
> -Mercurial is copyright 2005-2016 Matt Mackall.
> +Mercurial is copyright 2005-2017 Matt Mackall.
> Free use of this software is granted under the terms of the GNU General
> Public License version 2 or any later version.
> 
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -664,7 +664,7 @@ extra = {}
> if py2exeloaded:
>     extra['console'] = [
>         {'script':'hg',
> -         'copyright':'Copyright (C) 2005-2016 Matt Mackall and others',
> +         'copyright':'Copyright (C) 2005-2017 Matt Mackall and others',
>          'product_version':version}]
>     # sub command of 'build' because 'py2exe' does not handle sub_commands
>     build.sub_commands.insert(0, ('build_hgextindex', None))
> diff --git a/tests/test-help.t b/tests/test-help.t
> --- a/tests/test-help.t
> +++ b/tests/test-help.t
> @@ -445,7 +445,7 @@ Test help option with version option
>   Mercurial Distributed SCM (version *) (glob)
>   (see https://mercurial-scm.org for more information)
> 
> -  Copyright (C) 2005-2016 Matt Mackall and others
> +  Copyright (C) 2005-* Matt Mackall and others (glob)
>   This is free software; see the source for copying conditions. There is NO
>   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
> --- a/tests/test-hgrc.t
> +++ b/tests/test-hgrc.t
> @@ -71,7 +71,7 @@ issue1829: wrong indentation
>   Mercurial Distributed SCM (version *) (glob)
>   (see https://mercurial-scm.org for more information)
> 
> -  Copyright (C) 2005-2016 Matt Mackall and others
> +  Copyright (C) 2005-* Matt Mackall and others (glob)
>   This is free software; see the source for copying conditions. There is NO
>   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>   $ unset FAKEPATH
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Katsunori FUJIWARA - Feb. 11, 2017, 11:26 a.m.
At Fri, 10 Feb 2017 16:03:53 -0500,
Augie Fackler wrote:
> 
> On Sat, Feb 11, 2017 at 12:30:03AM +0900, FUJIWARA Katsunori wrote:
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> > # Date 1486740233 -32400
> > #      Sat Feb 11 00:23:53 2017 +0900
> > # Branch stable
> > # Node ID f4dcd9cdb900f46557c9bd15abb73b0c5f03403b
> > # Parent  af3b5aa61fc05a124697809bf472a5592f38489c
> > misc: update year in copyright lines
> > 
> > This patch also does below:
> > 
> >  - add new check-code.py pattern to detect outdated copyright year
> >    according to the date at testing
> > 
> >  - make some expected output lines in tests glob-ed for persistence
> 
> I've queued the other patches in this series, but am dropping this
> one, because it's only sort of
> correct. https://news.ycombinator.com/item?id=8809853 for details
> (DannyBee is an Actual Lawyer who also is an engineer), but the short
> version is we don't actually /want/ to update copyright on files
> unless they're updated.
>
> As far as the copyright on the entire program (eg in the .iss file)
> and in setup.py, that's probably the right thing to do, but I'm not
> sure if we should have a test that goes red when the year changes
> (which, keep in mind, varies a bit on timezone, so we'd have a 24 hour
> period where the tests necessarily did not pass for everyone). I guess
> let's do the html/iss/setup.py whole-app lines and ignore the test?

OK, I'll send revised patch without testing.

> 
> > diff --git a/contrib/check-code.py b/contrib/check-code.py
> > --- a/contrib/check-code.py
> > +++ b/contrib/check-code.py
> > @@ -20,6 +20,7 @@ when a rule triggers wrong, do one of th
> > """
> > 
> > from __future__ import absolute_import, print_function
> > +import datetime
> > import glob
> > import keyword
> > import optparse
> > @@ -448,10 +449,18 @@ webtemplatepats = [
> > 
> > allfilesfilters = []
> > 
> > +# to check outdated copyright year according to the date at testing
> > +thisyear = int(datetime.date.today().strftime('%Y'))
> > +
> > allfilespats = [
> >   [
> >     (r'(http|https)://[a-zA-Z0-9./]*selenic.com/',
> >      'use mercurial-scm.org domain URL'),
> > +    (r'(?i)(?<!# )copyright.* 2005-(%s|%s).*Matt Mackall' %
> > +     (thisyear - 1, thisyear - 2),
> > +     # for safety, "thisyear - 2" is also checked (this can cover the
> > +     # issue fixed in af3b5aa61fc0)
> > +     'outdated copyright year'),
> >   ],
> >   # warnings
> >   [],
> > diff --git a/contrib/win32/ReadMe.html b/contrib/win32/ReadMe.html
> > --- a/contrib/win32/ReadMe.html
> > +++ b/contrib/win32/ReadMe.html
> > @@ -140,7 +140,7 @@ editor = whatever
> >     </p>
> > 
> >     <p>
> > -      Mercurial is Copyright 2005-2016 Matt Mackall and others. See
> > +      Mercurial is Copyright 2005-2017 Matt Mackall and others. See
> >       the <tt>Contributors.txt</tt> file for a list of contributors.
> >     </p>
> > 
> > diff --git a/contrib/win32/mercurial.iss b/contrib/win32/mercurial.iss
> > --- a/contrib/win32/mercurial.iss
> > +++ b/contrib/win32/mercurial.iss
> > @@ -21,7 +21,7 @@
> > #endif
> > 
> > [Setup]
> > -AppCopyright=Copyright 2005-2016 Matt Mackall and others
> > +AppCopyright=Copyright 2005-2017 Matt Mackall and others
> > AppName=Mercurial
> > AppVersion={#VERSION}
> > #if ARCH == "x64"
> > @@ -45,7 +45,7 @@ AppContact=mercurial@selenic.com
> > DefaultDirName={pf}\Mercurial
> > SourceDir=..\..
> > VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
> > -VersionInfoCopyright=Copyright 2005-2016 Matt Mackall and others
> > +VersionInfoCopyright=Copyright 2005-2017 Matt Mackall and others
> > VersionInfoCompany=Matt Mackall and others
> > InternalCompressLevel=max
> > SolidCompression=true
> > diff --git a/mercurial/commands.py b/mercurial/commands.py
> > --- a/mercurial/commands.py
> > +++ b/mercurial/commands.py
> > @@ -6576,7 +6576,7 @@ def version_(ui, **opts):
> >              util.version())
> >     license = _(
> >         "(see https://mercurial-scm.org for more information)\n"
> > -        "\nCopyright (C) 2005-2016 Matt Mackall and others\n"
> > +        "\nCopyright (C) 2005-2017 Matt Mackall and others\n"
> >         "This is free software; see the source for copying conditions. "
> >         "There is NO\nwarranty; "
> >         "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
> > diff --git a/mercurial/help/hg-ssh.8.txt b/mercurial/help/hg-ssh.8.txt
> > --- a/mercurial/help/hg-ssh.8.txt
> > +++ b/mercurial/help/hg-ssh.8.txt
> > @@ -64,7 +64,7 @@ Mailing list: https://www.mercurial-scm.
> > 
> > Copying
> > """""""
> > -Copyright (C) 2005-2016 Matt Mackall.
> > +Copyright (C) 2005-2017 Matt Mackall.
> > Free use of this software is granted under the terms of the GNU General
> > Public License version 2 or any later version.
> > 
> > diff --git a/mercurial/help/hg.1.txt b/mercurial/help/hg.1.txt
> > --- a/mercurial/help/hg.1.txt
> > +++ b/mercurial/help/hg.1.txt
> > @@ -112,7 +112,7 @@ Mailing list: https://www.mercurial-scm.
> > 
> > Copying
> > """""""
> > -Copyright (C) 2005-2016 Matt Mackall.
> > +Copyright (C) 2005-2017 Matt Mackall.
> > Free use of this software is granted under the terms of the GNU General
> > Public License version 2 or any later version.
> > 
> > diff --git a/mercurial/help/hgignore.5.txt b/mercurial/help/hgignore.5.txt
> > --- a/mercurial/help/hgignore.5.txt
> > +++ b/mercurial/help/hgignore.5.txt
> > @@ -26,7 +26,7 @@ See Also
> > Copying
> > =======
> > This manual page is copyright 2006 Vadim Gelfer.
> > -Mercurial is copyright 2005-2016 Matt Mackall.
> > +Mercurial is copyright 2005-2017 Matt Mackall.
> > Free use of this software is granted under the terms of the GNU General
> > Public License version 2 or any later version.
> > 
> > diff --git a/mercurial/help/hgrc.5.txt b/mercurial/help/hgrc.5.txt
> > --- a/mercurial/help/hgrc.5.txt
> > +++ b/mercurial/help/hgrc.5.txt
> > @@ -34,7 +34,7 @@ See Also
> > Copying
> > =======
> > This manual page is copyright 2005 Bryan O'Sullivan.
> > -Mercurial is copyright 2005-2016 Matt Mackall.
> > +Mercurial is copyright 2005-2017 Matt Mackall.
> > Free use of this software is granted under the terms of the GNU General
> > Public License version 2 or any later version.
> > 
> > diff --git a/setup.py b/setup.py
> > --- a/setup.py
> > +++ b/setup.py
> > @@ -664,7 +664,7 @@ extra = {}
> > if py2exeloaded:
> >     extra['console'] = [
> >         {'script':'hg',
> > -         'copyright':'Copyright (C) 2005-2016 Matt Mackall and others',
> > +         'copyright':'Copyright (C) 2005-2017 Matt Mackall and others',
> >          'product_version':version}]
> >     # sub command of 'build' because 'py2exe' does not handle sub_commands
> >     build.sub_commands.insert(0, ('build_hgextindex', None))
> > diff --git a/tests/test-help.t b/tests/test-help.t
> > --- a/tests/test-help.t
> > +++ b/tests/test-help.t
> > @@ -445,7 +445,7 @@ Test help option with version option
> >   Mercurial Distributed SCM (version *) (glob)
> >   (see https://mercurial-scm.org for more information)
> > 
> > -  Copyright (C) 2005-2016 Matt Mackall and others
> > +  Copyright (C) 2005-* Matt Mackall and others (glob)
> >   This is free software; see the source for copying conditions. There is NO
> >   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > 
> > diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
> > --- a/tests/test-hgrc.t
> > +++ b/tests/test-hgrc.t
> > @@ -71,7 +71,7 @@ issue1829: wrong indentation
> >   Mercurial Distributed SCM (version *) (glob)
> >   (see https://mercurial-scm.org for more information)
> > 
> > -  Copyright (C) 2005-2016 Matt Mackall and others
> > +  Copyright (C) 2005-* Matt Mackall and others (glob)
> >   This is free software; see the source for copying conditions. There is NO
> >   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> >   $ unset FAKEPATH
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -20,6 +20,7 @@  when a rule triggers wrong, do one of th
 """
 
 from __future__ import absolute_import, print_function
+import datetime
 import glob
 import keyword
 import optparse
@@ -448,10 +449,18 @@  webtemplatepats = [
 
 allfilesfilters = []
 
+# to check outdated copyright year according to the date at testing
+thisyear = int(datetime.date.today().strftime('%Y'))
+
 allfilespats = [
   [
     (r'(http|https)://[a-zA-Z0-9./]*selenic.com/',
      'use mercurial-scm.org domain URL'),
+    (r'(?i)(?<!# )copyright.* 2005-(%s|%s).*Matt Mackall' %
+     (thisyear - 1, thisyear - 2),
+     # for safety, "thisyear - 2" is also checked (this can cover the
+     # issue fixed in af3b5aa61fc0)
+     'outdated copyright year'),
   ],
   # warnings
   [],
diff --git a/contrib/win32/ReadMe.html b/contrib/win32/ReadMe.html
--- a/contrib/win32/ReadMe.html
+++ b/contrib/win32/ReadMe.html
@@ -140,7 +140,7 @@  editor = whatever
     </p>
 
     <p>
-      Mercurial is Copyright 2005-2016 Matt Mackall and others. See
+      Mercurial is Copyright 2005-2017 Matt Mackall and others. See
       the <tt>Contributors.txt</tt> file for a list of contributors.
     </p>
 
diff --git a/contrib/win32/mercurial.iss b/contrib/win32/mercurial.iss
--- a/contrib/win32/mercurial.iss
+++ b/contrib/win32/mercurial.iss
@@ -21,7 +21,7 @@ 
 #endif
 
 [Setup]
-AppCopyright=Copyright 2005-2016 Matt Mackall and others
+AppCopyright=Copyright 2005-2017 Matt Mackall and others
 AppName=Mercurial
 AppVersion={#VERSION}
 #if ARCH == "x64"
@@ -45,7 +45,7 @@  AppContact=mercurial@selenic.com
 DefaultDirName={pf}\Mercurial
 SourceDir=..\..
 VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
-VersionInfoCopyright=Copyright 2005-2016 Matt Mackall and others
+VersionInfoCopyright=Copyright 2005-2017 Matt Mackall and others
 VersionInfoCompany=Matt Mackall and others
 InternalCompressLevel=max
 SolidCompression=true
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -6576,7 +6576,7 @@  def version_(ui, **opts):
              util.version())
     license = _(
         "(see https://mercurial-scm.org for more information)\n"
-        "\nCopyright (C) 2005-2016 Matt Mackall and others\n"
+        "\nCopyright (C) 2005-2017 Matt Mackall and others\n"
         "This is free software; see the source for copying conditions. "
         "There is NO\nwarranty; "
         "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
diff --git a/mercurial/help/hg-ssh.8.txt b/mercurial/help/hg-ssh.8.txt
--- a/mercurial/help/hg-ssh.8.txt
+++ b/mercurial/help/hg-ssh.8.txt
@@ -64,7 +64,7 @@  Mailing list: https://www.mercurial-scm.
 
 Copying
 """""""
-Copyright (C) 2005-2016 Matt Mackall.
+Copyright (C) 2005-2017 Matt Mackall.
 Free use of this software is granted under the terms of the GNU General
 Public License version 2 or any later version.
 
diff --git a/mercurial/help/hg.1.txt b/mercurial/help/hg.1.txt
--- a/mercurial/help/hg.1.txt
+++ b/mercurial/help/hg.1.txt
@@ -112,7 +112,7 @@  Mailing list: https://www.mercurial-scm.
 
 Copying
 """""""
-Copyright (C) 2005-2016 Matt Mackall.
+Copyright (C) 2005-2017 Matt Mackall.
 Free use of this software is granted under the terms of the GNU General
 Public License version 2 or any later version.
 
diff --git a/mercurial/help/hgignore.5.txt b/mercurial/help/hgignore.5.txt
--- a/mercurial/help/hgignore.5.txt
+++ b/mercurial/help/hgignore.5.txt
@@ -26,7 +26,7 @@  See Also
 Copying
 =======
 This manual page is copyright 2006 Vadim Gelfer.
-Mercurial is copyright 2005-2016 Matt Mackall.
+Mercurial is copyright 2005-2017 Matt Mackall.
 Free use of this software is granted under the terms of the GNU General
 Public License version 2 or any later version.
 
diff --git a/mercurial/help/hgrc.5.txt b/mercurial/help/hgrc.5.txt
--- a/mercurial/help/hgrc.5.txt
+++ b/mercurial/help/hgrc.5.txt
@@ -34,7 +34,7 @@  See Also
 Copying
 =======
 This manual page is copyright 2005 Bryan O'Sullivan.
-Mercurial is copyright 2005-2016 Matt Mackall.
+Mercurial is copyright 2005-2017 Matt Mackall.
 Free use of this software is granted under the terms of the GNU General
 Public License version 2 or any later version.
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -664,7 +664,7 @@  extra = {}
 if py2exeloaded:
     extra['console'] = [
         {'script':'hg',
-         'copyright':'Copyright (C) 2005-2016 Matt Mackall and others',
+         'copyright':'Copyright (C) 2005-2017 Matt Mackall and others',
          'product_version':version}]
     # sub command of 'build' because 'py2exe' does not handle sub_commands
     build.sub_commands.insert(0, ('build_hgextindex', None))
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -445,7 +445,7 @@  Test help option with version option
   Mercurial Distributed SCM (version *) (glob)
   (see https://mercurial-scm.org for more information)
   
-  Copyright (C) 2005-2016 Matt Mackall and others
+  Copyright (C) 2005-* Matt Mackall and others (glob)
   This is free software; see the source for copying conditions. There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -71,7 +71,7 @@  issue1829: wrong indentation
   Mercurial Distributed SCM (version *) (glob)
   (see https://mercurial-scm.org for more information)
   
-  Copyright (C) 2005-2016 Matt Mackall and others
+  Copyright (C) 2005-* Matt Mackall and others (glob)
   This is free software; see the source for copying conditions. There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   $ unset FAKEPATH