Page MenuHomePhabricator

Make copyright script update to current year instead of last commit year
AbandonedPublic

Authored by nakihito on Feb 7 2020, 01:49.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Summary

Currently, copyright_headers.py uses the files' most recent git commit
year when updating or inserting a the copyright header. This is rather
silly as if you run the script again immediately after committing
copyright updates then then the script will update the copyright again
to the current year (where valid).

This change simply changes the script to update copyright to the current
year.

Test Plan

Note: Doesn't have to be src/seeder/test/, but makes testing easier as there is only one relevant file.

contrib/devtools/copyright_header.py src/seeder/test/

Should update from: // Copyright (c) 2019 The Bitcoin developers
To: // Copyright (c) 2019-2020 The Bitcoin developers
Repeat and it should make no change outputting Copyright up-to-date.

Repeat with directory with a python file.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
FixCopyrightScript-2
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 9313
Build 16562: Default Diff Build & Tests
Build 16561: arc lint + arc unit

Event Timeline

nakihito created this revision.Feb 7 2020, 01:49
Owners added a reviewer: Restricted Owners Package.Feb 7 2020, 01:49
Herald added a reviewer: Restricted Project. · View Herald TranscriptFeb 7 2020, 01:49
deadalnix requested changes to this revision.Feb 7 2020, 17:58
deadalnix added a subscriber: deadalnix.

If the files are not touched, it doesn't make sense to update the copyright.

This revision now requires changes to proceed.Feb 7 2020, 17:58
nakihito abandoned this revision.Apr 27 2020, 22:56