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

Side by Side Diff: tools/check_git_config.py

Issue 485263004: Recognize one more git push error message as ACL related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 'deps_file': '.DEPS.git', 63 'deps_file': '.DEPS.git',
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 'Invalid user name or password', 72 'Invalid user name or password',
73 'Please make sure you have the correct access rights',
73 ) 74 )
74 75
75 76
76 def is_on_bot(): 77 def is_on_bot():
77 """True when running under buildbot.""" 78 """True when running under buildbot."""
78 return os.environ.get('CHROME_HEADLESS') == '1' 79 return os.environ.get('CHROME_HEADLESS') == '1'
79 80
80 81
81 def is_in_google_corp(): 82 def is_in_google_corp():
82 """True when running in google corp network.""" 83 """True when running in google corp network."""
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 write_last_configuration(config) 479 write_last_configuration(config)
479 else: 480 else:
480 logging.warning('Check failed and will be retried on the next run') 481 logging.warning('Check failed and will be retried on the next run')
481 except Exception: 482 except Exception:
482 logging.exception('Unexpected exception when performing git access check') 483 logging.exception('Unexpected exception when performing git access check')
483 return 0 484 return 0
484 485
485 486
486 if __name__ == '__main__': 487 if __name__ == '__main__':
487 sys.exit(main(sys.argv[1:])) 488 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