Chromium Code Reviews| Index: scripts/slave/bot_update.py |
| diff --git a/scripts/slave/bot_update.py b/scripts/slave/bot_update.py |
| index 51c79eba4ce9155bb6dbc12ff1670aadfb3ed40b..07d44e28aa862e15951888529707ac3fe8ba0c4a 100755 |
| --- a/scripts/slave/bot_update.py |
| +++ b/scripts/slave/bot_update.py |
| @@ -1257,15 +1257,19 @@ def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only, |
| if patch_url: |
| patches = get_svn_patch(patch_url) |
| + already_patched = [] |
| for solution in solutions: |
| - # At first, only patch top-level DEPS. |
| - if patch_root == solution['name']: |
| + if (patch_root == solution['name'] or |
| + solution['name'].startswith(patch_root + '/')): |
| + relative_root = solution['name'][len(patch_root) + 1:] |
|
Ryan Tseng
2014/09/08 18:00:45
blerg, I was trying to do this with more posixpath
agable
2014/09/08 18:23:24
This is the generic path way. The only additional
|
| + target = '/'.join([relative_root, 'DEPS']).lstrip('/') |
| if patches: |
| - apply_svn_patch(patch_root, patches, whitelist=['DEPS']) |
| + apply_svn_patch(patch_root, patches, whitelist=[target]) |
| + already_patched.append(target) |
|
Ryan Tseng
2014/09/08 18:00:45
This can be done outside of the if/else block (and
agable
2014/09/08 18:23:24
I'd only be comfortable doing that if the below wa
|
| elif issue: |
| apply_rietveld_issue(issue, patchset, patch_root, rietveld_server, |
| - revision_mapping, git_ref, whitelist=['DEPS']) |
| - break |
| + revision_mapping, git_ref, whitelist=[target]) |
| + already_patched.append(target) |
| if buildspec: |
| buildspecs2git(first_sln, buildspec) |
| @@ -1298,10 +1302,10 @@ def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only, |
| dir_names, revisions) |
| # Apply the rest of the patch here (sans DEPS) |
| if patches: |
| - apply_svn_patch(patch_root, patches, blacklist=['DEPS']) |
| + apply_svn_patch(patch_root, patches, blacklist=already_patched) |
| elif issue: |
| apply_rietveld_issue(issue, patchset, patch_root, rietveld_server, |
| - revision_mapping, git_ref, blacklist=['DEPS']) |
| + revision_mapping, git_ref, blacklist=already_patched) |
| # Reset the deps_file point in the solutions so that hooks get run properly. |
| for sln in solutions: |