Merge ~cjwatson/launchpad:fix-update-copyright into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: b36b4493cdb812302493ac71772ac0b080f34539
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:fix-update-copyright
Merge into: launchpad:master
Diff against target: 21 lines (+2/-2)
1 file modified
utilities/update-copyright (+2/-2)
Reviewer Review Type Date Requested Status
Ioana Lasc (community) Approve
Review via email: mp+417753@code.launchpad.net

Commit message

update-copyright: Fix handling of find-changed-files output

Description of the change

Since 2809101db8 ("Improve quoting in shell scripts"), `find-changed-files.sh` prints changed file names separated by newlines rather than spaces. That confuses `update-copyright`, which tries to split the output on spaces. We could revert that and pacify `shellcheck` in some other way, but newline-separation is really a bit more sensible for file names anyway, so let's just adapt `update-copyright` instead.

To post a comment you must log in.
Revision history for this message
Ioana Lasc (ilasc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/utilities/update-copyright b/utilities/update-copyright
2index 7af85ef..2910c7e 100755
3--- a/utilities/update-copyright
4+++ b/utilities/update-copyright
5@@ -1,6 +1,6 @@
6 #!/usr/bin/python3
7 #
8-# Copyright 2010-2020 Canonical Ltd. This software is licensed under the
9+# Copyright 2010-2022 Canonical Ltd. This software is licensed under the
10 # GNU Affero General Public License version 3 (see the file LICENSE).
11
12 """Update the year in copyright notices.
13@@ -80,7 +80,7 @@ def find_and_update():
14 """Put it all together."""
15 filenames = find_changed_files()
16 if filenames != '':
17- update_files(filenames.split(' '))
18+ update_files(filenames.splitlines())
19
20 if __name__ == "__main__":
21 if len(sys.argv) < 2:

Subscribers

People subscribed via source and target branches

to status/vote changes: