libv8 5.7.492.65.1 → 5.9.211.38.0beta0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (297) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +8 -2
  4. data/CHANGELOG.md +4 -0
  5. data/README.md +4 -3
  6. data/Rakefile +27 -10
  7. data/ext/libv8/builder.rb +4 -0
  8. data/lib/libv8/version.rb +1 -1
  9. data/libv8.gemspec +1 -1
  10. data/patches/0001-Build-a-standalone-static-library.patch +5 -5
  11. data/patches/0002-Don-t-compile-unnecessary-stuff.patch +20 -24
  12. data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +5 -5
  13. data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +5 -5
  14. data/patches/0005-Fix-GCC-7-build-errors.patch +147 -0
  15. data/scaleway.png +0 -0
  16. data/vendor/depot_tools/.gitattributes +52 -0
  17. data/vendor/depot_tools/.gitignore +10 -0
  18. data/vendor/depot_tools/README.md +7 -3
  19. data/vendor/depot_tools/apply_issue.bat +4 -3
  20. data/vendor/depot_tools/apply_issue.py +0 -10
  21. data/vendor/depot_tools/autoninja +12 -0
  22. data/vendor/depot_tools/autoninja.bat +9 -0
  23. data/vendor/depot_tools/autoninja.py +70 -0
  24. data/vendor/depot_tools/bootstrap/win/README.md +108 -26
  25. data/vendor/depot_tools/bootstrap/win/git-bash.template.sh +3 -3
  26. data/vendor/depot_tools/bootstrap/win/git.template.bat +2 -2
  27. data/vendor/depot_tools/bootstrap/win/manifest.txt +18 -0
  28. data/vendor/depot_tools/bootstrap/win/manifest_bleeding_edge.txt +18 -0
  29. data/vendor/depot_tools/bootstrap/win/python27.new.bat +49 -0
  30. data/vendor/depot_tools/bootstrap/win/win_tools.bat +55 -59
  31. data/vendor/depot_tools/bootstrap/win/win_tools.py +335 -0
  32. data/vendor/depot_tools/cipd +16 -2
  33. data/vendor/depot_tools/cipd.bat +20 -2
  34. data/vendor/depot_tools/cipd.ps1 +36 -22
  35. data/vendor/depot_tools/cipd_bin_setup.bat +6 -0
  36. data/vendor/depot_tools/cipd_bin_setup.sh +10 -0
  37. data/vendor/depot_tools/cipd_client_version +1 -1
  38. data/vendor/depot_tools/cipd_manifest.txt +9 -0
  39. data/vendor/depot_tools/cit.bat +12 -11
  40. data/vendor/depot_tools/clang-format.bat +4 -3
  41. data/vendor/depot_tools/clang_format_merge_driver.bat +12 -11
  42. data/vendor/depot_tools/commit_queue.bat +4 -3
  43. data/vendor/depot_tools/cpplint.bat +9 -3
  44. data/vendor/depot_tools/cpplint.py +3 -3
  45. data/vendor/depot_tools/depot-tools-auth.bat +4 -3
  46. data/vendor/depot_tools/download_from_google_storage.bat +5 -3
  47. data/vendor/depot_tools/download_from_google_storage.py +6 -1
  48. data/vendor/depot_tools/fetch.bat +5 -4
  49. data/vendor/depot_tools/fetch.py +4 -5
  50. data/vendor/depot_tools/gclient-new-workdir.py +82 -46
  51. data/vendor/depot_tools/gclient.bat +5 -4
  52. data/vendor/depot_tools/gclient.py +713 -319
  53. data/vendor/depot_tools/gclient_eval.py +284 -0
  54. data/vendor/depot_tools/gclient_utils.py +70 -4
  55. data/vendor/depot_tools/gerrit_client.py +26 -1
  56. data/vendor/depot_tools/gerrit_util.py +120 -127
  57. data/vendor/depot_tools/git-crrev-parse +1 -0
  58. data/vendor/depot_tools/git-gs +1 -1
  59. data/vendor/depot_tools/git_cl.py +731 -415
  60. data/vendor/depot_tools/git_common.py +23 -3
  61. data/vendor/depot_tools/git_drover.py +10 -1
  62. data/vendor/depot_tools/git_footers.py +62 -22
  63. data/vendor/depot_tools/git_hyper_blame.py +3 -2
  64. data/vendor/depot_tools/git_map.py +30 -3
  65. data/vendor/depot_tools/git_map_branches.py +18 -4
  66. data/vendor/depot_tools/git_number.py +8 -2
  67. data/vendor/depot_tools/git_retry.py +21 -0
  68. data/vendor/depot_tools/gn.bat +4 -3
  69. data/vendor/depot_tools/infra/config/cq.cfg +1 -5
  70. data/vendor/depot_tools/infra/config/recipes.cfg +18 -16
  71. data/vendor/depot_tools/led +12 -0
  72. data/vendor/depot_tools/led.bat +7 -0
  73. data/vendor/depot_tools/man/html/git-cl.html +9 -1
  74. data/vendor/depot_tools/man/html/git-drover.html +22 -18
  75. data/vendor/depot_tools/man/man1/git-cl.1 +8 -3
  76. data/vendor/depot_tools/man/man1/git-drover.1 +22 -20
  77. data/vendor/depot_tools/man/src/git-cl.txt +3 -0
  78. data/vendor/depot_tools/man/src/git-drover.txt +8 -0
  79. data/vendor/depot_tools/my_activity.py +8 -5
  80. data/vendor/depot_tools/owners.py +103 -11
  81. data/vendor/depot_tools/owners_finder.py +14 -2
  82. data/vendor/depot_tools/presubmit_canned_checks.py +25 -67
  83. data/vendor/depot_tools/presubmit_support.py +87 -35
  84. data/vendor/depot_tools/recipes/OWNERS +2 -0
  85. data/vendor/depot_tools/recipes/README.recipes.md +842 -0
  86. data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +5 -3
  87. data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +181 -60
  88. data/vendor/depot_tools/recipes/recipe_modules/bot_update/{example.expected → examples/full.expected}/apply_gerrit_ref.json +4 -2
  89. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic.json +82 -0
  90. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json +149 -0
  91. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/buildbot.json +82 -0
  92. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json +149 -0
  93. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +122 -0
  94. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json +149 -0
  95. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json +149 -0
  96. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_shallow.json +149 -0
  97. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json +148 -0
  98. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange.json +150 -0
  99. data/vendor/depot_tools/recipes/recipe_modules/bot_update/{example.expected → examples/full.expected}/trychange_oauth2.json +0 -0
  100. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_buildbot.json +152 -0
  101. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json.json +150 -0
  102. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json_win.json +150 -0
  103. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob.json +156 -0
  104. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +91 -0
  105. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +118 -0
  106. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +118 -0
  107. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json +202 -0
  108. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle_deprecated.json +158 -0
  109. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json +196 -0
  110. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8.json +202 -0
  111. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json +202 -0
  112. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +162 -0
  113. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +162 -0
  114. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json +149 -0
  115. data/vendor/depot_tools/recipes/recipe_modules/bot_update/{example.py → examples/full.py} +46 -8
  116. data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/bot_update.py +139 -133
  117. data/vendor/depot_tools/recipes/recipe_modules/bot_update/test_api.py +25 -13
  118. data/vendor/depot_tools/recipes/recipe_modules/cipd/api.py +40 -9
  119. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/basic.json +0 -0
  120. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/basic_pkg.json +1 -1
  121. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/describe-failed.json +0 -0
  122. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/describe-many-instances.json +0 -0
  123. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/mac64.json +0 -0
  124. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/pkg_bad_file.json +1 -1
  125. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/pkg_bad_mode.json +0 -0
  126. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/pkg_bad_verfile.json +0 -0
  127. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/win64.json +0 -0
  128. data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.py → examples/full.py} +1 -0
  129. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk arch.json +7 -0
  130. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk bits.json +7 -0
  131. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_32.json +14 -0
  132. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_64.json +14 -0
  133. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_32.json +14 -0
  134. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_64.json +14 -0
  135. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_mips_64.json +14 -0
  136. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/mac_intel_64.json +14 -0
  137. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_32.json +14 -0
  138. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_64.json +14 -0
  139. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.py +59 -0
  140. data/vendor/depot_tools/recipes/recipe_modules/depot_tools/api.py +5 -0
  141. data/vendor/depot_tools/recipes/recipe_modules/depot_tools/{example.expected → examples/full.expected}/basic.json +7 -0
  142. data/vendor/depot_tools/recipes/recipe_modules/depot_tools/{example.expected → examples/full.expected}/win.json +7 -0
  143. data/vendor/depot_tools/recipes/recipe_modules/depot_tools/{example.py → examples/full.py} +2 -0
  144. data/vendor/depot_tools/recipes/recipe_modules/gclient/__init__.py +1 -4
  145. data/vendor/depot_tools/recipes/recipe_modules/gclient/api.py +28 -14
  146. data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +10 -235
  147. data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.expected → examples/full.expected}/basic.json +9 -9
  148. data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.expected → examples/full.expected}/buildbot.json +9 -9
  149. data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.expected → examples/full.expected}/revision.json +9 -9
  150. data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.expected → examples/full.expected}/tryserver.json +9 -9
  151. data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.py → examples/full.py} +5 -21
  152. data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/patch_project.py +45 -0
  153. data/vendor/depot_tools/recipes/recipe_modules/gerrit/__init__.py +1 -0
  154. data/vendor/depot_tools/recipes/recipe_modules/gerrit/api.py +97 -2
  155. data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +283 -0
  156. data/vendor/depot_tools/recipes/recipe_modules/gerrit/{example.py → examples/full.py} +31 -2
  157. data/vendor/depot_tools/recipes/recipe_modules/gerrit/test_api.py +30 -1
  158. data/vendor/depot_tools/recipes/recipe_modules/git/__init__.py +1 -4
  159. data/vendor/depot_tools/recipes/recipe_modules/git/api.py +7 -35
  160. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic.json +3 -3
  161. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_branch.json +3 -3
  162. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_file_name.json +3 -3
  163. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_hash.json +3 -3
  164. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_ref.json +3 -3
  165. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_submodule_update_force.json +3 -3
  166. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/can_fail_build.json +1 -1
  167. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/cannot_fail_build.json +3 -3
  168. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/cat-file_test.json +3 -3
  169. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/count-objects_delta.json +3 -3
  170. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/count-objects_failed.json +3 -3
  171. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/count-objects_with_bad_output.json +3 -3
  172. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/count-objects_with_bad_output_fails_build.json +1 -1
  173. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/curl_trace_file.json +3 -3
  174. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/git-cache-checkout.json +6 -6
  175. data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/platform_win.json +223 -0
  176. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/rebase_failed.json +3 -3
  177. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/remote_not_origin.json +3 -3
  178. data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/set_got_revision.json +3 -3
  179. data/vendor/depot_tools/recipes/recipe_modules/git/{example.py → examples/full.py} +2 -1
  180. data/vendor/depot_tools/recipes/recipe_modules/git/resources/git_setup.py +12 -21
  181. data/vendor/depot_tools/recipes/recipe_modules/git_cl/__init__.py +1 -4
  182. data/vendor/depot_tools/recipes/recipe_modules/git_cl/api.py +13 -11
  183. data/vendor/depot_tools/recipes/recipe_modules/git_cl/{example.expected → examples/full.expected}/basic.json +0 -0
  184. data/vendor/depot_tools/recipes/recipe_modules/git_cl/{example.py → examples/full.py} +4 -2
  185. data/vendor/depot_tools/recipes/recipe_modules/gitiles/OWNERS +3 -0
  186. data/vendor/depot_tools/recipes/recipe_modules/gitiles/__init__.py +7 -0
  187. data/vendor/depot_tools/recipes/recipe_modules/gitiles/api.py +135 -0
  188. data/vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.expected/basic.json +537 -0
  189. data/vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py +61 -0
  190. data/vendor/depot_tools/recipes/recipe_modules/gitiles/resources/gerrit_client.py +192 -0
  191. data/vendor/depot_tools/recipes/recipe_modules/gitiles/test_api.py +95 -0
  192. data/vendor/depot_tools/recipes/recipe_modules/gsutil/{example.expected → examples/full.expected}/basic.json +0 -0
  193. data/vendor/depot_tools/recipes/recipe_modules/gsutil/{example.py → examples/full.py} +0 -0
  194. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/__init__.py +0 -3
  195. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/basic.json +3 -2
  196. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_buildbot_linux.json +3 -2
  197. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_buildbot_mac.json +3 -2
  198. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_buildbot_win.json +3 -2
  199. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_generic_linux.json +3 -2
  200. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_generic_mac.json +3 -2
  201. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_generic_win.json +16 -0
  202. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_kitchen_linux.json +16 -0
  203. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_kitchen_mac.json +16 -0
  204. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_kitchen_win.json +16 -0
  205. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.py → examples/full.py} +2 -1
  206. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/path_config.py +12 -3
  207. data/vendor/depot_tools/recipes/recipe_modules/presubmit/__init__.py +1 -0
  208. data/vendor/depot_tools/recipes/recipe_modules/presubmit/api.py +2 -2
  209. data/vendor/depot_tools/recipes/recipe_modules/presubmit/{example.expected → examples/full.expected}/basic.json +1 -1
  210. data/vendor/depot_tools/recipes/recipe_modules/presubmit/{example.py → examples/full.py} +0 -0
  211. data/vendor/depot_tools/recipes/recipe_modules/rietveld/__init__.py +0 -4
  212. data/vendor/depot_tools/recipes/recipe_modules/rietveld/{example.expected → examples/full.expected}/basic.json +0 -0
  213. data/vendor/depot_tools/recipes/recipe_modules/rietveld/{example.expected → examples/full.expected}/buildbot.json +0 -0
  214. data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/no_auth.json +27 -0
  215. data/vendor/depot_tools/recipes/recipe_modules/rietveld/{example.py → examples/full.py} +9 -1
  216. data/vendor/depot_tools/recipes/recipe_modules/tryserver/__init__.py +3 -5
  217. data/vendor/depot_tools/recipes/recipe_modules/tryserver/api.py +21 -96
  218. data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/basic_tags.json +0 -0
  219. data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/set_failure_hash_with_no_steps.json +0 -0
  220. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json +56 -0
  221. data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected/with_gerrit_patch_deprecated.json → examples/full.expected/with_git_patch.json} +2 -2
  222. data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected/with_gerrit_patch.json → examples/full.expected/with_git_patch_luci.json} +2 -2
  223. data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/with_rietveld_patch.json +0 -20
  224. data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/with_rietveld_patch_new.json +0 -20
  225. data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/with_wrong_patch.json +1 -13
  226. data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/with_wrong_patch_new.json +1 -13
  227. data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.py → examples/full.py} +3 -17
  228. data/vendor/depot_tools/recipes/recipes.py +141 -96
  229. data/vendor/depot_tools/rietveld.py +8 -1
  230. data/vendor/depot_tools/roll-dep-svn.bat +12 -10
  231. data/vendor/depot_tools/roll-dep.bat +5 -3
  232. data/vendor/depot_tools/scm.py +8 -1
  233. data/vendor/depot_tools/setup_color.py +0 -0
  234. data/vendor/depot_tools/split_cl.py +193 -0
  235. data/vendor/depot_tools/third_party/schema/.editorconfig +15 -0
  236. data/vendor/depot_tools/third_party/schema/.gitignore +174 -0
  237. data/vendor/depot_tools/third_party/schema/.travis.yml +37 -0
  238. data/vendor/depot_tools/third_party/schema/LICENSE-MIT +19 -0
  239. data/vendor/depot_tools/third_party/schema/MANIFEST.in +1 -0
  240. data/vendor/depot_tools/third_party/schema/README.chromium +12 -0
  241. data/vendor/depot_tools/third_party/schema/README.rst +382 -0
  242. data/vendor/depot_tools/third_party/schema/__init__.py +1 -0
  243. data/vendor/depot_tools/third_party/schema/schema.py +338 -0
  244. data/vendor/depot_tools/third_party/schema/setup.cfg +5 -0
  245. data/vendor/depot_tools/third_party/schema/setup.py +30 -0
  246. data/vendor/depot_tools/third_party/schema/test_schema.py +556 -0
  247. data/vendor/depot_tools/third_party/schema/tox.ini +33 -0
  248. data/vendor/depot_tools/third_party/upload.py +4 -0
  249. data/vendor/depot_tools/update_depot_tools +4 -16
  250. data/vendor/depot_tools/update_depot_tools.bat +4 -17
  251. data/vendor/depot_tools/update_depot_tools_toggle.py +38 -0
  252. data/vendor/depot_tools/vpython +12 -0
  253. data/vendor/depot_tools/vpython.bat +7 -0
  254. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +17 -5
  255. data/vendor/depot_tools/win_toolchain/package_from_installed.py +63 -33
  256. metadata +161 -113
  257. data/vendor/depot_tools/bootstrap/gclient.bat +0 -22
  258. data/vendor/depot_tools/bootstrap/win/get_file.js +0 -119
  259. data/vendor/depot_tools/bootstrap/win/git_bootstrap.py +0 -193
  260. data/vendor/depot_tools/bootstrap/win/git_version.txt +0 -1
  261. data/vendor/depot_tools/bootstrap/win/git_version_bleeding_edge.txt +0 -1
  262. data/vendor/depot_tools/bootstrap/win/python276.new.bat +0 -8
  263. data/vendor/depot_tools/bootstrap/win/svn.new.bat +0 -4
  264. data/vendor/depot_tools/bootstrap/win/svnversion.new.bat +0 -4
  265. data/vendor/depot_tools/bootstrap/win/unzip.js +0 -91
  266. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/basic.json +0 -53
  267. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/basic_output_manifest.json +0 -60
  268. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +0 -54
  269. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/buildbot.json +0 -53
  270. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/clobber.json +0 -54
  271. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +0 -54
  272. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +0 -54
  273. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/no_shallow.json +0 -54
  274. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +0 -53
  275. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/trychange.json +0 -55
  276. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/trychange_oauth2_buildbot.json +0 -57
  277. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/trychange_oauth2_json.json +0 -55
  278. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/trychange_oauth2_json_win.json +0 -55
  279. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob.json +0 -59
  280. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_fail.json +0 -62
  281. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +0 -83
  282. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +0 -84
  283. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +0 -60
  284. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle_deprecated.json +0 -60
  285. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_v8.json +0 -62
  286. data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +0 -62
  287. data/vendor/depot_tools/recipes/recipe_modules/gclient/bundle_extra_paths.txt +0 -4
  288. data/vendor/depot_tools/recipes/recipe_modules/gerrit/example.expected/basic.json +0 -66
  289. data/vendor/depot_tools/recipes/recipe_modules/git/bundle_extra_paths.txt +0 -28
  290. data/vendor/depot_tools/recipes/recipe_modules/git/example.expected/platform_win.json +0 -237
  291. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_win.json +0 -15
  292. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +0 -15
  293. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +0 -15
  294. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +0 -15
  295. data/vendor/depot_tools/recipes/recipe_modules/presubmit/bundle_extra_paths.txt +0 -30
  296. data/vendor/depot_tools/recipes/recipe_modules/tryserver/example.expected/with_git_patch.json +0 -109
  297. data/vendor/depot_tools/recipes/recipe_modules/tryserver/example.expected/with_git_patch_luci.json +0 -8
@@ -5,6 +5,7 @@
5
5
  DEPS = [
6
6
  'bot_update',
7
7
  'gclient',
8
+ 'gerrit',
8
9
  'recipe_engine/path',
9
10
  'recipe_engine/platform',
10
11
  'recipe_engine/properties',
@@ -20,15 +21,23 @@ def RunSteps(api):
20
21
  soln.revision = api.properties.get('revision')
21
22
  api.gclient.c = src_cfg
22
23
  api.gclient.c.revisions.update(api.properties.get('revisions', {}))
23
- api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision'
24
+ if api.properties.get('deprecated_got_revision_mapping'):
25
+ api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision'
26
+ else:
27
+ api.gclient.c.got_revision_reverse_mapping['got_cr_revision'] = 'src'
28
+ api.gclient.c.got_revision_reverse_mapping['got_revision'] = 'src'
29
+ api.gclient.c.got_revision_reverse_mapping['got_v8_revision'] = 'src/v8'
30
+ api.gclient.c.got_revision_reverse_mapping['got_angle_revision'] = (
31
+ 'src/third_party/angle')
24
32
  api.gclient.c.patch_projects['v8'] = ('src/v8', 'HEAD')
33
+ api.gclient.c.patch_projects['v8/v8'] = ('src/v8', 'HEAD')
25
34
  api.gclient.c.patch_projects['angle/angle'] = ('src/third_party/angle',
26
35
  'HEAD')
27
36
  patch = api.properties.get('patch', True)
28
37
  clobber = True if api.properties.get('clobber') else False
29
38
  no_shallow = True if api.properties.get('no_shallow') else False
30
- output_manifest = api.properties.get('output_manifest', False)
31
39
  with_branch_heads = api.properties.get('with_branch_heads', False)
40
+ with_tags = api.properties.get('with_tags', False)
32
41
  refs = api.properties.get('refs', [])
33
42
  oauth2 = api.properties.get('oauth2', False)
34
43
  oauth2_json = api.properties.get('oauth2_json', False)
@@ -44,18 +53,21 @@ def RunSteps(api):
44
53
  gerrit_no_reset=gerrit_no_reset,
45
54
  gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref)
46
55
  else:
47
- api.bot_update.ensure_checkout(
56
+ bot_update_step = api.bot_update.ensure_checkout(
48
57
  no_shallow=no_shallow,
49
58
  patch=patch,
50
59
  with_branch_heads=with_branch_heads,
51
- output_manifest=output_manifest,
60
+ with_tags=with_tags,
52
61
  refs=refs, patch_oauth2=oauth2,
53
62
  oauth2_json=oauth2_json,
54
63
  clobber=clobber,
55
64
  root_solution_revision=root_solution_revision,
56
65
  suffix=suffix,
57
66
  gerrit_no_reset=gerrit_no_reset,
58
- gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref)
67
+ gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref,
68
+ disable_syntax_validation=True)
69
+ if patch:
70
+ api.bot_update.deapply_patch(bot_update_step)
59
71
 
60
72
 
61
73
  def GenTests(api):
@@ -72,14 +84,18 @@ def GenTests(api):
72
84
  with_branch_heads=True,
73
85
  suffix='with branch heads'
74
86
  )
75
- yield api.test('basic_output_manifest') + api.properties(
76
- output_manifest=True,
77
- )
87
+ yield api.test('with_tags') + api.properties(with_tags=True)
78
88
  yield api.test('tryjob') + api.properties(
79
89
  issue=12345,
80
90
  patchset=654321,
81
91
  rietveld='https://rietveld.example.com/',
82
92
  )
93
+ yield api.test('deprecated_got_revision_mapping') + api.properties(
94
+ deprecated_got_revision_mapping=True,
95
+ issue=12345,
96
+ patchset=654321,
97
+ rietveld='https://rietveld.example.com/',
98
+ )
83
99
  yield api.test('trychange') + api.properties(
84
100
  refs=['+refs/change/1/2/333'],
85
101
  )
@@ -155,6 +171,28 @@ def GenTests(api):
155
171
  patch_issue=338811,
156
172
  patch_set=3,
157
173
  )
174
+ yield api.test('tryjob_gerrit_v8') + api.properties.tryserver(
175
+ gerrit_project='v8/v8',
176
+ patch_issue=338811,
177
+ patch_set=3,
178
+ )
179
+ yield api.test('tryjob_gerrit_v8_feature_branch') + api.properties.tryserver(
180
+ gerrit_project='v8/v8',
181
+ patch_issue=338811,
182
+ patch_set=3,
183
+ ) + api.step_data(
184
+ 'gerrit get_patch_destination_branch',
185
+ api.gerrit.get_one_change_response_data(branch='experimental/feature'),
186
+ )
187
+ yield api.test('tryjob_gerrit_feature_branch') + api.properties.tryserver(
188
+ buildername='feature_rel',
189
+ gerrit_project='chromium/src',
190
+ patch_issue=338811,
191
+ patch_set=3,
192
+ ) + api.step_data(
193
+ 'gerrit get_patch_destination_branch',
194
+ api.gerrit.get_one_change_response_data(branch='experimental/feature'),
195
+ )
158
196
  yield api.test('tryjob_gerrit_angle_deprecated') + api.properties.tryserver(
159
197
  patch_project='angle/angle',
160
198
  gerrit='https://chromium-review.googlesource.com',
@@ -31,10 +31,6 @@ BUF_SIZE = 256
31
31
 
32
32
 
33
33
  # Define a bunch of directory paths.
34
- # Relative to the current working directory.
35
- CURRENT_DIR = path.abspath(os.getcwd())
36
- BUILDER_DIR = path.dirname(CURRENT_DIR)
37
-
38
34
  # Relative to this script's filesystem path.
39
35
  THIS_DIR = path.dirname(path.abspath(__file__))
40
36
 
@@ -44,9 +40,10 @@ CHROMIUM_GIT_HOST = 'https://chromium.googlesource.com'
44
40
  CHROMIUM_SRC_URL = CHROMIUM_GIT_HOST + '/chromium/src.git'
45
41
 
46
42
  BRANCH_HEADS_REFSPEC = '+refs/branch-heads/*'
43
+ TAGS_REFSPEC = '+refs/tags/*'
47
44
 
48
45
  # Regular expression that matches a single commit footer line.
49
- COMMIT_FOOTER_ENTRY_RE = re.compile(r'([^:]+):\s+(.+)')
46
+ COMMIT_FOOTER_ENTRY_RE = re.compile(r'([^:]+):\s*(.*)')
50
47
 
51
48
  # Footer metadata keys for regular and gsubtreed mirrored commit positions.
52
49
  COMMIT_POSITION_FOOTER_KEY = 'Cr-Commit-Position'
@@ -59,13 +56,13 @@ REVINFO_RE = re.compile(r'^([^:]+):\s+([^@]+)@(.+)$')
59
56
  # Copied from scripts/recipes/chromium.py.
60
57
  GOT_REVISION_MAPPINGS = {
61
58
  CHROMIUM_SRC_URL: {
62
- 'src/': 'got_revision',
63
- 'src/native_client/': 'got_nacl_revision',
64
- 'src/tools/swarm_client/': 'got_swarm_client_revision',
65
- 'src/tools/swarming_client/': 'got_swarming_client_revision',
66
- 'src/third_party/WebKit/': 'got_webkit_revision',
67
- 'src/third_party/webrtc/': 'got_webrtc_revision',
68
- 'src/v8/': 'got_v8_revision',
59
+ 'got_revision': 'src/',
60
+ 'got_nacl_revision': 'src/native_client/',
61
+ 'got_swarm_client_revision': 'src/tools/swarm_client/',
62
+ 'got_swarming_client_revision': 'src/tools/swarming_client/',
63
+ 'got_v8_revision': 'src/v8/',
64
+ 'got_webkit_revision': 'src/third_party/WebKit/',
65
+ 'got_webrtc_revision': 'src/third_party/webrtc/',
69
66
  }
70
67
  }
71
68
 
@@ -142,9 +139,7 @@ def call(*args, **kwargs): # pragma: no cover
142
139
  kwargs['stderr'] = subprocess.STDOUT
143
140
  kwargs.setdefault('bufsize', BUF_SIZE)
144
141
  cwd = kwargs.get('cwd', os.getcwd())
145
- result_fn = kwargs.pop('result_fn', lambda code, out: RETRY if code else OK)
146
142
  stdin_data = kwargs.pop('stdin_data', None)
147
- tries = kwargs.pop('tries', ATTEMPTS)
148
143
  if stdin_data:
149
144
  kwargs['stdin'] = subprocess.PIPE
150
145
  out = cStringIO.StringIO()
@@ -152,64 +147,53 @@ def call(*args, **kwargs): # pragma: no cover
152
147
  env = copy.copy(os.environ)
153
148
  env.update(new_env)
154
149
  kwargs['env'] = env
155
- attempt = 0
156
- for attempt in range(1, tries + 1):
157
- attempt_msg = ' (attempt #%d)' % attempt if attempt else ''
158
- if new_env:
159
- print '===Injecting Environment Variables==='
160
- for k, v in sorted(new_env.items()):
161
- print '%s: %s' % (k, v)
162
- print '===Running %s%s===' % (' '.join(args), attempt_msg)
163
- print 'In directory: %s' % cwd
164
- start_time = time.time()
165
- proc = subprocess.Popen(args, **kwargs)
166
- if stdin_data:
167
- proc.stdin.write(stdin_data)
168
- proc.stdin.close()
169
- psprinter = PsPrinter()
170
- # This is here because passing 'sys.stdout' into stdout for proc will
171
- # produce out of order output.
172
- hanging_cr = False
173
- while True:
174
- psprinter.poke()
175
- buf = proc.stdout.read(BUF_SIZE)
176
- if not buf:
177
- break
178
- if hanging_cr:
179
- buf = '\r' + buf
180
- hanging_cr = buf.endswith('\r')
181
- if hanging_cr:
182
- buf = buf[:-1]
183
- buf = buf.replace('\r\n', '\n').replace('\r', '\n')
184
- sys.stdout.write(buf)
185
- out.write(buf)
186
- if hanging_cr:
187
- sys.stdout.write('\n')
188
- out.write('\n')
189
- psprinter.cancel()
190
-
191
- code = proc.wait()
192
- elapsed_time = ((time.time() - start_time) / 60.0)
193
- outval = out.getvalue()
194
- result = result_fn(code, outval)
195
- if result in (FAIL, RETRY):
196
- print '===Failed in %.1f mins===' % elapsed_time
197
- print
198
- else:
199
- print '===Succeeded in %.1f mins===' % elapsed_time
200
- print
201
- return outval
202
- if result is FAIL:
150
+
151
+ if new_env:
152
+ print '===Injecting Environment Variables==='
153
+ for k, v in sorted(new_env.items()):
154
+ print '%s: %s' % (k, v)
155
+ print '===Running %s===' % (' '.join(args),)
156
+ print 'In directory: %s' % cwd
157
+ start_time = time.time()
158
+ proc = subprocess.Popen(args, **kwargs)
159
+ if stdin_data:
160
+ proc.stdin.write(stdin_data)
161
+ proc.stdin.close()
162
+ psprinter = PsPrinter()
163
+ # This is here because passing 'sys.stdout' into stdout for proc will
164
+ # produce out of order output.
165
+ hanging_cr = False
166
+ while True:
167
+ psprinter.poke()
168
+ buf = proc.stdout.read(BUF_SIZE)
169
+ if not buf:
203
170
  break
204
- if result is RETRY and attempt < tries:
205
- sleep_backoff = 4 ** attempt
206
- sleep_time = random.randint(sleep_backoff, int(sleep_backoff * 1.2))
207
- print '===backing off, sleeping for %d secs===' % sleep_time
208
- time.sleep(sleep_time)
171
+ if hanging_cr:
172
+ buf = '\r' + buf
173
+ hanging_cr = buf.endswith('\r')
174
+ if hanging_cr:
175
+ buf = buf[:-1]
176
+ buf = buf.replace('\r\n', '\n').replace('\r', '\n')
177
+ sys.stdout.write(buf)
178
+ out.write(buf)
179
+ if hanging_cr:
180
+ sys.stdout.write('\n')
181
+ out.write('\n')
182
+ psprinter.cancel()
183
+
184
+ code = proc.wait()
185
+ elapsed_time = ((time.time() - start_time) / 60.0)
186
+ outval = out.getvalue()
187
+ if code:
188
+ print '===Failed in %.1f mins===' % elapsed_time
189
+ print
190
+ raise SubprocessFailed('%s failed with code %d in %s.' %
191
+ (' '.join(args), code, cwd),
192
+ code, outval)
209
193
 
210
- raise SubprocessFailed('%s failed with code %d in %s after %d attempts.' %
211
- (' '.join(args), code, cwd, attempt),
212
- code, outval)
194
+ print '===Succeeded in %.1f mins===' % elapsed_time
195
+ print
196
+ return outval
213
197
 
214
198
 
215
199
  def git(*args, **kwargs): # pragma: no cover
@@ -293,12 +277,12 @@ def modify_solutions(input_solutions):
293
277
  return solutions
294
278
 
295
279
 
296
- def remove(target):
297
- """Remove a target by moving it into build.dead."""
298
- dead_folder = path.join(BUILDER_DIR, 'build.dead')
299
- if not path.exists(dead_folder):
300
- os.makedirs(dead_folder)
301
- dest = path.join(dead_folder, uuid.uuid4().hex)
280
+ def remove(target, cleanup_dir):
281
+ """Remove a target by moving it into cleanup_dir."""
282
+ if not path.exists(cleanup_dir):
283
+ os.makedirs(cleanup_dir)
284
+ dest = path.join(cleanup_dir, '%s_%s' % (
285
+ path.basename(target), uuid.uuid4().hex))
302
286
  print 'Marking for removal %s => %s' % (target, dest)
303
287
  try:
304
288
  os.rename(target, dest)
@@ -307,7 +291,7 @@ def remove(target):
307
291
  raise
308
292
 
309
293
 
310
- def ensure_no_checkout(dir_names):
294
+ def ensure_no_checkout(dir_names, cleanup_dir):
311
295
  """Ensure that there is no undesired checkout under build/."""
312
296
  build_dir = os.getcwd()
313
297
  has_checkout = any(path.exists(path.join(build_dir, dir_name, '.git'))
@@ -316,7 +300,7 @@ def ensure_no_checkout(dir_names):
316
300
  for filename in os.listdir(build_dir):
317
301
  deletion_target = path.join(build_dir, filename)
318
302
  print '.git detected in checkout, deleting %s...' % deletion_target,
319
- remove(deletion_target)
303
+ remove(deletion_target, cleanup_dir)
320
304
  print 'done'
321
305
 
322
306
 
@@ -339,7 +323,9 @@ def gclient_configure(solutions, target_os, target_os_only, git_cache_dir):
339
323
  solutions, target_os, target_os_only, git_cache_dir))
340
324
 
341
325
 
342
- def gclient_sync(with_branch_heads, shallow, revisions, break_repo_locks):
326
+ def gclient_sync(
327
+ with_branch_heads, with_tags, shallow, revisions, break_repo_locks,
328
+ disable_syntax_validation):
343
329
  # We just need to allocate a filename.
344
330
  fd, gclient_output_file = tempfile.mkstemp(suffix='.json')
345
331
  os.close(fd)
@@ -349,17 +335,21 @@ def gclient_sync(with_branch_heads, shallow, revisions, break_repo_locks):
349
335
  '--nohooks', '--noprehooks', '--delete_unversioned_trees']
350
336
  if with_branch_heads:
351
337
  args += ['--with_branch_heads']
338
+ if with_tags:
339
+ args += ['--with_tags']
352
340
  if shallow:
353
341
  args += ['--shallow']
354
342
  if break_repo_locks:
355
343
  args += ['--break_repo_locks']
344
+ if disable_syntax_validation:
345
+ args += ['--disable-syntax-validation']
356
346
  for name, revision in sorted(revisions.iteritems()):
357
347
  if revision.upper() == 'HEAD':
358
348
  revision = 'origin/master'
359
349
  args.extend(['--revision', '%s@%s' % (name, revision)])
360
350
 
361
351
  try:
362
- call_gclient(*args, tries=1)
352
+ call_gclient(*args)
363
353
  except SubprocessFailed as e:
364
354
  # Throw a GclientSyncFailed exception so we can catch this independently.
365
355
  raise GclientSyncFailed(e.message, e.code, e.output)
@@ -407,9 +397,9 @@ def get_commit_message_footer_map(message):
407
397
  for line in lines:
408
398
  m = COMMIT_FOOTER_ENTRY_RE.match(line)
409
399
  if not m:
410
- # If any single line isn't valid, the entire footer is invalid.
411
- footers.clear()
412
- return footers
400
+ # If any single line isn't valid, continue anyway for compatibility with
401
+ # Gerrit (which itself uses JGit for this).
402
+ continue
413
403
  footers[m.group(1)] = m.group(2).strip()
414
404
  return footers
415
405
 
@@ -420,17 +410,6 @@ def get_commit_message_footer(message, key):
420
410
  return get_commit_message_footer_map(message).get(key)
421
411
 
422
412
 
423
- def emit_log_lines(name, lines):
424
- for line in lines.splitlines():
425
- print '@@@STEP_LOG_LINE@%s@%s@@@' % (name, line)
426
- print '@@@STEP_LOG_END@%s@@@' % name
427
-
428
-
429
- def emit_properties(properties):
430
- for property_name, property_value in sorted(properties.items()):
431
- print '@@@SET_BUILD_PROPERTY@%s@"%s"@@@' % (property_name, property_value)
432
-
433
-
434
413
  # Derived from:
435
414
  # http://code.activestate.com/recipes/577972-disk-usage/?in=user-4178764
436
415
  def get_total_disk_space():
@@ -474,10 +453,16 @@ def force_revision(folder_name, revision):
474
453
  branch, revision = split_revision
475
454
 
476
455
  if revision and revision.upper() != 'HEAD':
477
- git('checkout', '--force', revision, cwd=folder_name, tries=1)
456
+ git('checkout', '--force', revision, cwd=folder_name)
478
457
  else:
458
+ # TODO(machenbach): This won't work with branch-heads, as Gerrit's
459
+ # destination branch would be e.g. refs/branch-heads/123. But here
460
+ # we need to pass refs/remotes/branch-heads/123 to check out.
461
+ # This will also not work if somebody passes a local refspec like
462
+ # refs/heads/master. It needs to translate to refs/remotes/origin/master
463
+ # first. See also https://crbug.com/740456 .
479
464
  ref = branch if branch.startswith('refs/') else 'origin/%s' % branch
480
- git('checkout', '--force', ref, cwd=folder_name, tries=1)
465
+ git('checkout', '--force', ref, cwd=folder_name)
481
466
 
482
467
 
483
468
  def is_broken_repo_dir(repo_dir):
@@ -504,7 +489,8 @@ def _maybe_break_locks(checkout_path):
504
489
  raise
505
490
 
506
491
 
507
- def git_checkout(solutions, revisions, shallow, refs, git_cache_dir):
492
+ def git_checkout(solutions, revisions, shallow, refs, git_cache_dir,
493
+ cleanup_dir):
508
494
  build_dir = os.getcwd()
509
495
  # Before we do anything, break all git_cache locks.
510
496
  if path.isdir(git_cache_dir):
@@ -546,17 +532,17 @@ def git_checkout(solutions, revisions, shallow, refs, git_cache_dir):
546
532
  # state.
547
533
  if path.exists(sln_dir) and is_broken_repo_dir(sln_dir):
548
534
  print 'Git repo %s appears to be broken, removing it' % sln_dir
549
- remove(sln_dir)
535
+ remove(sln_dir, cleanup_dir)
550
536
 
551
537
  # Use "tries=1", since we retry manually in this loop.
552
538
  if not path.isdir(sln_dir):
553
- git(*clone_cmd, tries=1)
539
+ git(*clone_cmd)
554
540
  else:
555
- git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir, tries=1)
556
- git('fetch', 'origin', cwd=sln_dir, tries=1)
541
+ git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir)
542
+ git('fetch', 'origin', cwd=sln_dir)
557
543
  for ref in refs:
558
544
  refspec = '%s:%s' % (ref, ref.lstrip('+'))
559
- git('fetch', 'origin', refspec, cwd=sln_dir, tries=1)
545
+ git('fetch', 'origin', refspec, cwd=sln_dir)
560
546
 
561
547
  # Windows sometimes has trouble deleting files.
562
548
  # This can make git commands that rely on locks fail.
@@ -587,7 +573,7 @@ def git_checkout(solutions, revisions, shallow, refs, git_cache_dir):
587
573
  sleep_secs = 2**tries
588
574
  print 'waiting %s seconds and trying again...' % sleep_secs
589
575
  time.sleep(sleep_secs)
590
- remove(sln_dir)
576
+ remove(sln_dir, cleanup_dir)
591
577
 
592
578
  git('clean', '-dff', cwd=sln_dir)
593
579
 
@@ -648,7 +634,7 @@ def apply_rietveld_issue(issue, patchset, root, server, _rev_map, _revision,
648
634
 
649
635
  # Only try once, since subsequent failures hide the real failure.
650
636
  try:
651
- call(*cmd, tries=1)
637
+ call(*cmd)
652
638
  except SubprocessFailed as e:
653
639
  raise PatchFailed(e.message, e.code, e.output)
654
640
 
@@ -668,7 +654,7 @@ def apply_gerrit_ref(gerrit_repo, gerrit_ref, root, gerrit_reset,
668
654
  # command will do so. See http://crbug.com/692067.
669
655
  git('reset', '--hard', cwd=root)
670
656
  try:
671
- git('retry', 'fetch', gerrit_repo, gerrit_ref, cwd=root, tries=1)
657
+ git('fetch', gerrit_repo, gerrit_ref, cwd=root)
672
658
  git('checkout', 'FETCH_HEAD', cwd=root)
673
659
 
674
660
  if gerrit_rebase_patch_ref:
@@ -679,7 +665,9 @@ def apply_gerrit_ref(gerrit_repo, gerrit_ref, root, gerrit_reset,
679
665
  ok = False
680
666
  git('checkout', '-b', temp_branch_name, cwd=root)
681
667
  try:
682
- git('rebase', base_rev, cwd=root, tries=1)
668
+ git('-c', 'user.name=chrome-bot',
669
+ '-c', 'user.email=chrome-bot@chromium.org',
670
+ 'rebase', base_rev, cwd=root)
683
671
  except SubprocessFailed:
684
672
  # Abort the rebase since there were failures.
685
673
  git('rebase', '--abort', cwd=root)
@@ -728,7 +716,7 @@ def parse_got_revision(gclient_output, got_revision_mapping):
728
716
  '%s/' % path.rstrip('/') : solution_output for path, solution_output
729
717
  in gclient_output['solutions'].iteritems()
730
718
  }
731
- for dir_name, property_name in got_revision_mapping.iteritems():
719
+ for property_name, dir_name in got_revision_mapping.iteritems():
732
720
  # Make sure dir_name always ends with a single slash.
733
721
  dir_name = '%s/' % dir_name.rstrip('/')
734
722
  if dir_name not in solutions_output:
@@ -765,13 +753,14 @@ def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only,
765
753
  gerrit_ref, gerrit_rebase_patch_ref, revision_mapping,
766
754
  apply_issue_email_file, apply_issue_key_file,
767
755
  apply_issue_oauth2_file, shallow, refs, git_cache_dir,
768
- gerrit_reset):
756
+ cleanup_dir, gerrit_reset, disable_syntax_validation):
769
757
  # Get a checkout of each solution, without DEPS or hooks.
770
758
  # Calling git directly because there is no way to run Gclient without
771
759
  # invoking DEPS.
772
760
  print 'Fetching Git checkout'
773
761
 
774
- git_ref = git_checkout(solutions, revisions, shallow, refs, git_cache_dir)
762
+ git_ref = git_checkout(solutions, revisions, shallow, refs, git_cache_dir,
763
+ cleanup_dir)
775
764
 
776
765
  print '===Processing patch solutions==='
777
766
  already_patched = []
@@ -815,8 +804,13 @@ def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only,
815
804
  # Let gclient do the DEPS syncing.
816
805
  # The branch-head refspec is a special case because its possible Chrome
817
806
  # src, which contains the branch-head refspecs, is DEPSed in.
818
- gclient_output = gclient_sync(BRANCH_HEADS_REFSPEC in refs, shallow,
819
- gc_revisions, break_repo_locks)
807
+ gclient_output = gclient_sync(
808
+ BRANCH_HEADS_REFSPEC in refs,
809
+ TAGS_REFSPEC in refs,
810
+ shallow,
811
+ gc_revisions,
812
+ break_repo_locks,
813
+ disable_syntax_validation)
820
814
 
821
815
  # Now that gclient_sync has finished, we should revert any .DEPS.git so that
822
816
  # presubmit doesn't complain about it being modified.
@@ -868,10 +862,9 @@ def parse_revisions(revisions, root):
868
862
  parsed_root = urlparse.urlparse(current_root)
869
863
  if parsed_root.scheme in ['http', 'https']:
870
864
  # We want to normalize git urls into .git urls.
871
- normalized_root = 'https://%s/%s' % (parsed_root.netloc,
872
- parsed_root.path)
865
+ normalized_root = 'https://' + parsed_root.netloc + parsed_root.path
873
866
  if not normalized_root.endswith('.git'):
874
- normalized_root = '%s.git' % normalized_root
867
+ normalized_root += '.git'
875
868
  elif parsed_root.scheme:
876
869
  print 'WARNING: Unrecognized scheme %s, ignoring' % parsed_root.scheme
877
870
  continue
@@ -914,16 +907,18 @@ def parse_args():
914
907
  parse.add_option('--gerrit_no_reset', action='store_true',
915
908
  help='Bypass calling reset after applying a gerrit ref.')
916
909
  parse.add_option('--specs', help='Gcilent spec.')
910
+ parse.add_option('--spec-path', help='Path to a Gcilent spec file.')
917
911
  parse.add_option('--revision_mapping_file',
918
912
  help=('Path to a json file of the form '
919
- '{"path/to/repo/": "property_name"}'))
913
+ '{"property_name": "path/to/repo/"}'))
920
914
  parse.add_option('--revision', action='append', default=[],
921
915
  help='Revision to check out. Can be any form of git ref. '
922
916
  'Can prepend root@<rev> to specify which repository, '
923
917
  'where root is either a filesystem path or git https '
924
918
  'url. To specify Tip of Tree, set rev to HEAD. ')
919
+ # TODO(machenbach): Remove the flag when all uses have been removed.
925
920
  parse.add_option('--output_manifest', action='store_true',
926
- help=('Add manifest json to the json output.'))
921
+ help=('Deprecated.'))
927
922
  parse.add_option('--clobber', action='store_true',
928
923
  help='Delete checkout first, always')
929
924
  parse.add_option('--output_json',
@@ -937,11 +932,25 @@ def parse_args():
937
932
  parse.add_option('--with_branch_heads', action='store_true',
938
933
  help='Always pass --with_branch_heads to gclient. This '
939
934
  'does the same thing as --refs +refs/branch-heads/*')
935
+ parse.add_option('--with_tags', action='store_true',
936
+ help='Always pass --with_tags to gclient. This '
937
+ 'does the same thing as --refs +refs/tags/*')
940
938
  parse.add_option('--git-cache-dir', help='Path to git cache directory.')
941
-
939
+ parse.add_option('--cleanup-dir',
940
+ help='Path to a cleanup directory that can be used for '
941
+ 'deferred file cleanup.')
942
+ parse.add_option(
943
+ '--disable-syntax-validation', action='store_true',
944
+ help='Disable validation of .gclient and DEPS syntax.')
942
945
 
943
946
  options, args = parse.parse_args()
944
947
 
948
+ if options.spec_path:
949
+ if options.specs:
950
+ parse.error('At most one of --spec-path and --specs may be specified.')
951
+ with open(options.spec_path, 'r') as fd:
952
+ options.specs = fd.read()
953
+
945
954
  if not options.git_cache_dir:
946
955
  parse.error('--git-cache-dir is required')
947
956
 
@@ -952,6 +961,10 @@ def parse_args():
952
961
  options.refs.append(BRANCH_HEADS_REFSPEC)
953
962
  del options.with_branch_heads
954
963
 
964
+ if options.with_tags:
965
+ options.refs.append(TAGS_REFSPEC)
966
+ del options.with_tags
967
+
955
968
  try:
956
969
  if not options.revision_mapping_file:
957
970
  parse.error('--revision_mapping_file is required')
@@ -977,7 +990,7 @@ def prepare(options, git_slns, active):
977
990
  """Prepares the target folder before we checkout."""
978
991
  dir_names = [sln.get('name') for sln in git_slns if 'name' in sln]
979
992
  if options.clobber:
980
- ensure_no_checkout(dir_names)
993
+ ensure_no_checkout(dir_names, options.cleanup_dir)
981
994
  # Make sure we tell recipes that we didn't run if the script exits here.
982
995
  emit_json(options.output_json, did_run=active)
983
996
 
@@ -1043,11 +1056,13 @@ def checkout(options, git_slns, specs, revisions, step_text, shallow):
1043
1056
  shallow=shallow,
1044
1057
  refs=options.refs,
1045
1058
  git_cache_dir=options.git_cache_dir,
1046
- gerrit_reset=not options.gerrit_no_reset)
1059
+ cleanup_dir=options.cleanup_dir,
1060
+ gerrit_reset=not options.gerrit_no_reset,
1061
+ disable_syntax_validation=options.disable_syntax_validation)
1047
1062
  gclient_output = ensure_checkout(**checkout_parameters)
1048
1063
  except GclientSyncFailed:
1049
1064
  print 'We failed gclient sync, lets delete the checkout and retry.'
1050
- ensure_no_checkout(dir_names)
1065
+ ensure_no_checkout(dir_names, options.cleanup_dir)
1051
1066
  gclient_output = ensure_checkout(**checkout_parameters)
1052
1067
  except PatchFailed as e:
1053
1068
  if options.output_json:
@@ -1055,16 +1070,12 @@ def checkout(options, git_slns, specs, revisions, step_text, shallow):
1055
1070
  emit_json(options.output_json,
1056
1071
  did_run=True,
1057
1072
  root=first_sln,
1058
- log_lines=[('patch error', e.output),],
1059
1073
  patch_apply_return_code=e.code,
1060
1074
  patch_root=options.patch_root,
1061
1075
  patch_failure=True,
1076
+ failed_patch_body=e.output,
1062
1077
  step_text='%s PATCH FAILED' % step_text,
1063
1078
  fixed_revisions=revisions)
1064
- else:
1065
- # If we're not on recipes, tell annotator about our got_revisions.
1066
- emit_log_lines('patch error', e.output)
1067
- print '@@@STEP_TEXT@%s PATCH FAILED@@@' % step_text
1068
1079
  raise
1069
1080
 
1070
1081
  # Take care of got_revisions outputs.
@@ -1076,7 +1087,7 @@ def checkout(options, git_slns, specs, revisions, step_text, shallow):
1076
1087
  # revision_mapping were specified on the command line then
1077
1088
  # default to setting 'got_revision' based on the first solution.
1078
1089
  if not revision_mapping:
1079
- revision_mapping[first_sln] = 'got_revision'
1090
+ revision_mapping['got_revision'] = first_sln
1080
1091
 
1081
1092
  got_revisions = parse_got_revision(gclient_output, revision_mapping)
1082
1093
 
@@ -1088,7 +1099,6 @@ def checkout(options, git_slns, specs, revisions, step_text, shallow):
1088
1099
  #raise Exception('No got_revision(s) found in gclient output')
1089
1100
 
1090
1101
  if options.output_json:
1091
- manifest = create_manifest() if options.output_manifest else None
1092
1102
  # Tell recipes information such as root, got_revision, etc.
1093
1103
  emit_json(options.output_json,
1094
1104
  did_run=True,
@@ -1097,17 +1107,13 @@ def checkout(options, git_slns, specs, revisions, step_text, shallow):
1097
1107
  step_text=step_text,
1098
1108
  fixed_revisions=revisions,
1099
1109
  properties=got_revisions,
1100
- manifest=manifest)
1101
- else:
1102
- # If we're not on recipes, tell annotator about our got_revisions.
1103
- emit_properties(got_revisions)
1110
+ manifest=create_manifest())
1104
1111
 
1105
1112
 
1106
1113
  def print_debug_info():
1107
1114
  print "Debugging info:"
1108
1115
  debug_params = {
1109
- 'CURRENT_DIR': CURRENT_DIR,
1110
- 'BUILDER_DIR': BUILDER_DIR,
1116
+ 'CURRENT_DIR': path.abspath(os.getcwd()),
1111
1117
  'THIS_DIR': THIS_DIR,
1112
1118
  'DEPOT_TOOLS_DIR': DEPOT_TOOLS_DIR,
1113
1119
  }