tools/check_git_config.py
def check_gclient_config(conf):
  """Shows warning if gclient solution is not properly configured for git."""
  # Ignore configs that do not have 'src' solution at all.
  if not conf['gclient_url']:
    return
  current = {
    'name': 'src',
    'deps_file': conf['gclient_deps'] or 'DEPS',
    'managed': conf['gclient_managed'] or False,
    'url': conf['gclient_url'],
  }
  # After depot_tools r291592 both DEPS and .DEPS.git are valid.
  good = GOOD_GCLIENT_SOLUTION.copy()
  good['deps_file'] = current['deps_file']
  if current == good:
    return
  # Show big warning if url or deps_file is wrong.
  if current['url'] != good['url'] or current['deps_file'] != good['deps_file']:
    print('-' * 80)
    print('Your gclient solution is not set to use supported git workflow!')
    print()
    print('Your \'src\' solution (in %s):' % GCLIENT_CONFIG)
    print(pprint.pformat(current, indent=2))
    print()
    print('Correct \'src\' solution to use git:')
    print(pprint.pformat(good, indent=2))
    print()
    print('Please update your .gclient file ASAP.')
    print('-' * 80)
  # Show smaller (additional) warning about managed workflow.
  if current['managed']:
    print('-' * 80)
    print('You are using managed gclient mode with git, which was deprecated '
          'on 8/22/13:')
    print('https://groups.google.com/a/chromium.org/'
          'forum/#!topic/chromium-dev/n9N5N3JL2_U')
    print()
    print('It is strongly advised to switch to unmanaged mode. For more '
          'information about managed mode and reasons for its deprecation see:')
    print(
        'http://www.chromium.org/developers/how-tos/get-the-code/gclient-managed-mode'
    )
    print()
    print('There\'s also a large suite of tools to assist managing git '
          'checkouts.\nSee \'man depot_tools\' (or read '
          'depot_tools/man/html/depot_tools.html).')
    print('-' * 80)
Shows warning if gclient solution is not properly configured for git.
Shows warning if gclient solution is not properly configured for git.
Shows warning if gclient solution is not properly configured for git .
def check_gclient_config(conf):
  if not conf['gclient_url']:
    return
  current = {
    'name': 'src',
    'deps_file': conf['gclient_deps'] or 'DEPS',
    'managed': conf['gclient_managed'] or False,
    'url': conf['gclient_url'],
  }
  good = GOOD_GCLIENT_SOLUTION.copy()
  good['deps_file'] = current['deps_file']
  if current == good:
    return
  if current['url'] != good['url'] or current['deps_file'] != good['deps_file']:
    print('-' * 80)
    print('Your gclient solution is not set to use supported git workflow!')
    print()
    print('Your \'src\' solution (in %s):' % GCLIENT_CONFIG)
    print(pprint.pformat(current, indent=2))
    print()
    print('Correct \'src\' solution to use git:')
    print(pprint.pformat(good, indent=2))
    print()
    print('Please update your .gclient file ASAP.')
    print('-' * 80)
  if current['managed']:
    print('-' * 80)
    print('You are using managed gclient mode with git, which was deprecated '
          'on 8/22/13:')
    print('https://groups.google.com/a/chromium.org/'
          'forum/#!topic/chromium-dev/n9N5N3JL2_U')
    print()
    print('It is strongly advised to switch to unmanaged mode. For more '
          'information about managed mode and reasons for its deprecation see:')
    print(
        'http://www.chromium.org/developers/how-tos/get-the-code/gclient-managed-mode'
    )
    print()
    print('There\'s also a large suite of tools to assist managing git '
          'checkouts.\nSee \'man depot_tools\' (or read '
          'depot_tools/man/html/depot_tools.html).')
    print('-' * 80)
def check_gclient_config ( conf ) : if not conf [ 'gclient_url' ] : return current = { 'name' : 'src' , 'deps_file' : conf [ 'gclient_deps' ] or 'DEPS' , 'managed' : conf [ 'gclient_managed' ] or False , 'url' : conf [ 'gclient_url' ] , } good = GOOD_GCLIENT_SOLUTION . copy ( ) good [ 'deps_file' ] = current [ 'deps_file' ] if current == good : return if current [ 'url' ] != good [ 'url' ] or current [ 'deps_file' ] != good [ 'deps_file' ] : print ( '-' * 80 ) print ( 'Your gclient solution is not set to use supported git workflow!' ) print ( ) print ( 'Your \'src\' solution (in %s):' % GCLIENT_CONFIG ) print ( pprint . pformat ( current , indent = 2 ) ) print ( ) print ( 'Correct \'src\' solution to use git:' ) print ( pprint . pformat ( good , indent = 2 ) ) print ( ) print ( 'Please update your .gclient file ASAP.' ) print ( '-' * 80 ) if current [ 'managed' ] : print ( '-' * 80 ) print ( 'You are using managed gclient mode with git, which was deprecated ' 'on 8/22/13:' ) print ( 'https://groups.google.com/a/chromium.org/' 'forum/#!topic/chromium-dev/n9N5N3JL2_U' ) print ( ) print ( 'It is strongly advised to switch to unmanaged mode. For more ' 'information about managed mode and reasons for its deprecation see:' ) print ( 'http://www.chromium.org/developers/how-tos/get-the-code/gclient-managed-mode' ) print ( ) print ( 'There\'s also a large suite of tools to assist managing git ' 'checkouts.\nSee \'man depot_tools\' (or read ' 'depot_tools/man/html/depot_tools.html).' ) print ( '-' * 80 )
Shows warning if gclient solution is not properly configured for git.
Shows warning if gclient solution is not properly configured for git .
"""Shows warning if gclient solution is not properly configured for git.""" # Ignore configs that do not have 'src' solution at all. # After depot_tools r291592 both DEPS and .DEPS.git are valid. # Show big warning if url or deps_file is wrong. # Show smaller (additional) warning about managed workflow.
conf