Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: tools/check_git_config.py

Issue 493753003: Check that 'DEPS' is used in gclient solution (not '.DEPS.git'). (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Script that attempts to push to a special git repository to verify that git 6 """Script that attempts to push to a special git repository to verify that git
7 credentials are configured correctly. It also verifies that gclient solution is 7 credentials are configured correctly. It also verifies that gclient solution is
8 configured to use git checkout. 8 configured to use git checkout.
9 9
10 It will be added as gclient hook shortly before Chromium switches to git and 10 It will be added as gclient hook shortly before Chromium switches to git and
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 MOTHERSHIP_URL = ( 53 MOTHERSHIP_URL = (
54 'https://chromium-git-access.appspot.com/' 54 'https://chromium-git-access.appspot.com/'
55 'git_access/api/v1/reports/access_check') 55 'git_access/api/v1/reports/access_check')
56 56
57 # Repository to push test commits to. 57 # Repository to push test commits to.
58 TEST_REPO_URL = 'https://chromium.googlesource.com/a/playground/access_test' 58 TEST_REPO_URL = 'https://chromium.googlesource.com/a/playground/access_test'
59 59
60 # Git-compatible gclient solution. 60 # Git-compatible gclient solution.
61 GOOD_GCLIENT_SOLUTION = { 61 GOOD_GCLIENT_SOLUTION = {
62 'name': 'src', 62 'name': 'src',
63 'deps_file': '.DEPS.git', 63 'deps_file': 'DEPS',
64 'managed': False, 64 'managed': False,
65 'url': 'https://chromium.googlesource.com/chromium/src.git', 65 'url': 'https://chromium.googlesource.com/chromium/src.git',
66 } 66 }
67 67
68 # Possible chunks of git push response in case .netrc is misconfigured. 68 # Possible chunks of git push response in case .netrc is misconfigured.
69 BAD_ACL_ERRORS = ( 69 BAD_ACL_ERRORS = (
70 '(prohibited by Gerrit)', 70 '(prohibited by Gerrit)',
71 'does not match your user account', 71 'does not match your user account',
72 'Git repository not found', 72 'Git repository not found',
73 'Invalid user name or password', 73 'Invalid user name or password',
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 write_last_configuration(config) 529 write_last_configuration(config)
530 else: 530 else:
531 logging.warning('Check failed and will be retried on the next run') 531 logging.warning('Check failed and will be retried on the next run')
532 except Exception: 532 except Exception:
533 logging.exception('Unexpected exception when performing git access check') 533 logging.exception('Unexpected exception when performing git access check')
534 return 0 534 return 0
535 535
536 536
537 if __name__ == '__main__': 537 if __name__ == '__main__':
538 sys.exit(main(sys.argv[1:])) 538 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698