Chromium Code Reviews| Index: appengine/findit/common/chromium_deps.py |
| diff --git a/appengine/findit/common/chromium_deps.py b/appengine/findit/common/chromium_deps.py |
| index b402827c4307ce6ad09ed63cfe942ae08d797b40..cb489b144b42a0b8c686a3e25573896f6d209caa 100644 |
| --- a/appengine/findit/common/chromium_deps.py |
| +++ b/appengine/findit/common/chromium_deps.py |
| @@ -114,3 +114,29 @@ def GetChromiumDEPSRolls(old_cr_revision, new_cr_revision, os_platform, |
| path, old_dep.repo_url, old_dep.revision, None)) |
| return rolls |
| + |
| + |
| +def GetDEPSRollsDict(old_cr_revision, new_cr_revision, os_platform): |
| + """Gets dep_path to DependencyRoll dictionary for deps in |
| + (old_cr_revision, new_cr_revision]. |
| + |
| + Args: |
| + old_cr_revision (str): The Git commit hash for the old Chromium revision. |
| + new_cr_revision (str): The Git commit hash for the new Chromium revision. |
| + os_platform (str): The target OS platform of the Chrome or test binary. |
|
Martin Barbella
2016/04/19 22:21:28
|platform| would probably have the same meaning he
Sharu Jiang
2016/04/20 18:54:24
This is to be consist with other functions in this
|
| + |
| + Returns: |
| + A dict, mapping dep path to DependencyRoll. |
| + """ |
| + deps_rolls = GetChromiumDEPSRolls(old_cr_revision, new_cr_revision, |
| + os_platform) |
| + # Add chromium as dependency roll. |
| + deps_rolls.append(dependency.DependencyRoll( |
| + _CHROMIUM_ROOT_DIR, _CHROMIUM_REPO_MASTER, |
| + old_cr_revision, new_cr_revision)) |
| + |
| + deps_rolls_dict = {} |
| + for dep_roll in deps_rolls: |
| + deps_rolls_dict[dep_roll.path] = dep_roll |
| + |
| + return deps_rolls_dict |