Browse Source

Copyright header updates s/2013/2014 on files whose last git commit was done in 2014.

contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
pull/145/head
gubatron 10 years ago
parent
commit
57702541a2
  1. 11
      contrib/devtools/README.md
  2. 53
      contrib/devtools/fix-copyright-headers.py
  3. 2
      src/alert.cpp
  4. 2
      src/chainparams.cpp
  5. 2
      src/core.cpp
  6. 2
      src/db.cpp
  7. 2
      src/init.cpp
  8. 2
      src/leveldbwrapper.cpp
  9. 2
      src/main.cpp
  10. 2
      src/main.h
  11. 2
      src/miner.cpp
  12. 2
      src/net.cpp
  13. 2
      src/net.h
  14. 2
      src/netbase.cpp
  15. 2
      src/noui.cpp
  16. 2
      src/protocol.cpp
  17. 2
      src/qt/bitcoin.cpp
  18. 2
      src/qt/bitcoinamountfield.cpp
  19. 2
      src/qt/bitcoingui.cpp
  20. 2
      src/qt/bitcoingui.h
  21. 2
      src/qt/guiconstants.h
  22. 2
      src/qt/intro.cpp
  23. 2
      src/qt/optionsmodel.cpp
  24. 2
      src/qt/paymentserver.h
  25. 2
      src/qt/receivecoinsdialog.cpp
  26. 2
      src/qt/receivecoinsdialog.h
  27. 2
      src/qt/recentrequeststablemodel.cpp
  28. 2
      src/qt/recentrequeststablemodel.h
  29. 2
      src/qt/rpcconsole.cpp
  30. 2
      src/qt/rpcconsole.h
  31. 2
      src/qt/sendcoinsdialog.cpp
  32. 2
      src/qt/splashscreen.cpp
  33. 2
      src/qt/splashscreen.h
  34. 2
      src/qt/transactiondesc.cpp
  35. 2
      src/qt/transactionrecord.cpp
  36. 2
      src/qt/transactiontablemodel.cpp
  37. 2
      src/qt/walletmodel.cpp
  38. 2
      src/qt/walletmodel.h
  39. 2
      src/rpcdump.cpp
  40. 2
      src/rpcmisc.cpp
  41. 2
      src/rpcnet.cpp
  42. 2
      src/rpcprotocol.cpp
  43. 2
      src/rpcprotocol.h
  44. 2
      src/rpcrawtransaction.cpp
  45. 2
      src/rpcserver.cpp
  46. 2
      src/rpcserver.h
  47. 2
      src/rpcwallet.cpp
  48. 2
      src/txdb.cpp
  49. 2
      src/util.cpp
  50. 2
      src/util.h
  51. 2
      src/wallet.cpp
  52. 2
      src/walletdb.cpp

11
contrib/devtools/README.md

@ -36,3 +36,14 @@ Configuring the github-merge tool for the bitcoin repository is done in the foll
git config githubmerge.testcmd "make -j4 check" (adapt to whatever you want to use for testing)
git config --global user.signingkey mykeyid (if you want to GPG sign)
## fix-copyright-headers.py
Every year newly updated files need to have its copyright headers updated to reflect the current year.
If you run this script from src/ it will automatically update the year on the copyright header for all
.cpp and .h files if these have a git commit from the current year.
For example a file changed in 2014 (with 2014 being the current year):
```// Copyright (c) 2009-2013 The Bitcoin developers```
would be changed to:
```// Copyright (c) 2009-2014 The Bitcoin developers```

53
contrib/devtools/fix-copyright-headers.py

@ -0,0 +1,53 @@
#!/usr/bin/env python
'''
Run this script inside of src/ and it will look for all the files
that were changed this year that still have the last year in the
copyright headers, and it will fix the headers on that file using
a perl regex one liner.
For example: if it finds something like this and we're in 2014
// Copyright (c) 2009-2013 The Bitcoin developers
it will change it to
// Copyright (c) 2009-2014 The Bitcoin developers
It will do this for all the files in the folder and its children.
Author: @gubatron
'''
import os
import time
year = time.gmtime()[0]
last_year = year - 1
command = "perl -pi -e 's/%s The Bitcoin/%s The Bitcoin/' %s"
listFilesCommand = "find . | grep %s"
extensions = [".cpp",".h"]
def getLastGitModifiedDate(filePath):
gitGetLastCommitDateCommand = "git log " + filePath +" | grep Date | head -n 1"
p = os.popen(gitGetLastCommitDateCommand)
result = ""
for l in p:
result = l
break
result = result.replace("\n","")
return result
n=1
for extension in extensions:
foundFiles = os.popen(listFilesCommand % extension)
for filePath in foundFiles:
filePath = filePath[1:-1]
if filePath.endswith(extension):
filePath = os.getcwd() + filePath
modifiedTime = getLastGitModifiedDate(filePath)
if len(modifiedTime) > 0 and str(year) in modifiedTime:
print n,"Last Git Modified: ", modifiedTime, " - ", filePath
os.popen(command % (last_year,year,filePath))
n = n + 1

2
src/alert.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/chainparams.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/core.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/db.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/init.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/leveldbwrapper.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2012-2013 The Bitcoin developers
// Copyright (c) 2012-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/main.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/main.h

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/miner.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/net.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/net.h

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/netbase.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/noui.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/protocol.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/bitcoin.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/bitcoinamountfield.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/bitcoingui.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/bitcoingui.h

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/guiconstants.h

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/intro.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/optionsmodel.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/paymentserver.h

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/receivecoinsdialog.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/receivecoinsdialog.h

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/recentrequeststablemodel.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/recentrequeststablemodel.h

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/rpcconsole.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/rpcconsole.h

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/sendcoinsdialog.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/splashscreen.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/splashscreen.h

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/transactiondesc.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/transactionrecord.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/transactiontablemodel.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/walletmodel.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/qt/walletmodel.h

@ -1,4 +1,4 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/rpcdump.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/rpcmisc.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/rpcnet.cpp

@ -1,4 +1,4 @@
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/rpcprotocol.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/rpcprotocol.h

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/rpcrawtransaction.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/rpcserver.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/rpcserver.h

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/rpcwallet.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/txdb.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/util.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/util.h

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/wallet.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

2
src/walletdb.cpp

@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Loading…
Cancel
Save