diff --git a/roll_dep.py b/roll_dep.py index ddd13cbca5..3c09f7af9a 100755 --- a/roll_dep.py +++ b/roll_dep.py @@ -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 fetching the dependency via git. """ - if dependency not in gclient_dict['deps']: - 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) - + head = gclient_eval.GetRevision(gclient_dict, dependency) if not head: raise Error('%s is unpinned.' % dependency) check_call(['git', 'fetch', 'origin', '--quiet'], cwd=full_dir)