libv8 5.6.326.50.0beta1 → 5.7.492.65.0beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -1
  3. data/README.md +1 -0
  4. data/Rakefile +8 -1
  5. data/ext/libv8/arch.rb +5 -5
  6. data/ext/libv8/builder.rb +9 -5
  7. data/lib/libv8/version.rb +1 -1
  8. data/patches/0001-Build-a-standalone-static-library.patch +2 -2
  9. data/patches/0002-Don-t-compile-unnecessary-stuff.patch +11 -7
  10. data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +2 -2
  11. data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +2 -2
  12. data/vendor/depot_tools/.gitignore +1 -0
  13. data/vendor/depot_tools/cbuildbot +1 -1
  14. data/vendor/depot_tools/chrome_set_ver +1 -1
  15. data/vendor/depot_tools/cipd_client_version +1 -1
  16. data/vendor/depot_tools/cit.py +1 -1
  17. data/vendor/depot_tools/cpplint.py +2 -1
  18. data/vendor/depot_tools/cros +1 -1
  19. data/vendor/depot_tools/cros_sdk +1 -1
  20. data/vendor/depot_tools/gclient.py +3 -2
  21. data/vendor/depot_tools/gerrit_util.py +99 -55
  22. data/vendor/depot_tools/git_cache.py +22 -6
  23. data/vendor/depot_tools/git_cl.py +532 -92
  24. data/vendor/depot_tools/git_common.py +3 -1
  25. data/vendor/depot_tools/infra/config/recipes.cfg +21 -8
  26. data/vendor/depot_tools/man/html/depot_tools.html +9 -1
  27. data/vendor/depot_tools/man/html/git-cl.html +1025 -0
  28. data/vendor/depot_tools/man/html/git-squash-branch.html +2 -2
  29. data/vendor/depot_tools/man/html/git-upstream-diff.html +1 -1
  30. data/vendor/depot_tools/man/man1/git-cl.1 +193 -0
  31. data/vendor/depot_tools/man/man1/git-squash-branch.1 +4 -4
  32. data/vendor/depot_tools/man/man1/git-upstream-diff.1 +3 -3
  33. data/vendor/depot_tools/man/man7/depot_tools.7 +8 -3
  34. data/vendor/depot_tools/man/src/_git-cl_desc.helper.txt +1 -0
  35. data/vendor/depot_tools/man/src/git-cl.txt +116 -0
  36. data/vendor/depot_tools/my_activity.py +226 -50
  37. data/vendor/depot_tools/owners.py +50 -25
  38. data/vendor/depot_tools/presubmit_canned_checks.py +3 -0
  39. data/vendor/depot_tools/presubmit_support.py +19 -0
  40. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/OWNERS +0 -0
  41. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/__init__.py +0 -0
  42. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/api.py +14 -11
  43. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/apply_gerrit_ref.json +1 -0
  44. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/basic.json +1 -0
  45. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/basic_output_manifest.json +1 -0
  46. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/basic_with_branch_heads.json +1 -0
  47. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/buildbot.json +1 -0
  48. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/clobber.json +1 -0
  49. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +1 -0
  50. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/gerrit_no_reset.json +1 -0
  51. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/no_shallow.json +1 -0
  52. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/reset_root_solution_revision.json +1 -0
  53. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange.json +1 -0
  54. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2.json +0 -0
  55. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2_buildbot.json +1 -0
  56. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2_json.json +1 -0
  57. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2_json_win.json +1 -0
  58. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob.json +1 -0
  59. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_fail.json +1 -0
  60. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_fail_patch.json +1 -0
  61. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_fail_patch_download.json +2 -0
  62. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_gerrit_angle.json +1 -0
  63. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_gerrit_angle_deprecated.json +1 -0
  64. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_v8.json +1 -0
  65. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_v8_head_by_default.json +1 -0
  66. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.py +0 -0
  67. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/resources/__init__.py +0 -0
  68. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/resources/apply_gerrit.py +0 -0
  69. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/resources/bot_update.py +2 -2
  70. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/test_api.py +0 -0
  71. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/__init__.py +0 -0
  72. data/vendor/depot_tools/recipes/recipe_modules/cipd/api.py +412 -0
  73. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/basic.json +8 -2
  74. data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/basic_pkg.json +405 -0
  75. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/describe-failed.json +0 -0
  76. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/describe-many-instances.json +8 -2
  77. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/mac64.json +8 -2
  78. data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/pkg_bad_file.json +289 -0
  79. data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/pkg_bad_mode.json +289 -0
  80. data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/pkg_bad_verfile.json +289 -0
  81. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/win64.json +21 -15
  82. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.py +101 -20
  83. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/test_api.py +0 -0
  84. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/__init__.py +0 -0
  85. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/api.py +0 -0
  86. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/example.expected/basic.json +0 -0
  87. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/example.expected/win.json +0 -0
  88. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/example.py +0 -0
  89. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/__init__.py +0 -0
  90. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/api.py +12 -10
  91. data/vendor/depot_tools/recipes/recipe_modules/gclient/bundle_extra_paths.txt +4 -0
  92. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/config.py +0 -0
  93. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/basic.json +9 -0
  94. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/buildbot.json +9 -0
  95. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/revision.json +9 -0
  96. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/tryserver.json +9 -0
  97. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.py +0 -0
  98. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/test_api.py +0 -0
  99. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/__init__.py +1 -0
  100. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/api.py +11 -10
  101. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/example.expected/basic.json +2 -0
  102. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/example.py +0 -0
  103. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/test_api.py +0 -0
  104. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/__init__.py +0 -0
  105. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/api.py +8 -7
  106. data/vendor/depot_tools/recipes/recipe_modules/git/bundle_extra_paths.txt +28 -0
  107. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic.json +17 -0
  108. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_branch.json +17 -0
  109. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_file_name.json +17 -0
  110. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_hash.json +17 -0
  111. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_ref.json +17 -0
  112. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_submodule_update_force.json +17 -0
  113. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/can_fail_build.json +12 -0
  114. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/cannot_fail_build.json +17 -0
  115. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/cat-file_test.json +19 -0
  116. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_delta.json +19 -0
  117. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_failed.json +17 -0
  118. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_with_bad_output.json +17 -0
  119. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_with_bad_output_fails_build.json +7 -0
  120. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/curl_trace_file.json +17 -0
  121. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/git-cache-checkout.json +20 -0
  122. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/platform_win.json +18 -0
  123. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/rebase_failed.json +17 -0
  124. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/remote_not_origin.json +17 -0
  125. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/set_got_revision.json +17 -0
  126. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.py +0 -0
  127. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/resources/git_setup.py +0 -0
  128. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/test_api.py +0 -0
  129. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/__init__.py +0 -0
  130. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/api.py +0 -0
  131. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/config.py +0 -0
  132. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/example.expected/basic.json +0 -0
  133. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/example.py +0 -0
  134. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/__init__.py +0 -0
  135. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/api.py +0 -0
  136. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/example.expected/basic.json +11 -0
  137. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/example.py +0 -0
  138. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/resources/gsutil_smart_retry.py +0 -0
  139. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/__init__.py +0 -0
  140. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/api.py +0 -0
  141. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/example.expected/basic.json +1 -2
  142. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +15 -0
  143. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +15 -0
  144. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +15 -0
  145. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_linux.json +15 -0
  146. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_mac.json +15 -0
  147. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_win.json +15 -0
  148. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +15 -0
  149. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +15 -0
  150. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +15 -0
  151. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/example.py +2 -3
  152. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/path_config.py +5 -3
  153. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/__init__.py +1 -0
  154. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/api.py +7 -6
  155. data/vendor/depot_tools/recipes/recipe_modules/presubmit/bundle_extra_paths.txt +30 -0
  156. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/example.expected/basic.json +0 -0
  157. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/example.py +0 -0
  158. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/__init__.py +0 -0
  159. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/api.py +0 -0
  160. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/example.expected/basic.json +0 -0
  161. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/example.expected/buildbot.json +0 -0
  162. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/example.py +0 -0
  163. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/__init__.py +0 -0
  164. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/api.py +0 -0
  165. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/basic_tags.json +0 -0
  166. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/set_failure_hash_with_no_steps.json +0 -0
  167. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_gerrit_patch.json +1 -0
  168. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_gerrit_patch_deprecated.json +1 -0
  169. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_git_patch.json +4 -0
  170. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_git_patch_luci.json +0 -0
  171. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_rietveld_patch.json +4 -2
  172. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_rietveld_patch_new.json +4 -2
  173. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_wrong_patch.json +2 -0
  174. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_wrong_patch_new.json +2 -0
  175. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.py +0 -0
  176. data/vendor/depot_tools/{recipes.py → recipes/recipes.py} +57 -81
  177. data/vendor/depot_tools/roll_dep.py +13 -5
  178. data/vendor/depot_tools/scm.py +7 -0
  179. data/vendor/depot_tools/third_party/upload.py +4 -0
  180. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +3 -39
  181. data/vendor/depot_tools/win_toolchain/package_from_installed.py +159 -114
  182. metadata +144 -133
  183. data/vendor/depot_tools/recipe_modules/cipd/api.py +0 -219
  184. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +0 -16
  185. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +0 -16
  186. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +0 -16
  187. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +0 -16
  188. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +0 -16
  189. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +0 -16
  190. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +0 -16
  191. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +0 -16
  192. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +0 -16
@@ -128,6 +128,11 @@ class Database(object):
128
128
  # Set of files which have already been read.
129
129
  self.read_files = set()
130
130
 
131
+ # Set of files which were included from other files. Files are processed
132
+ # differently depending on whether they are regular owners files or
133
+ # being included from another file.
134
+ self._included_files = {}
135
+
131
136
  def reviewers_for(self, files, author):
132
137
  """Returns a suggested set of reviewers that will cover the files.
133
138
 
@@ -251,48 +256,39 @@ class Database(object):
251
256
  'per-file globs cannot span directories or use escapes: "%s"' %
252
257
  line)
253
258
  relative_glob_string = self.os_path.relpath(full_glob_string, self.root)
254
- self._add_entry(relative_glob_string, directive, 'per-file line',
255
- owners_path, lineno, '\n'.join(comment))
259
+ self._add_entry(relative_glob_string, directive, owners_path,
260
+ lineno, '\n'.join(comment))
256
261
  continue
257
262
 
258
263
  if line.startswith('set '):
259
264
  raise SyntaxErrorInOwnersFile(owners_path, lineno,
260
265
  'unknown option: "%s"' % line[4:].strip())
261
266
 
262
- self._add_entry(dirpath, line, 'line', owners_path, lineno,
267
+ self._add_entry(dirpath, line, owners_path, lineno,
263
268
  ' '.join(comment))
264
269
 
265
- def _add_entry(self, path, directive,
266
- line_type, owners_path, lineno, comment):
270
+ def _add_entry(self, owned_paths, directive, owners_path, lineno, comment):
267
271
  if directive == 'set noparent':
268
- self._stop_looking.add(path)
272
+ self._stop_looking.add(owned_paths)
269
273
  elif directive.startswith('file:'):
270
- owners_file = self._resolve_include(directive[5:], owners_path)
271
- if not owners_file:
274
+ include_file = self._resolve_include(directive[5:], owners_path)
275
+ if not include_file:
272
276
  raise SyntaxErrorInOwnersFile(owners_path, lineno,
273
277
  ('%s does not refer to an existing file.' % directive[5:]))
274
278
 
275
- self._read_owners(owners_file)
276
-
277
- dirpath = self.os_path.dirname(owners_file)
278
- for key in self._owners_to_paths:
279
- if not dirpath in self._owners_to_paths[key]:
280
- continue
281
- self._owners_to_paths[key].add(path)
282
-
283
- if dirpath in self._paths_to_owners:
284
- self._paths_to_owners.setdefault(path, set()).update(
285
- self._paths_to_owners[dirpath])
286
-
279
+ included_owners = self._read_just_the_owners(include_file)
280
+ for owner in included_owners:
281
+ self._owners_to_paths.setdefault(owner, set()).add(owned_paths)
282
+ self._paths_to_owners.setdefault(owned_paths, set()).add(owner)
287
283
  elif self.email_regexp.match(directive) or directive == EVERYONE:
288
284
  self.comments.setdefault(directive, {})
289
- self.comments[directive][path] = comment
290
- self._owners_to_paths.setdefault(directive, set()).add(path)
291
- self._paths_to_owners.setdefault(path, set()).add(directive)
285
+ self.comments[directive][owned_paths] = comment
286
+ self._owners_to_paths.setdefault(directive, set()).add(owned_paths)
287
+ self._paths_to_owners.setdefault(owned_paths, set()).add(directive)
292
288
  else:
293
289
  raise SyntaxErrorInOwnersFile(owners_path, lineno,
294
- ('%s is not a "set" directive, file include, "*", '
295
- 'or an email address: "%s"' % (line_type, directive)))
290
+ ('"%s" is not a "set noparent", file include, "*", '
291
+ 'or an email address.' % (directive,)))
296
292
 
297
293
  def _resolve_include(self, path, start):
298
294
  if path.startswith('//'):
@@ -308,6 +304,35 @@ class Database(object):
308
304
 
309
305
  return include_path
310
306
 
307
+ def _read_just_the_owners(self, include_file):
308
+ if include_file in self._included_files:
309
+ return self._included_files[include_file]
310
+
311
+ owners = set()
312
+ self._included_files[include_file] = owners
313
+ lineno = 0
314
+ for line in self.fopen(self.os_path.join(self.root, include_file)):
315
+ lineno += 1
316
+ line = line.strip()
317
+ if (line.startswith('#') or line == '' or
318
+ line.startswith('set noparent') or
319
+ line.startswith('per-file')):
320
+ continue
321
+
322
+ if self.email_regexp.match(line) or line == EVERYONE:
323
+ owners.add(line)
324
+ continue
325
+ if line.startswith('file:'):
326
+ sub_include_file = self._resolve_include(line[5:], include_file)
327
+ sub_owners = self._read_just_the_owners(sub_include_file)
328
+ owners.update(sub_owners)
329
+ continue
330
+
331
+ raise SyntaxErrorInOwnersFile(include_file, lineno,
332
+ ('"%s" is not a "set noparent", file include, "*", '
333
+ 'or an email address.' % (line,)))
334
+ return owners
335
+
311
336
  def _covering_set_of_owners_for(self, files, author):
312
337
  dirs_remaining = set(self._enclosing_dir_with_owners(f) for f in files)
313
338
  all_possible_owners = self.all_possible_owners(dirs_remaining, author)
@@ -360,6 +360,8 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
360
360
  # superset of CPP_EXCEPTIONS.
361
361
  CPP_FILE_EXTS = ('c', 'cc')
362
362
  CPP_EXCEPTIONS = ('#define', '#endif', '#if', '#include', '#pragma')
363
+ HTML_FILE_EXTS = ('html',)
364
+ HTML_EXCEPTIONS = ('<link',)
363
365
  JAVA_FILE_EXTS = ('java',)
364
366
  JAVA_EXCEPTIONS = ('import ', 'package ')
365
367
  JS_FILE_EXTS = ('js',)
@@ -372,6 +374,7 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
372
374
 
373
375
  LANGUAGE_EXCEPTIONS = [
374
376
  (CPP_FILE_EXTS, CPP_EXCEPTIONS),
377
+ (HTML_FILE_EXTS, HTML_EXCEPTIONS),
375
378
  (JAVA_FILE_EXTS, JAVA_EXCEPTIONS),
376
379
  (JS_FILE_EXTS, JS_EXCEPTIONS),
377
380
  (OBJC_FILE_EXTS, OBJC_EXCEPTIONS),
@@ -584,6 +584,10 @@ class _DiffCache(object):
584
584
  """Get the diff for a particular path."""
585
585
  raise NotImplementedError()
586
586
 
587
+ def GetOldContents(self, path, local_root):
588
+ """Get the old version for a particular path."""
589
+ raise NotImplementedError()
590
+
587
591
 
588
592
  class _GitDiffCache(_DiffCache):
589
593
  """DiffCache implementation for git; gets all file diffs at once."""
@@ -626,6 +630,9 @@ class _GitDiffCache(_DiffCache):
626
630
 
627
631
  return self._diffs_by_file[path]
628
632
 
633
+ def GetOldContents(self, path, local_root):
634
+ return scm.GIT.GetOldContents(local_root, path, branch=self._upstream)
635
+
629
636
 
630
637
  class AffectedFile(object):
631
638
  """Representation of a file in a change."""
@@ -670,6 +677,18 @@ class AffectedFile(object):
670
677
  """An alias to IsTestableFile for backwards compatibility."""
671
678
  return self.IsTestableFile()
672
679
 
680
+ def OldContents(self):
681
+ """Returns an iterator over the lines in the old version of file.
682
+
683
+ The old version is the file before any modifications in the user's
684
+ workspace, i.e. the "left hand side".
685
+
686
+ Contents will be empty if the file is a directory or does not exist.
687
+ Note: The carriage returns (LF or CR) are stripped off.
688
+ """
689
+ return self._diff_cache.GetOldContents(self.LocalPath(),
690
+ self._local_root).splitlines()
691
+
673
692
  def NewContents(self):
674
693
  """Returns an iterator over the lines in the new version of file.
675
694
 
@@ -33,16 +33,17 @@ class BotUpdateApi(recipe_api.RecipeApi):
33
33
  assert isinstance(cmd, (list, tuple))
34
34
  bot_update_path = self.resource('bot_update.py')
35
35
  kwargs.setdefault('infra_step', True)
36
- kwargs.setdefault('env', {})
37
- kwargs['env'].setdefault('PATH', '%(PATH)s')
38
- kwargs['env']['PATH'] = self.m.path.pathsep.join([
39
- kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
36
+ env = self.m.step.get_from_context('env', {})
37
+ env.setdefault('PATH', '%(PATH)s')
38
+ env['PATH'] = self.m.path.pathsep.join([
39
+ env['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
40
40
  # These are to prevent git from hanging. If the git connection is slower
41
41
  # than 1KB/s for more than 5 minutes then git will kill the connection
42
42
  # and die with an error "error: RPC failed; curl 28 Operation too slow"
43
- kwargs['env']['GIT_HTTP_LOW_SPEED_LIMIT'] = 1000
44
- kwargs['env']['GIT_HTTP_LOW_SPEED_TIME'] = 300
45
- return self.m.python(name, bot_update_path, cmd, **kwargs)
43
+ env['GIT_HTTP_LOW_SPEED_LIMIT'] = 1000
44
+ env['GIT_HTTP_LOW_SPEED_TIME'] = 300
45
+ with self.m.step.context({'env': env}):
46
+ return self.m.python(name, bot_update_path, cmd, **kwargs)
46
47
 
47
48
  @property
48
49
  def last_returned_properties(self):
@@ -54,9 +55,10 @@ class BotUpdateApi(recipe_api.RecipeApi):
54
55
  gerrit_no_rebase_patch_ref=False, **kwargs):
55
56
  apply_gerrit_path = self.resource('apply_gerrit.py')
56
57
  kwargs.setdefault('infra_step', True)
57
- kwargs.setdefault('env', {}).setdefault('PATH', '%(PATH)s')
58
- kwargs['env']['PATH'] = self.m.path.pathsep.join([
59
- kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
58
+ env = self.m.step.get_from_context('env', {})
59
+ env.setdefault('PATH', '%(PATH)s')
60
+ env['PATH'] = self.m.path.pathsep.join([
61
+ env['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
60
62
  cmd = [
61
63
  '--gerrit_repo', self._repository,
62
64
  '--gerrit_ref', self._gerrit_ref or '',
@@ -66,7 +68,8 @@ class BotUpdateApi(recipe_api.RecipeApi):
66
68
  cmd.append('--gerrit_no_reset')
67
69
  if gerrit_no_rebase_patch_ref:
68
70
  cmd.append('--gerrit_no_rebase_patch_ref')
69
- return self.m.python('apply_gerrit', apply_gerrit_path, cmd, **kwargs)
71
+ with self.m.step.context({'env': env}):
72
+ return self.m.python('apply_gerrit', apply_gerrit_path, cmd, **kwargs)
70
73
 
71
74
  def ensure_checkout(self, gclient_config=None, suffix=None,
72
75
  patch=True, update_presentation=True,
@@ -16,6 +16,7 @@
16
16
  "env": {
17
17
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
18
18
  },
19
+ "infra_step": true,
19
20
  "name": "apply_gerrit"
20
21
  },
21
22
  {
@@ -22,6 +22,7 @@
22
22
  "GIT_HTTP_LOW_SPEED_TIME": "300",
23
23
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
24
24
  },
25
+ "infra_step": true,
25
26
  "name": "bot_update (without patch)",
26
27
  "~followup_annotations": [
27
28
  "@@@STEP_TEXT@Some step text@@@",
@@ -23,6 +23,7 @@
23
23
  "GIT_HTTP_LOW_SPEED_TIME": "300",
24
24
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
25
25
  },
26
+ "infra_step": true,
26
27
  "name": "bot_update",
27
28
  "~followup_annotations": [
28
29
  "@@@STEP_TEXT@Some step text@@@",
@@ -23,6 +23,7 @@
23
23
  "GIT_HTTP_LOW_SPEED_TIME": "300",
24
24
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
25
25
  },
26
+ "infra_step": true,
26
27
  "name": "bot_update - with branch heads",
27
28
  "~followup_annotations": [
28
29
  "@@@STEP_TEXT@Some step text@@@",
@@ -22,6 +22,7 @@
22
22
  "GIT_HTTP_LOW_SPEED_TIME": "300",
23
23
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
24
24
  },
25
+ "infra_step": true,
25
26
  "name": "bot_update (without patch)",
26
27
  "~followup_annotations": [
27
28
  "@@@STEP_TEXT@Some step text@@@",
@@ -23,6 +23,7 @@
23
23
  "GIT_HTTP_LOW_SPEED_TIME": "300",
24
24
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
25
25
  },
26
+ "infra_step": true,
26
27
  "name": "bot_update",
27
28
  "~followup_annotations": [
28
29
  "@@@STEP_TEXT@Some step text@@@",
@@ -23,6 +23,7 @@
23
23
  "GIT_HTTP_LOW_SPEED_TIME": "300",
24
24
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
25
25
  },
26
+ "infra_step": true,
26
27
  "name": "bot_update",
27
28
  "~followup_annotations": [
28
29
  "@@@STEP_TEXT@Some step text@@@",
@@ -23,6 +23,7 @@
23
23
  "GIT_HTTP_LOW_SPEED_TIME": "300",
24
24
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
25
25
  },
26
+ "infra_step": true,
26
27
  "name": "bot_update",
27
28
  "~followup_annotations": [
28
29
  "@@@STEP_TEXT@Some step text@@@",
@@ -23,6 +23,7 @@
23
23
  "GIT_HTTP_LOW_SPEED_TIME": "300",
24
24
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
25
25
  },
26
+ "infra_step": true,
26
27
  "name": "bot_update",
27
28
  "~followup_annotations": [
28
29
  "@@@STEP_TEXT@Some step text@@@",
@@ -22,6 +22,7 @@
22
22
  "GIT_HTTP_LOW_SPEED_TIME": "300",
23
23
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
24
24
  },
25
+ "infra_step": true,
25
26
  "name": "bot_update",
26
27
  "~followup_annotations": [
27
28
  "@@@STEP_TEXT@Some step text@@@",
@@ -24,6 +24,7 @@
24
24
  "GIT_HTTP_LOW_SPEED_TIME": "300",
25
25
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
26
26
  },
27
+ "infra_step": true,
27
28
  "name": "bot_update",
28
29
  "~followup_annotations": [
29
30
  "@@@STEP_TEXT@Some step text@@@",
@@ -26,6 +26,7 @@
26
26
  "GIT_HTTP_LOW_SPEED_TIME": "300",
27
27
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
28
28
  },
29
+ "infra_step": true,
29
30
  "name": "bot_update",
30
31
  "~followup_annotations": [
31
32
  "@@@STEP_TEXT@Some step text@@@",
@@ -24,6 +24,7 @@
24
24
  "GIT_HTTP_LOW_SPEED_TIME": "300",
25
25
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
26
26
  },
27
+ "infra_step": true,
27
28
  "name": "bot_update",
28
29
  "~followup_annotations": [
29
30
  "@@@STEP_TEXT@Some step text@@@",
@@ -24,6 +24,7 @@
24
24
  "GIT_HTTP_LOW_SPEED_TIME": "300",
25
25
  "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]"
26
26
  },
27
+ "infra_step": true,
27
28
  "name": "bot_update",
28
29
  "~followup_annotations": [
29
30
  "@@@STEP_TEXT@Some step text@@@",
@@ -28,6 +28,7 @@
28
28
  "GIT_HTTP_LOW_SPEED_TIME": "300",
29
29
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
30
30
  },
31
+ "infra_step": true,
31
32
  "name": "bot_update",
32
33
  "~followup_annotations": [
33
34
  "@@@STEP_TEXT@Some step text@@@",
@@ -28,6 +28,7 @@
28
28
  "GIT_HTTP_LOW_SPEED_TIME": "300",
29
29
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
30
30
  },
31
+ "infra_step": true,
31
32
  "name": "bot_update",
32
33
  "~followup_annotations": [
33
34
  "step returned non-zero exit code: 1",
@@ -28,6 +28,7 @@
28
28
  "GIT_HTTP_LOW_SPEED_TIME": "300",
29
29
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
30
30
  },
31
+ "infra_step": true,
31
32
  "name": "bot_update",
32
33
  "~followup_annotations": [
33
34
  "@@@STEP_TEXT@Some step text@@@",
@@ -28,6 +28,7 @@
28
28
  "GIT_HTTP_LOW_SPEED_TIME": "300",
29
29
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
30
30
  },
31
+ "infra_step": true,
31
32
  "name": "bot_update",
32
33
  "~followup_annotations": [
33
34
  "@@@STEP_TEXT@Some step text@@@",
@@ -65,6 +66,7 @@
65
66
  "-u",
66
67
  "import sys;print \"Patch download failed. See bot_update step for details\";sys.exit(1)"
67
68
  ],
69
+ "infra_step": true,
68
70
  "name": "Patch failure - Try Rebasing",
69
71
  "~followup_annotations": [
70
72
  "step returned non-zero exit code: 1",
@@ -28,6 +28,7 @@
28
28
  "GIT_HTTP_LOW_SPEED_TIME": "300",
29
29
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
30
30
  },
31
+ "infra_step": true,
31
32
  "name": "bot_update",
32
33
  "~followup_annotations": [
33
34
  "@@@STEP_TEXT@Some step text@@@",
@@ -28,6 +28,7 @@
28
28
  "GIT_HTTP_LOW_SPEED_TIME": "300",
29
29
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
30
30
  },
31
+ "infra_step": true,
31
32
  "name": "bot_update",
32
33
  "~followup_annotations": [
33
34
  "@@@STEP_TEXT@Some step text@@@",
@@ -30,6 +30,7 @@
30
30
  "GIT_HTTP_LOW_SPEED_TIME": "300",
31
31
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
32
32
  },
33
+ "infra_step": true,
33
34
  "name": "bot_update",
34
35
  "~followup_annotations": [
35
36
  "@@@STEP_TEXT@Some step text@@@",
@@ -30,6 +30,7 @@
30
30
  "GIT_HTTP_LOW_SPEED_TIME": "300",
31
31
  "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
32
32
  },
33
+ "infra_step": true,
33
34
  "name": "bot_update",
34
35
  "~followup_annotations": [
35
36
  "@@@STEP_TEXT@Some step text@@@",
@@ -38,7 +38,7 @@ BUILDER_DIR = path.dirname(CURRENT_DIR)
38
38
  # Relative to this script's filesystem path.
39
39
  THIS_DIR = path.dirname(path.abspath(__file__))
40
40
 
41
- DEPOT_TOOLS_DIR = path.abspath(path.join(THIS_DIR, '..', '..', '..'))
41
+ DEPOT_TOOLS_DIR = path.abspath(path.join(THIS_DIR, '..', '..', '..', '..'))
42
42
 
43
43
  CHROMIUM_GIT_HOST = 'https://chromium.googlesource.com'
44
44
  CHROMIUM_SRC_URL = CHROMIUM_GIT_HOST + '/chromium/src.git'
@@ -679,7 +679,7 @@ def apply_gerrit_ref(gerrit_repo, gerrit_ref, root, gerrit_reset,
679
679
  ok = False
680
680
  git('checkout', '-b', temp_branch_name, cwd=root)
681
681
  try:
682
- git('rebase', base_rev, cwd=root)
682
+ git('rebase', base_rev, cwd=root, tries=1)
683
683
  except SubprocessFailed:
684
684
  # Abort the rebase since there were failures.
685
685
  git('rebase', '--abort', cwd=root)