Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3263)

Unified Diff: scripts/slave/bot_update.py

Issue 552763002: Teach bot_update to support patching deps in solutions other than the patch_root (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Comments. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698