[PATCH 1 of 3 STABLE V2] misc: update year in copyright lines
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Thu Feb 9 15:59:53 UTC 2017
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1486653227 -32400
# Fri Feb 10 00:13:47 2017 +0900
# Branch stable
# Node ID 8645ffc1a98ac26a773658fbd103ddb2d224184a
# 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
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 at 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
More information about the Mercurial-devel
mailing list