|
|
|
@ -134,19 +134,7 @@ def calculate_roll(full_dir, dependency, gclient_dict, roll_to):
|
|
|
|
"""Calculates the roll for a dependency by processing gclient_dict, and
|
|
|
|
"""Calculates the roll for a dependency by processing gclient_dict, and
|
|
|
|
fetching the dependency via git.
|
|
|
|
fetching the dependency via git.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
if dependency not in gclient_dict['deps']:
|
|
|
|
head = gclient_eval.GetRevision(gclient_dict, dependency)
|
|
|
|
raise Error(
|
|
|
|
|
|
|
|
'%s is not in the "deps" section of the DEPS file.' % dependency)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
head = None
|
|
|
|
|
|
|
|
if isinstance(gclient_dict['deps'][dependency], basestring):
|
|
|
|
|
|
|
|
_, _, head = gclient_dict['deps'][dependency].partition('@')
|
|
|
|
|
|
|
|
elif (isinstance(gclient_dict['deps'][dependency], collections.Mapping)
|
|
|
|
|
|
|
|
and 'url' in gclient_dict['deps'][dependency]):
|
|
|
|
|
|
|
|
_, _, head = gclient_dict['deps'][dependency]['url'].partition('@')
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
raise Error('%s is not a valid git dependency.' % dependency)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not head:
|
|
|
|
if not head:
|
|
|
|
raise Error('%s is unpinned.' % dependency)
|
|
|
|
raise Error('%s is unpinned.' % dependency)
|
|
|
|
check_call(['git', 'fetch', 'origin', '--quiet'], cwd=full_dir)
|
|
|
|
check_call(['git', 'fetch', 'origin', '--quiet'], cwd=full_dir)
|
|
|
|
|