libv8 6.3.292.48.1 → 6.7.288.46.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +10 -34
  3. data/CHANGELOG.md +16 -0
  4. data/README.md +9 -63
  5. data/Rakefile +2 -2
  6. data/ext/libv8/builder.rb +22 -87
  7. data/ext/libv8/extconf.rb +1 -1
  8. data/ext/libv8/paths.rb +5 -18
  9. data/lib/libv8/version.rb +1 -1
  10. data/spec/location_spec.rb +1 -2
  11. data/spec/spec_helper.rb +0 -1
  12. data/vendor/depot_tools/.gitattributes +1 -2
  13. data/vendor/depot_tools/OWNERS +0 -1
  14. data/vendor/depot_tools/PRESUBMIT.py +11 -6
  15. data/vendor/depot_tools/README.md +0 -1
  16. data/vendor/depot_tools/WATCHLISTS +0 -6
  17. data/vendor/depot_tools/auth.py +129 -87
  18. data/vendor/depot_tools/autoninja +11 -1
  19. data/vendor/depot_tools/autoninja.bat +7 -1
  20. data/vendor/depot_tools/autoninja.py +14 -6
  21. data/vendor/depot_tools/bootstrap/win/manifest.txt +1 -1
  22. data/vendor/depot_tools/bootstrap/win/manifest_bleeding_edge.txt +1 -1
  23. data/vendor/depot_tools/cipd +23 -2
  24. data/vendor/depot_tools/cipd.bat +2 -2
  25. data/vendor/depot_tools/cipd_client_version +1 -1
  26. data/vendor/depot_tools/cipd_manifest.txt +17 -7
  27. data/vendor/depot_tools/cit.py +7 -6
  28. data/vendor/depot_tools/cpplint.py +195 -35
  29. data/vendor/depot_tools/detect_host_arch.py +51 -0
  30. data/vendor/depot_tools/download_from_google_storage.py +85 -26
  31. data/vendor/depot_tools/fetch.py +11 -6
  32. data/vendor/depot_tools/fetch_configs/chromium.py +0 -1
  33. data/vendor/depot_tools/fetch_configs/goma_client.py +41 -0
  34. data/vendor/depot_tools/fetch_configs/infra.py +0 -1
  35. data/vendor/depot_tools/fetch_configs/infra_internal.py +0 -1
  36. data/vendor/depot_tools/gclient-new-workdir.py +4 -0
  37. data/vendor/depot_tools/gclient.py +732 -476
  38. data/vendor/depot_tools/gclient_eval.py +569 -58
  39. data/vendor/depot_tools/gclient_scm.py +258 -46
  40. data/vendor/depot_tools/gclient_utils.py +17 -1
  41. data/vendor/depot_tools/gerrit_util.py +46 -13
  42. data/vendor/depot_tools/git_cache.py +0 -2
  43. data/vendor/depot_tools/git_cl.py +176 -335
  44. data/vendor/depot_tools/git_common.py +19 -16
  45. data/vendor/depot_tools/git_footers.py +19 -5
  46. data/vendor/depot_tools/git_hyper_blame.py +9 -3
  47. data/vendor/depot_tools/git_new_branch.py +15 -3
  48. data/vendor/depot_tools/git_upstream_diff.py +7 -2
  49. data/vendor/depot_tools/gsutil.py +1 -1
  50. data/vendor/depot_tools/infra/config/cq.cfg +1 -2
  51. data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
  52. data/vendor/depot_tools/luci-auth +13 -0
  53. data/vendor/depot_tools/luci-auth.bat +8 -0
  54. data/vendor/depot_tools/man/html/depot_tools.html +0 -8
  55. data/vendor/depot_tools/man/html/git-upstream-diff.html +20 -3
  56. data/vendor/depot_tools/man/man1/git-upstream-diff.1 +27 -6
  57. data/vendor/depot_tools/man/man7/depot_tools.7 +0 -5
  58. data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +2 -2
  59. data/vendor/depot_tools/man/src/git-upstream-diff.txt +21 -3
  60. data/vendor/depot_tools/man/src/make_docs.sh +6 -0
  61. data/vendor/depot_tools/my_activity.py +283 -93
  62. data/vendor/depot_tools/owners.py +9 -4
  63. data/vendor/depot_tools/owners_finder.py +7 -3
  64. data/vendor/depot_tools/post_build_ninja_summary.py +322 -0
  65. data/vendor/depot_tools/presubmit_canned_checks.py +91 -106
  66. data/vendor/depot_tools/presubmit_support.py +219 -157
  67. data/vendor/depot_tools/prpc +13 -0
  68. data/vendor/depot_tools/prpc.bat +8 -0
  69. data/vendor/depot_tools/recipes/OWNERS +3 -1
  70. data/vendor/depot_tools/recipes/README.recipes.md +70 -111
  71. data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +12 -5
  72. data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +36 -68
  73. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +0 -8
  74. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{trychange_oauth2_json.json → no_apply_patch_on_gclient.json} +64 -10
  75. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{no_shallow.json → shallow.json} +1 -1
  76. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob.json +0 -8
  77. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_empty_revision.json +0 -8
  78. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +0 -6
  79. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +0 -7
  80. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +0 -6
  81. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle_deprecated.json +44 -0
  82. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{trychange_oauth2_buildbot.json → tryjob_gerrit_branch_heads.json} +51 -5
  83. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +0 -8
  84. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +48 -8
  85. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.py +19 -26
  86. data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/bot_update.py +193 -155
  87. data/vendor/depot_tools/recipes/recipe_modules/bot_update/test_api.py +9 -0
  88. data/vendor/depot_tools/recipes/recipe_modules/gclient/api.py +2 -7
  89. data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +31 -5
  90. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/basic.json +37 -19
  91. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/buildbot.json +37 -19
  92. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/revision.json +37 -19
  93. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/tryserver.json +37 -23
  94. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.py +4 -0
  95. data/vendor/depot_tools/recipes/recipe_modules/gerrit/api.py +40 -8
  96. data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +3 -3
  97. data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.py +6 -3
  98. data/vendor/depot_tools/recipes/recipe_modules/gitiles/OWNERS +0 -1
  99. data/vendor/depot_tools/recipes/recipe_modules/tryserver/__init__.py +0 -1
  100. data/vendor/depot_tools/recipes/recipe_modules/tryserver/api.py +7 -56
  101. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +0 -1
  102. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.py +15 -16
  103. data/vendor/depot_tools/recipes/recipes.py +4 -2
  104. data/vendor/depot_tools/recipes/trigger_recipe_roller.txt +12 -0
  105. data/vendor/depot_tools/roll_dep.py +35 -37
  106. data/vendor/depot_tools/support/chromite_wrapper +1 -1
  107. data/vendor/depot_tools/third_party/logilab/astroid/README.chromium +3 -3
  108. data/vendor/depot_tools/third_party/logilab/astroid/__pkginfo__.py +2 -2
  109. data/vendor/depot_tools/third_party/logilab/astroid/astpeephole.py +86 -0
  110. data/vendor/depot_tools/third_party/logilab/astroid/bases.py +53 -66
  111. data/vendor/depot_tools/third_party/logilab/astroid/brain/py2pytest.py +31 -31
  112. data/vendor/depot_tools/third_party/logilab/astroid/brain/pynose.py +39 -16
  113. data/vendor/depot_tools/third_party/logilab/astroid/brain/pysix_moves.py +225 -189
  114. data/vendor/depot_tools/third_party/logilab/astroid/inference.py +45 -41
  115. data/vendor/depot_tools/third_party/logilab/astroid/manager.py +1 -0
  116. data/vendor/depot_tools/third_party/logilab/astroid/modutils.py +2 -2
  117. data/vendor/depot_tools/third_party/logilab/astroid/node_classes.py +3 -2
  118. data/vendor/depot_tools/third_party/logilab/astroid/nodes.py +1 -0
  119. data/vendor/depot_tools/third_party/logilab/astroid/protocols.py +57 -3
  120. data/vendor/depot_tools/third_party/logilab/astroid/raw_building.py +1 -1
  121. data/vendor/depot_tools/third_party/logilab/astroid/rebuilder.py +21 -1
  122. data/vendor/depot_tools/third_party/logilab/astroid/scoped_nodes.py +58 -33
  123. data/vendor/depot_tools/third_party/pylint/README.chromium +2 -2
  124. data/vendor/depot_tools/third_party/pylint/__pkginfo__.py +3 -3
  125. data/vendor/depot_tools/third_party/pylint/checkers/base.py +6 -18
  126. data/vendor/depot_tools/third_party/pylint/checkers/classes.py +64 -63
  127. data/vendor/depot_tools/third_party/pylint/checkers/design_analysis.py +25 -57
  128. data/vendor/depot_tools/third_party/pylint/checkers/format.py +14 -10
  129. data/vendor/depot_tools/third_party/pylint/checkers/python3.py +142 -37
  130. data/vendor/depot_tools/third_party/pylint/checkers/spelling.py +10 -1
  131. data/vendor/depot_tools/third_party/pylint/checkers/stdlib.py +50 -7
  132. data/vendor/depot_tools/third_party/pylint/checkers/strings.py +1 -1
  133. data/vendor/depot_tools/third_party/pylint/epylint.py +2 -1
  134. data/vendor/depot_tools/third_party/pylint/gui.py +1 -1
  135. data/vendor/depot_tools/third_party/pylint/lint.py +88 -23
  136. data/vendor/depot_tools/third_party/pylint/reporters/html.py +37 -5
  137. data/vendor/depot_tools/third_party/pylint/testutils.py +1 -1
  138. data/vendor/depot_tools/third_party/pylint/utils.py +5 -0
  139. data/vendor/depot_tools/vpython +31 -1
  140. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +35 -2
  141. data/vendor/depot_tools/win_toolchain/package_from_installed.py +0 -15
  142. data/vendor/depot_tools/yapf +17 -0
  143. data/vendor/depot_tools/{apply_issue.bat → yapf.bat} +2 -2
  144. metadata +16 -58
  145. data/ext/libv8/compiler.rb +0 -39
  146. data/ext/libv8/compiler/apple_llvm.rb +0 -22
  147. data/ext/libv8/compiler/clang.rb +0 -22
  148. data/ext/libv8/compiler/gcc.rb +0 -22
  149. data/ext/libv8/compiler/generic_compiler.rb +0 -66
  150. data/ext/libv8/make.rb +0 -13
  151. data/ext/libv8/patcher.rb +0 -21
  152. data/patches/0001-Build-a-standalone-static-library.patch +0 -26
  153. data/patches/0002-Don-t-compile-unnecessary-stuff.patch +0 -85
  154. data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +0 -25
  155. data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +0 -25
  156. data/patches/0005-Remove-TryInstallOptimizedCode.patch +0 -321
  157. data/patches/mingw-generate-makefiles.sh +0 -97
  158. data/spec/compiler/apple_llvm_spec.rb +0 -37
  159. data/spec/compiler/clang_spec.rb +0 -37
  160. data/spec/compiler/gcc_spec.rb +0 -37
  161. data/spec/compiler/generic_compiler_spec.rb +0 -50
  162. data/spec/compiler_spec.rb +0 -45
  163. data/spec/support/compiler_helpers.rb +0 -47
  164. data/vendor/depot_tools/apply_issue +0 -8
  165. data/vendor/depot_tools/apply_issue.py +0 -315
  166. data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +0 -815
  167. data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +0 -80
  168. data/vendor/depot_tools/man/src/_git-cherry-pick-upload_desc.helper.txt +0 -1
  169. data/vendor/depot_tools/man/src/git-cherry-pick-upload.demo.1.sh +0 -17
  170. data/vendor/depot_tools/man/src/git-cherry-pick-upload.txt +0 -35
  171. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2.json +0 -8
  172. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json_win.json +0 -196
  173. data/vendor/depot_tools/recipes/recipe_modules/rietveld/__init__.py +0 -6
  174. data/vendor/depot_tools/recipes/recipe_modules/rietveld/api.py +0 -97
  175. data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/basic.json +0 -8
  176. data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/buildbot.json +0 -30
  177. data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/no_auth.json +0 -27
  178. data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.py +0 -38
  179. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_rietveld_patch.json +0 -69
  180. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_rietveld_patch_new.json +0 -69
  181. data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -2
  182. data/vendor/depot_tools/third_party/cq_client/README.depot_tools.md +0 -2
  183. data/vendor/depot_tools/third_party/cq_client/README.md +0 -59
  184. data/vendor/depot_tools/third_party/cq_client/__init__.py +0 -3
  185. data/vendor/depot_tools/third_party/cq_client/v1/__init__.py +0 -3
  186. data/vendor/depot_tools/third_party/cq_client/v1/cq.pb.go +0 -810
  187. data/vendor/depot_tools/third_party/cq_client/v1/cq.proto +0 -281
  188. data/vendor/depot_tools/third_party/cq_client/v1/cq_pb2.py +0 -794
  189. data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_both.cfg +0 -71
  190. data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_gerrit.cfg +0 -58
  191. data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_rietveld.cfg +0 -60
  192. data/vendor/depot_tools/third_party/cq_client/v2/__init__.py +0 -3
  193. data/vendor/depot_tools/third_party/cq_client/v2/cq.pb.go +0 -792
  194. data/vendor/depot_tools/third_party/cq_client/v2/cq.proto +0 -270
  195. data/vendor/depot_tools/third_party/cq_client/v2/cq_pb2.py +0 -841
@@ -2,7 +2,6 @@
2
2
  # Use of this source code is governed by a BSD-style license that can be
3
3
  # found in the LICENSE file.
4
4
 
5
-
6
5
  """Recipe module to ensure a checkout is consistent on a bot."""
7
6
 
8
7
  from recipe_engine import recipe_api
@@ -10,16 +9,17 @@ from recipe_engine import recipe_api
10
9
 
11
10
  class BotUpdateApi(recipe_api.RecipeApi):
12
11
 
13
- def __init__(self, issue, patch_issue, patchset, patch_set,
12
+ def __init__(self, properties, patch_issue, patch_set,
14
13
  repository, patch_repository_url, gerrit_ref, patch_ref,
15
- patch_gerrit_url, rietveld, revision, parent_got_revision,
14
+ patch_gerrit_url, revision, parent_got_revision,
16
15
  deps_revision_overrides, fail_patch, *args, **kwargs):
17
- self._issue = issue or patch_issue
18
- self._patchset = patchset or patch_set
16
+ self._apply_patch_on_gclient = properties.get(
17
+ 'apply_patch_on_gclient', True)
18
+ self._issue = patch_issue
19
+ self._patchset = patch_set
19
20
  self._repository = repository or patch_repository_url
20
21
  self._gerrit_ref = gerrit_ref or patch_ref
21
22
  self._gerrit = patch_gerrit_url
22
- self._rietveld = rietveld
23
23
  self._revision = revision
24
24
  self._parent_got_revision = parent_got_revision
25
25
  self._deps_revision_overrides = deps_revision_overrides
@@ -67,10 +67,10 @@ class BotUpdateApi(recipe_api.RecipeApi):
67
67
 
68
68
  def ensure_checkout(self, gclient_config=None, suffix=None,
69
69
  patch=True, update_presentation=True,
70
- patch_root=None, no_shallow=False,
70
+ patch_root=None, no_shallow=True,
71
71
  with_branch_heads=False, with_tags=False, refs=None,
72
- patch_oauth2=False, oauth2_json=False,
73
- use_site_config_creds=True, clobber=False,
72
+ patch_oauth2=None, oauth2_json=None,
73
+ use_site_config_creds=None, clobber=False,
74
74
  root_solution_revision=None, rietveld=None, issue=None,
75
75
  patchset=None, gerrit_no_reset=False,
76
76
  gerrit_no_rebase_patch_ref=False,
@@ -78,22 +78,21 @@ class BotUpdateApi(recipe_api.RecipeApi):
78
78
  **kwargs):
79
79
  """
80
80
  Args:
81
- use_site_config_creds: If the oauth2 credentials are in the buildbot
82
- site_config. See crbug.com/624212 for more information.
83
81
  gclient_config: The gclient configuration to use when running bot_update.
84
82
  If omitted, the current gclient configuration is used.
85
- rietveld: The rietveld server to use. If omitted, will infer from
86
- the 'rietveld' property.
87
- issue: The rietveld issue number to use. If omitted, will infer from
88
- the 'issue' property.
89
- patchset: The rietveld issue patchset to use. If omitted, will infer from
90
- the 'patchset' property.
91
83
  disable_syntax_validation: (legacy) Disables syntax validation for DEPS.
92
84
  Needed as migration paths for recipes dealing with older revisions,
93
85
  such as bisect.
94
86
  manifest_name: The name of the manifest to upload to LogDog. This must
95
87
  be unique for the whole build.
96
88
  """
89
+ assert use_site_config_creds is None, "use_site_config_creds is deprecated"
90
+ assert rietveld is None, "rietveld is deprecated"
91
+ assert issue is None, "issue is deprecated"
92
+ assert patchset is None, "patchset is deprecated"
93
+ assert patch_oauth2 is None, "patch_oauth2 is deprecated"
94
+ assert oauth2_json is None, "oauth2_json is deprecated"
95
+
97
96
  refs = refs or []
98
97
  # We can re-use the gclient spec from the gclient module, since all the
99
98
  # data bot_update needs is already configured into the gclient spec.
@@ -101,8 +100,6 @@ class BotUpdateApi(recipe_api.RecipeApi):
101
100
  assert cfg is not None, (
102
101
  'missing gclient_config or forgot api.gclient.set_config(...) before?')
103
102
 
104
- # Only one of these should exist.
105
- assert not (oauth2_json and patch_oauth2)
106
103
 
107
104
  # Construct our bot_update command. This basically be inclusive of
108
105
  # everything required for bot_update to know:
@@ -112,58 +109,19 @@ class BotUpdateApi(recipe_api.RecipeApi):
112
109
  self.m.properties.get('patch_project'), cfg, self._repository)
113
110
 
114
111
  if patch:
115
- issue = issue or self._issue
116
112
  patchset = patchset or self._patchset
117
113
  gerrit_repo = self._repository
118
114
  gerrit_ref = self._gerrit_ref
119
115
  else:
120
116
  # The trybot recipe sometimes wants to de-apply the patch. In which case
121
117
  # we pretend the issue/patchset never existed.
122
- issue = patchset = email_file = key_file = None
123
118
  gerrit_repo = gerrit_ref = None
124
119
 
125
- # Issue and patchset must come together.
126
- if issue:
127
- assert patchset
128
- if patchset:
129
- assert issue
130
-
131
120
  # The gerrit_ref and gerrit_repo must be together or not at all. If one is
132
121
  # missing, clear both of them.
133
122
  if not gerrit_ref or not gerrit_repo:
134
123
  gerrit_repo = gerrit_ref = None
135
124
  assert (gerrit_ref != None) == (gerrit_repo != None)
136
- if gerrit_ref:
137
- # Gerrit patches have historically not specified issue and patchset.
138
- # resourece/bot_update has as a result implicit assumption that set issue
139
- # implies Rietveld patch.
140
- # TODO(tandrii): fix this madness.
141
- issue = patchset = None
142
-
143
- # Point to the oauth2 auth files if specified.
144
- # These paths are where the bots put their credential files.
145
- oauth2_json_file = email_file = key_file = None
146
- if oauth2_json:
147
- if self.m.platform.is_win:
148
- oauth2_json_file = 'C:\\creds\\refresh_tokens\\internal-try'
149
- else:
150
- oauth2_json_file = '/creds/refresh_tokens/internal-try'
151
- elif patch_oauth2:
152
- # TODO(martiniss): remove this hack :(. crbug.com/624212
153
- if use_site_config_creds:
154
- try:
155
- build_path = self.m.path['build']
156
- except KeyError:
157
- raise self.m.step.StepFailure(
158
- 'build path is not defined. This is normal for LUCI builds. '
159
- 'In LUCI, use_site_config_creds parameter of '
160
- 'bot_update.ensure_checkout is not supported')
161
- email_file = build_path.join('site_config', '.rietveld_client_email')
162
- key_file = build_path.join('site_config', '.rietveld_secret_key')
163
- else: #pragma: no cover
164
- #TODO(martiniss): make this use path.join, so it works on windows
165
- email_file = '/creds/rietveld/client_email'
166
- key_file = '/creds/rietveld/secret_key'
167
125
 
168
126
  # Allow patch_project's revision if necessary.
169
127
  # This is important for projects which are checked out as DEPS of the
@@ -182,15 +140,9 @@ class BotUpdateApi(recipe_api.RecipeApi):
182
140
  ['--git-cache-dir', cfg.cache_dir],
183
141
  ['--cleanup-dir', self.m.path['cleanup'].join('bot_update')],
184
142
 
185
- # How to find the patch, if any (issue/patchset).
186
- ['--issue', issue],
187
- ['--patchset', patchset],
188
- ['--rietveld_server', rietveld or self._rietveld],
143
+ # How to find the patch, if any
189
144
  ['--gerrit_repo', gerrit_repo],
190
145
  ['--gerrit_ref', gerrit_ref],
191
- ['--apply_issue_email_file', email_file],
192
- ['--apply_issue_key_file', key_file],
193
- ['--apply_issue_oauth2_file', oauth2_json_file],
194
146
 
195
147
  # Hookups to JSON output back into recipes.
196
148
  ['--output_json', self.m.json.output()],
@@ -230,8 +182,22 @@ class BotUpdateApi(recipe_api.RecipeApi):
230
182
  if fixed_revision.upper() == 'HEAD':
231
183
  # Sync to correct destination branch if HEAD was specified.
232
184
  fixed_revision = self._destination_branch(cfg, name)
185
+ # If we're syncing to a ref, we want to make sure it exists before
186
+ # trying to check it out.
187
+ if fixed_revision.startswith('refs/'):
188
+ # Handle the "ref:revision" syntax, e.g.
189
+ # refs/branch-heads/4.2:deadbeef
190
+ refs.append(fixed_revision.split(':')[0])
233
191
  flags.append(['--revision', '%s@%s' % (name, fixed_revision)])
234
192
 
193
+ for ref in refs:
194
+ assert not ref.startswith('refs/remotes/'), (
195
+ 'The "refs/remotes/*" syntax is not supported.\n'
196
+ 'The "remotes" syntax is dependent on the way the local repo is '
197
+ 'configured, and while there are defaults that can often be '
198
+ 'assumed, there is no guarantee the mapping will always be done in '
199
+ 'a particular way.')
200
+
235
201
  # Add extra fetch refspecs.
236
202
  for ref in refs:
237
203
  flags.append(['--refs', ref])
@@ -242,11 +208,11 @@ class BotUpdateApi(recipe_api.RecipeApi):
242
208
 
243
209
  if clobber:
244
210
  cmd.append('--clobber')
245
- if no_shallow:
246
- cmd.append('--no_shallow')
211
+ if no_shallow is False:
212
+ cmd.append('--maybe_shallow')
247
213
  if with_branch_heads or cfg.with_branch_heads:
248
214
  cmd.append('--with_branch_heads')
249
- if with_tags:
215
+ if with_tags or cfg.with_tags:
250
216
  cmd.append('--with_tags')
251
217
  if gerrit_no_reset:
252
218
  cmd.append('--gerrit_no_reset')
@@ -254,6 +220,8 @@ class BotUpdateApi(recipe_api.RecipeApi):
254
220
  cmd.append('--gerrit_no_rebase_patch_ref')
255
221
  if disable_syntax_validation or cfg.disable_syntax_validation:
256
222
  cmd.append('--disable-syntax-validation')
223
+ if not self._apply_patch_on_gclient:
224
+ cmd.append('--no-apply-patch-on-gclient')
257
225
 
258
226
  # Inject Json output for testing.
259
227
  first_sln = cfg.solutions[0].name
@@ -14,12 +14,6 @@
14
14
  "[GIT_CACHE]",
15
15
  "--cleanup-dir",
16
16
  "[CLEANUP]/bot_update",
17
- "--issue",
18
- "12345",
19
- "--patchset",
20
- "654321",
21
- "--rietveld_server",
22
- "https://rietveld.example.com/",
23
17
  "--output_json",
24
18
  "/path/to/tmp/json",
25
19
  "--revision",
@@ -86,8 +80,6 @@
86
80
  "[GIT_CACHE]",
87
81
  "--cleanup-dir",
88
82
  "[CLEANUP]/bot_update",
89
- "--rietveld_server",
90
- "https://rietveld.example.com/",
91
83
  "--output_json",
92
84
  "/path/to/tmp/json",
93
85
  "--revision",
@@ -1,4 +1,48 @@
1
1
  [
2
+ {
3
+ "cmd": [
4
+ "python",
5
+ "-u",
6
+ "RECIPE_PACKAGE_REPO[depot_tools]/gerrit_client.py",
7
+ "changes",
8
+ "--host",
9
+ "https://chromium-review.googlesource.com",
10
+ "--json_file",
11
+ "/path/to/tmp/json",
12
+ "--limit",
13
+ "1",
14
+ "-p",
15
+ "change=338811"
16
+ ],
17
+ "env": {
18
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
19
+ },
20
+ "infra_step": true,
21
+ "name": "gerrit get_patch_destination_branch",
22
+ "~followup_annotations": [
23
+ "@@@STEP_LOG_LINE@json.output@[@@@",
24
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
25
+ "@@@STEP_LOG_LINE@json.output@ \"_number\": \"91827\", @@@",
26
+ "@@@STEP_LOG_LINE@json.output@ \"branch\": \"master\", @@@",
27
+ "@@@STEP_LOG_LINE@json.output@ \"change_id\": \"Ideadbeef\", @@@",
28
+ "@@@STEP_LOG_LINE@json.output@ \"created\": \"2017-01-30 13:11:20.000000000\", @@@",
29
+ "@@@STEP_LOG_LINE@json.output@ \"has_review_started\": false, @@@",
30
+ "@@@STEP_LOG_LINE@json.output@ \"project\": \"chromium/src\", @@@",
31
+ "@@@STEP_LOG_LINE@json.output@ \"revisions\": {@@@",
32
+ "@@@STEP_LOG_LINE@json.output@ \"184ebe53805e102605d11f6b143486d15c23a09c\": {@@@",
33
+ "@@@STEP_LOG_LINE@json.output@ \"_number\": \"1\", @@@",
34
+ "@@@STEP_LOG_LINE@json.output@ \"commit\": {@@@",
35
+ "@@@STEP_LOG_LINE@json.output@ \"message\": \"Change commit message\"@@@",
36
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
37
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
38
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
39
+ "@@@STEP_LOG_LINE@json.output@ \"status\": \"NEW\", @@@",
40
+ "@@@STEP_LOG_LINE@json.output@ \"subject\": \"Change title\"@@@",
41
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
42
+ "@@@STEP_LOG_LINE@json.output@]@@@",
43
+ "@@@STEP_LOG_END@json.output@@@"
44
+ ]
45
+ },
2
46
  {
3
47
  "cmd": [
4
48
  "python",
@@ -7,20 +51,25 @@
7
51
  "--spec-path",
8
52
  "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
9
53
  "--patch_root",
10
- "src",
54
+ "src/third_party/angle",
11
55
  "--revision_mapping_file",
12
56
  "{\"got_angle_revision\": \"src/third_party/angle\", \"got_cr_revision\": \"src\", \"got_revision\": \"src\", \"got_v8_revision\": \"src/v8\"}",
13
57
  "--git-cache-dir",
14
58
  "[GIT_CACHE]",
15
59
  "--cleanup-dir",
16
60
  "[CLEANUP]/bot_update",
17
- "--apply_issue_oauth2_file",
18
- "/creds/refresh_tokens/internal-try",
61
+ "--gerrit_repo",
62
+ "https://chromium.googlesource.com/angle/angle",
63
+ "--gerrit_ref",
64
+ "refs/changes/11/338811/3",
19
65
  "--output_json",
20
66
  "/path/to/tmp/json",
21
67
  "--revision",
22
68
  "src@HEAD",
23
- "--disable-syntax-validation"
69
+ "--revision",
70
+ "src/third_party/angle@HEAD",
71
+ "--disable-syntax-validation",
72
+ "--no-apply-patch-on-gclient"
24
73
  ],
25
74
  "env_prefixes": {
26
75
  "PATH": [
@@ -34,7 +83,8 @@
34
83
  "@@@STEP_LOG_LINE@json.output@{@@@",
35
84
  "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
36
85
  "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
37
- "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@",
86
+ "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\", @@@",
87
+ "@@@STEP_LOG_LINE@json.output@ \"src/third_party/angle\": \"HEAD\"@@@",
38
88
  "@@@STEP_LOG_LINE@json.output@ }, @@@",
39
89
  "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
40
90
  "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@",
@@ -51,7 +101,7 @@
51
101
  "@@@STEP_LOG_LINE@json.output@ }@@@",
52
102
  "@@@STEP_LOG_LINE@json.output@ }, @@@",
53
103
  "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
54
- "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src\", @@@",
104
+ "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src/third_party/angle\", @@@",
55
105
  "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
56
106
  "@@@STEP_LOG_LINE@json.output@ \"got_angle_revision\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\", @@@",
57
107
  "@@@STEP_LOG_LINE@json.output@ \"got_angle_revision_cp\": \"refs/heads/master@{#297276}\", @@@",
@@ -107,7 +157,7 @@
107
157
  "--spec-path",
108
158
  "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
109
159
  "--patch_root",
110
- "src",
160
+ "src/third_party/angle",
111
161
  "--revision_mapping_file",
112
162
  "{\"got_angle_revision\": \"src/third_party/angle\", \"got_cr_revision\": \"src\", \"got_revision\": \"src\", \"got_v8_revision\": \"src/v8\"}",
113
163
  "--git-cache-dir",
@@ -117,7 +167,10 @@
117
167
  "--output_json",
118
168
  "/path/to/tmp/json",
119
169
  "--revision",
120
- "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9"
170
+ "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9",
171
+ "--revision",
172
+ "src/third_party/angle@fac9503c46405f77757b9a728eb85b8d7bc6080c",
173
+ "--no-apply-patch-on-gclient"
121
174
  ],
122
175
  "env_prefixes": {
123
176
  "PATH": [
@@ -131,7 +184,8 @@
131
184
  "@@@STEP_LOG_LINE@json.output@{@@@",
132
185
  "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
133
186
  "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
134
- "@@@STEP_LOG_LINE@json.output@ \"src\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
187
+ "@@@STEP_LOG_LINE@json.output@ \"src\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", @@@",
188
+ "@@@STEP_LOG_LINE@json.output@ \"src/third_party/angle\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\"@@@",
135
189
  "@@@STEP_LOG_LINE@json.output@ }, @@@",
136
190
  "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
137
191
  "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@",
@@ -148,7 +202,7 @@
148
202
  "@@@STEP_LOG_LINE@json.output@ }@@@",
149
203
  "@@@STEP_LOG_LINE@json.output@ }, @@@",
150
204
  "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
151
- "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src\", @@@",
205
+ "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src/third_party/angle\", @@@",
152
206
  "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
153
207
  "@@@STEP_LOG_LINE@json.output@ \"got_angle_revision\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\", @@@",
154
208
  "@@@STEP_LOG_LINE@json.output@ \"got_angle_revision_cp\": \"refs/heads/master@{#297276}\", @@@",
@@ -18,7 +18,7 @@
18
18
  "/path/to/tmp/json",
19
19
  "--revision",
20
20
  "src@HEAD",
21
- "--no_shallow",
21
+ "--maybe_shallow",
22
22
  "--disable-syntax-validation"
23
23
  ],
24
24
  "env_prefixes": {
@@ -14,12 +14,6 @@
14
14
  "[GIT_CACHE]",
15
15
  "--cleanup-dir",
16
16
  "[CLEANUP]/bot_update",
17
- "--issue",
18
- "12345",
19
- "--patchset",
20
- "654321",
21
- "--rietveld_server",
22
- "https://rietveld.example.com/",
23
17
  "--output_json",
24
18
  "/path/to/tmp/json",
25
19
  "--revision",
@@ -118,8 +112,6 @@
118
112
  "[GIT_CACHE]",
119
113
  "--cleanup-dir",
120
114
  "[CLEANUP]/bot_update",
121
- "--rietveld_server",
122
- "https://rietveld.example.com/",
123
115
  "--output_json",
124
116
  "/path/to/tmp/json",
125
117
  "--revision",
@@ -14,12 +14,6 @@
14
14
  "[GIT_CACHE]",
15
15
  "--cleanup-dir",
16
16
  "[CLEANUP]/bot_update",
17
- "--issue",
18
- "12345",
19
- "--patchset",
20
- "654321",
21
- "--rietveld_server",
22
- "https://rietveld.example.com/",
23
17
  "--output_json",
24
18
  "/path/to/tmp/json",
25
19
  "--revision",
@@ -118,8 +112,6 @@
118
112
  "[GIT_CACHE]",
119
113
  "--cleanup-dir",
120
114
  "[CLEANUP]/bot_update",
121
- "--rietveld_server",
122
- "https://rietveld.example.com/",
123
115
  "--output_json",
124
116
  "/path/to/tmp/json",
125
117
  "--revision",
@@ -14,12 +14,6 @@
14
14
  "[GIT_CACHE]",
15
15
  "--cleanup-dir",
16
16
  "[CLEANUP]/bot_update",
17
- "--issue",
18
- "12345",
19
- "--patchset",
20
- "654321",
21
- "--rietveld_server",
22
- "https://rietveld.example.com/",
23
17
  "--output_json",
24
18
  "/path/to/tmp/json",
25
19
  "--revision",
@@ -14,12 +14,6 @@
14
14
  "[GIT_CACHE]",
15
15
  "--cleanup-dir",
16
16
  "[CLEANUP]/bot_update",
17
- "--issue",
18
- "12345",
19
- "--patchset",
20
- "654321",
21
- "--rietveld_server",
22
- "https://rietveld.example.com/",
23
17
  "--output_json",
24
18
  "/path/to/tmp/json",
25
19
  "--revision",
@@ -95,7 +89,6 @@
95
89
  "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
96
90
  "@@@STEP_LOG_LINE@json.output@}@@@",
97
91
  "@@@STEP_LOG_END@json.output@@@",
98
- "@@@SET_BUILD_PROPERTY@failure_type@\"PATCH_FAILURE\"@@@",
99
92
  "@@@SET_BUILD_PROPERTY@got_angle_revision@\"fac9503c46405f77757b9a728eb85b8d7bc6080c\"@@@",
100
93
  "@@@SET_BUILD_PROPERTY@got_angle_revision_cp@\"refs/heads/master@{#297276}\"@@@",
101
94
  "@@@SET_BUILD_PROPERTY@got_cr_revision@\"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
@@ -14,12 +14,6 @@
14
14
  "[GIT_CACHE]",
15
15
  "--cleanup-dir",
16
16
  "[CLEANUP]/bot_update",
17
- "--issue",
18
- "12345",
19
- "--patchset",
20
- "654321",
21
- "--rietveld_server",
22
- "https://rietveld.example.com/",
23
17
  "--output_json",
24
18
  "/path/to/tmp/json",
25
19
  "--revision",