Add support for a global status files for OWNERS
This allows for having some global comments such as timezones or
long-term unavailability.
The comments go into build/OWNERS.status (that way, they should be
available in all repos that map in build/ for the gn config files).
The local can be overwritten in codereview.settings.
The format is
email: status
Comments (starting with #) are allowed in that file, but they're ignored.
BUG=694222
R=dpranke@chromium.org
Change-Id: I49f58be87497d1ccaaa74f0a2f3d373403be44e7
Reviewed-on: https://chromium-review.googlesource.com/459542
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index f5cbb72..cfae719 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -684,6 +684,25 @@
]
self.assertIsNone(git_cl.LoadCodereviewSettingsFromFile(codereview_file))
+ def test_LoadCodereviewSettingsFromFile_owners_status(self):
+ codereview_file = StringIO.StringIO('OWNERS_STATUS_FILE: status')
+ self.calls = [
+ ((['git', 'config', '--unset-all', 'rietveld.server'],), ''),
+ ((['git', 'config', '--unset-all', 'rietveld.cc'],), CERR1),
+ ((['git', 'config', '--unset-all', 'rietveld.private'],), CERR1),
+ ((['git', 'config', '--unset-all', 'rietveld.tree-status-url'],), CERR1),
+ ((['git', 'config', '--unset-all', 'rietveld.viewvc-url'],), CERR1),
+ ((['git', 'config', '--unset-all', 'rietveld.bug-prefix'],), CERR1),
+ ((['git', 'config', '--unset-all', 'rietveld.cpplint-regex'],), CERR1),
+ ((['git', 'config', '--unset-all', 'rietveld.cpplint-ignore-regex'],),
+ CERR1),
+ ((['git', 'config', '--unset-all', 'rietveld.project'],), CERR1),
+ ((['git', 'config', '--unset-all', 'rietveld.run-post-upload-hook'],),
+ CERR1),
+ ((['git', 'config', 'rietveld.owners-status-file', 'status'],), ''),
+ ]
+ self.assertIsNone(git_cl.LoadCodereviewSettingsFromFile(codereview_file))
+
@classmethod
def _is_gerrit_calls(cls, gerrit=False):
return [((['git', 'config', 'rietveld.autoupdate'],), ''),