Chromium Code Reviews| Index: recipe_modules/gclient/config.py |
| diff --git a/recipe_modules/gclient/config.py b/recipe_modules/gclient/config.py |
| index c300edd506d54e52808063ac576d6ba3c322bcbe..33079822b3e849e3b9c712ee0ea23fe8d0fccc8d 100644 |
| --- a/recipe_modules/gclient/config.py |
| +++ b/recipe_modules/gclient/config.py |
| @@ -30,6 +30,18 @@ def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=None, |
| revision = Single( |
| (basestring, gclient_api.RevisionResolver), |
| required=False, hidden=True), |
| + |
| + # Maps patch_project to (solution, revision). |
| + # - solution is used also as patch root. |
| + # - if revision is given, it's passed to bot_update. |
| + # This is essentially a whitelist of which projects inside a solution |
| + # can be patched automatically by bot_update based on PATCH_PROJECT |
| + # property. |
| + # For example, bare chromium solution has this entry in patch_projects |
| + # 'v8': ('v8', 'HEAD') |
|
Michael Achenbach
2016/04/25 09:32:42
Stay in sync with below (includes src). Maybe prov
tandrii(chromium)
2016/04/25 11:39:50
Done.
|
| + # then a v8 patch can be applied on a chromium checkout after synching v8 |
| + # to it's master HEAD. |
| + patch_projects = Dict(value_type=tuple), |
| ) |
| ), |
| deps_os = Dict(value_type=basestring), |
| @@ -146,18 +158,16 @@ def chromium_bare(c): |
| p['parent_got_v8_revision'] = 'v8_revision' |
| p['parent_got_webrtc_revision'] = 'webrtc_revision' |
| - # Patch project revisions are applied whenever patch_project is set. E.g. if |
| - # a v8 stand-alone patch is sent to a chromium trybot, patch_project is v8 |
| - # and can be used to sync v8 to HEAD instead of the pinned chromium |
| - # version. |
| - patch_project_revisions = { |
| - 'v8': ('src/v8', 'HEAD'), |
| - } |
| - |
| - patch_revision = patch_project_revisions.get(c.PATCH_PROJECT) |
| - # TODO(phajdan.jr): Move to proper repo and add coverage. |
| - if patch_revision: # pragma: no cover |
| - c.revisions[patch_revision[0]] = patch_revision[1] |
| + p = s.patch_projects |
|
Michael Achenbach
2016/04/25 09:32:42
I'd make this global, i.e. c.patch_projects, as th
tandrii(chromium)
2016/04/25 11:39:50
Done.
|
| + p['v8'] = ('src/v8', 'HEAD') |
|
tandrii(chromium)
2016/04/22 15:59:10
for gerrit, this row would be duplicated with
'v
|
| + p['angle/angle'] = ('src/third_party/angle', None) |
|
tandrii(chromium)
2016/04/22 15:59:10
this is how gerrit looks.
|
| + p['blink'] = ('src/third_party/WebKit', None) |
|
tandrii(chromium)
2016/04/22 15:59:10
machenbach@ i decided to specify the the full path
Michael Achenbach
2016/04/25 09:32:42
Does blink still exist in this context? Keep it ar
tandrii(chromium)
2016/04/25 11:39:50
kept as is, but yes, i think i'll clean it up with
|
| + # TODO(tandrii): can this be done automatically for all solutions, |
| + # instead of copy-pasting these 3 lines to very solution? |
| + # If so, remove occurrencies in this file. |
| + path, revision = s.patch_projects.get(c.PATCH_PROJECT, (None, None)) |
|
Michael Achenbach
2016/04/25 09:32:42
Move to bot_update ensure_checkout and maybe to gc
tandrii(chromium)
2016/04/25 11:39:50
Done.
|
| + if path and revision: |
| + c.revisions[path] = revision |
| @config_ctx(includes=['chromium_bare']) |
| def chromium_empty(c): |
| @@ -538,6 +548,16 @@ def infra(c): |
| soln.url = 'https://chromium.googlesource.com/infra/infra.git' |
| c.got_revision_mapping['infra'] = 'got_revision' |
| + p = soln.patch_projects |
| + p['luci-py'] = ('infra/luci', 'HEAD') |
| + p['recipes-py'] = ('infra/recipes-py', 'HEAD') |
| + # TODO(tandrii): can this be done automatically for all solutions, |
| + # instead of copy-pasting these 3 lines to very solution? |
| + # If so, remove occurrencies in this file. |
| + path, revision = soln.patch_projects.get(c.PATCH_PROJECT, (None, None)) |
| + if path and revision: |
| + c.revisions[path] = revision |
| + |
| @config_ctx(config_vars={'GIT_MODE': True}) |
| def infra_internal(c): # pragma: no cover |
| soln = c.solutions.add() |
| @@ -572,6 +592,7 @@ def luci_py(c): |
| # luci-py is checked out as part of infra just to have appengine |
| # pre-installed, as that's what luci-py PRESUBMIT relies on. |
| c.revisions['infra'] = 'origin/master' |
| + # TODO(tandrii): make use of c.patch_projects. |
| c.revisions['infra/luci'] = ( |
| gclient_api.RevisionFallbackChain('origin/master')) |
| m = c.got_revision_mapping |
| @@ -581,6 +602,7 @@ def luci_py(c): |
| @config_ctx(includes=['infra']) |
| def recipes_py(c): |
| c.revisions['infra'] = 'origin/master' |
| + # TODO(tandrii): make use of c.patch_projects. |
| c.revisions['infra/recipes-py'] = ( |
| gclient_api.RevisionFallbackChain('origin/master')) |
| m = c.got_revision_mapping |
| @@ -634,6 +656,7 @@ def angle_top_of_tree(c): # pragma: no cover |
| Sets up ToT instead of the DEPS-pinned revision for ANGLE. |
| """ |
| + # TODO(tandrii): I think patch_projects in bare_chromium fixed this. |
| c.solutions[0].revision = 'HEAD' |
| c.revisions['src/third_party/angle'] = 'HEAD' |