From 734691fa18739cba7df0520915e61b49aba0641d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 13 Jun 2019 02:30:51 -0400 Subject: [PATCH] set default file encoding to utf-8 There's no reason to support any other encoding in these files. This only affects the files themselves and not streams they open. Bug: https://crbug.com/gerrit/10418 Change-Id: I053cb40cd3666ce5c8a0689b9dd938f24ca765bf --- color.py | 1 + command.py | 1 + editor.py | 1 + error.py | 1 + event_log.py | 1 + git_command.py | 1 + git_config.py | 1 + git_refs.py | 1 + gitc_utils.py | 1 + main.py | 1 + manifest_xml.py | 1 + pager.py | 1 + platform_utils.py | 1 + platform_utils_win32.py | 1 + progress.py | 1 + project.py | 2 ++ pyversion.py | 1 + repo | 1 + subcmds/__init__.py | 1 + subcmds/abandon.py | 1 + subcmds/branches.py | 1 + subcmds/checkout.py | 1 + subcmds/cherry_pick.py | 1 + subcmds/diff.py | 1 + subcmds/diffmanifests.py | 1 + subcmds/download.py | 1 + subcmds/forall.py | 1 + subcmds/gitc_delete.py | 1 + subcmds/gitc_init.py | 1 + subcmds/grep.py | 1 + subcmds/help.py | 1 + subcmds/info.py | 1 + subcmds/init.py | 1 + subcmds/list.py | 1 + subcmds/manifest.py | 1 + subcmds/overview.py | 1 + subcmds/prune.py | 1 + subcmds/rebase.py | 1 + subcmds/selfupdate.py | 1 + subcmds/smartsync.py | 1 + subcmds/stage.py | 1 + subcmds/start.py | 1 + subcmds/status.py | 1 + subcmds/sync.py | 1 + subcmds/upload.py | 1 + subcmds/version.py | 1 + tests/test_git_config.py | 2 ++ tests/test_wrapper.py | 1 + trace.py | 1 + wrapper.py | 2 ++ 50 files changed, 53 insertions(+) diff --git a/color.py b/color.py index 0218aab..5b3a282 100644 --- a/color.py +++ b/color.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/command.py b/command.py index eb3527f..8c5e246 100644 --- a/command.py +++ b/command.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/editor.py b/editor.py index 7980f2b..b761eb5 100644 --- a/editor.py +++ b/editor.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/error.py b/error.py index f2a7c4e..5bfe3a6 100644 --- a/error.py +++ b/error.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/event_log.py b/event_log.py index 0696df5..315d752 100644 --- a/event_log.py +++ b/event_log.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2017 The Android Open Source Project # diff --git a/git_command.py b/git_command.py index b1e9e17..1807b55 100644 --- a/git_command.py +++ b/git_command.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/git_config.py b/git_config.py index aac0885..ca1282a 100644 --- a/git_config.py +++ b/git_config.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/git_refs.py b/git_refs.py index e0a85d7..3187783 100644 --- a/git_refs.py +++ b/git_refs.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2009 The Android Open Source Project # diff --git a/gitc_utils.py b/gitc_utils.py index f49f7be..b47e181 100644 --- a/gitc_utils.py +++ b/gitc_utils.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2015 The Android Open Source Project # diff --git a/main.py b/main.py index be5e313..531400c 100755 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/manifest_xml.py b/manifest_xml.py index 23b4fb7..9628630 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/pager.py b/pager.py index 0521c0c..221baf3 100755 --- a/pager.py +++ b/pager.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/platform_utils.py b/platform_utils.py index 8af25d2..77e8fdf 100644 --- a/platform_utils.py +++ b/platform_utils.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2016 The Android Open Source Project # diff --git a/platform_utils_win32.py b/platform_utils_win32.py index 7ab2bf0..31e00c1 100644 --- a/platform_utils_win32.py +++ b/platform_utils_win32.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2016 The Android Open Source Project # diff --git a/progress.py b/progress.py index 0dd5d1a..6431695 100644 --- a/progress.py +++ b/progress.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2009 The Android Open Source Project # diff --git a/project.py b/project.py index e4558e0..ae2bf6f 100755 --- a/project.py +++ b/project.py @@ -1,3 +1,5 @@ +# -*- coding:utf-8 -*- +# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pyversion.py b/pyversion.py index 5b348d9..f608240 100644 --- a/pyversion.py +++ b/pyversion.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2013 The Android Open Source Project # diff --git a/repo b/repo index c4c9786..69c14a8 100755 --- a/repo +++ b/repo @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding:utf-8 -*- # repo default configuration # diff --git a/subcmds/__init__.py b/subcmds/__init__.py index 84efb4d..2734103 100644 --- a/subcmds/__init__.py +++ b/subcmds/__init__.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/abandon.py b/subcmds/abandon.py index f1c2a83..319262b 100644 --- a/subcmds/abandon.py +++ b/subcmds/abandon.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/branches.py b/subcmds/branches.py index fa1dff6..fb60d7d 100644 --- a/subcmds/branches.py +++ b/subcmds/branches.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2009 The Android Open Source Project # diff --git a/subcmds/checkout.py b/subcmds/checkout.py index cbbca10..51ac483 100644 --- a/subcmds/checkout.py +++ b/subcmds/checkout.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2009 The Android Open Source Project # diff --git a/subcmds/cherry_pick.py b/subcmds/cherry_pick.py index 1f7dffd..43215f9 100644 --- a/subcmds/cherry_pick.py +++ b/subcmds/cherry_pick.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2010 The Android Open Source Project # diff --git a/subcmds/diff.py b/subcmds/diff.py index f233f69..1f3abd8 100644 --- a/subcmds/diff.py +++ b/subcmds/diff.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/diffmanifests.py b/subcmds/diffmanifests.py index a1e823c..cae776a 100644 --- a/subcmds/diffmanifests.py +++ b/subcmds/diffmanifests.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2014 The Android Open Source Project # diff --git a/subcmds/download.py b/subcmds/download.py index dba70ff..f746bc2 100755 --- a/subcmds/download.py +++ b/subcmds/download.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/forall.py b/subcmds/forall.py index 6fb16f1..9454ef6 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/gitc_delete.py b/subcmds/gitc_delete.py index 4d8cd8c..e5214b8 100644 --- a/subcmds/gitc_delete.py +++ b/subcmds/gitc_delete.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2015 The Android Open Source Project # diff --git a/subcmds/gitc_init.py b/subcmds/gitc_init.py index 2726eae..df7b258 100644 --- a/subcmds/gitc_init.py +++ b/subcmds/gitc_init.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2015 The Android Open Source Project # diff --git a/subcmds/grep.py b/subcmds/grep.py index 1157355..a588a78 100644 --- a/subcmds/grep.py +++ b/subcmds/grep.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2009 The Android Open Source Project # diff --git a/subcmds/help.py b/subcmds/help.py index 67a225e..90c1244 100644 --- a/subcmds/help.py +++ b/subcmds/help.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/info.py b/subcmds/info.py index 2fff3ac..be5a8f2 100644 --- a/subcmds/info.py +++ b/subcmds/info.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2012 The Android Open Source Project # diff --git a/subcmds/init.py b/subcmds/init.py index 632d1a3..6c8b1dd 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/list.py b/subcmds/list.py index ca51c5f..961b195 100644 --- a/subcmds/list.py +++ b/subcmds/list.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2011 The Android Open Source Project # diff --git a/subcmds/manifest.py b/subcmds/manifest.py index 4a5228b..07fa323 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2009 The Android Open Source Project # diff --git a/subcmds/overview.py b/subcmds/overview.py index eed8cf2..08b58a6 100644 --- a/subcmds/overview.py +++ b/subcmds/overview.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2012 The Android Open Source Project # diff --git a/subcmds/prune.py b/subcmds/prune.py index 39c571a..dc8b8c9 100644 --- a/subcmds/prune.py +++ b/subcmds/prune.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/rebase.py b/subcmds/rebase.py index 7479697..9464091 100644 --- a/subcmds/rebase.py +++ b/subcmds/rebase.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2010 The Android Open Source Project # diff --git a/subcmds/selfupdate.py b/subcmds/selfupdate.py index d12e08d..a8a09b6 100644 --- a/subcmds/selfupdate.py +++ b/subcmds/selfupdate.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2009 The Android Open Source Project # diff --git a/subcmds/smartsync.py b/subcmds/smartsync.py index e164859..675b983 100644 --- a/subcmds/smartsync.py +++ b/subcmds/smartsync.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2010 The Android Open Source Project # diff --git a/subcmds/stage.py b/subcmds/stage.py index 9d35426..aeb4951 100644 --- a/subcmds/stage.py +++ b/subcmds/stage.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/start.py b/subcmds/start.py index c3ec303..0c60d78 100644 --- a/subcmds/start.py +++ b/subcmds/start.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/status.py b/subcmds/status.py index 773f22d..3939c45 100644 --- a/subcmds/status.py +++ b/subcmds/status.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/sync.py b/subcmds/sync.py index ec7337a..2e92584 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/upload.py b/subcmds/upload.py index acb9d7f..e7e5b1b 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/subcmds/version.py b/subcmds/version.py index 01b7fd8..8b48bcf 100644 --- a/subcmds/version.py +++ b/subcmds/version.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2009 The Android Open Source Project # diff --git a/tests/test_git_config.py b/tests/test_git_config.py index 3d4b997..8773b0b 100644 --- a/tests/test_git_config.py +++ b/tests/test_git_config.py @@ -1,3 +1,5 @@ +# -*- coding:utf-8 -*- + import os import unittest diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index fb32e38..d20641b 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2015 The Android Open Source Project # diff --git a/trace.py b/trace.py index db42a68..db51455 100644 --- a/trace.py +++ b/trace.py @@ -1,3 +1,4 @@ +# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # diff --git a/wrapper.py b/wrapper.py index ca4a283..bbb8471 100644 --- a/wrapper.py +++ b/wrapper.py @@ -1,3 +1,5 @@ +# -*- coding:utf-8 -*- +# # Copyright (C) 2014 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License");