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

Side by Side Diff: tools/check_git_config.py

Issue 488313003: Do not suggest to replace .DEPS.git with DEPS. (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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 """Shows warning if gclient solution is not properly configured for git.""" 378 """Shows warning if gclient solution is not properly configured for git."""
379 # Ignore configs that do not have 'src' solution at all. 379 # Ignore configs that do not have 'src' solution at all.
380 if not conf['gclient_url']: 380 if not conf['gclient_url']:
381 return 381 return
382 current = { 382 current = {
383 'name': 'src', 383 'name': 'src',
384 'deps_file': conf['gclient_deps'] or 'DEPS', 384 'deps_file': conf['gclient_deps'] or 'DEPS',
385 'managed': conf['gclient_managed'] or False, 385 'managed': conf['gclient_managed'] or False,
386 'url': conf['gclient_url'], 386 'url': conf['gclient_url'],
387 } 387 }
388 good = GOOD_GCLIENT_SOLUTION 388 # After depot_tools r291592 both DEPS and .DEPS.git are valid.
389 good = GOOD_GCLIENT_SOLUTION.copy()
390 good['deps_file'] = current['deps_file']
389 if current == good: 391 if current == good:
390 return 392 return
391 # Show big warning if url or deps_file is wrong. 393 # Show big warning if url or deps_file is wrong.
392 if current['url'] != good['url'] or current['deps_file'] != good['deps_file']: 394 if current['url'] != good['url'] or current['deps_file'] != good['deps_file']:
393 print '-' * 80 395 print '-' * 80
394 print 'Your gclient solution is not set to use supported git workflow!' 396 print 'Your gclient solution is not set to use supported git workflow!'
395 print 397 print
396 print 'Your \'src\' solution (in %s):' % GCLIENT_CONFIG 398 print 'Your \'src\' solution (in %s):' % GCLIENT_CONFIG
397 print pprint.pformat(current, indent=2) 399 print pprint.pformat(current, indent=2)
398 print 400 print
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 write_last_configuration(config) 531 write_last_configuration(config)
530 else: 532 else:
531 logging.warning('Check failed and will be retried on the next run') 533 logging.warning('Check failed and will be retried on the next run')
532 except Exception: 534 except Exception:
533 logging.exception('Unexpected exception when performing git access check') 535 logging.exception('Unexpected exception when performing git access check')
534 return 0 536 return 0
535 537
536 538
537 if __name__ == '__main__': 539 if __name__ == '__main__':
538 sys.exit(main(sys.argv[1:])) 540 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