Commit 58330b0d authored by Edward Lesmes's avatar Edward Lesmes Committed by Commit Bot

roll-dep: Use gclient_eval.GetRevision to get current revision.

R=agable@chromium.org

Bug: 760633
Change-Id: Iebabb417b5b1bd5a987de2707e84a0329e1ebe66
Reviewed-on: https://chromium-review.googlesource.com/1000758Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 54a81e45
...@@ -134,19 +134,7 @@ def calculate_roll(full_dir, dependency, gclient_dict, roll_to): ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment