launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28259
[Merge] ~cjwatson/launchpad:fix-update-copyright into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:fix-update-copyright into launchpad:master.
Commit message:
update-copyright: Fix handling of find-changed-files output
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/417753
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.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:fix-update-copyright into launchpad:master.
diff --git a/utilities/update-copyright b/utilities/update-copyright
index 7af85ef..2910c7e 100755
--- a/utilities/update-copyright
+++ b/utilities/update-copyright
@@ -1,6 +1,6 @@
#!/usr/bin/python3
#
-# Copyright 2010-2020 Canonical Ltd. This software is licensed under the
+# Copyright 2010-2022 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Update the year in copyright notices.
@@ -80,7 +80,7 @@ def find_and_update():
"""Put it all together."""
filenames = find_changed_files()
if filenames != '':
- update_files(filenames.split(' '))
+ update_files(filenames.splitlines())
if __name__ == "__main__":
if len(sys.argv) < 2: