libv8 4.5.95.5 → 5.0.71.48.0beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +45 -19
  3. data/CHANGELOG.md +14 -0
  4. data/README.md +30 -15
  5. data/Rakefile +7 -6
  6. data/ext/libv8/arch.rb +5 -4
  7. data/ext/libv8/builder.rb +25 -19
  8. data/ext/libv8/compiler.rb +6 -33
  9. data/ext/libv8/location.rb +7 -8
  10. data/lib/libv8/version.rb +1 -1
  11. data/libv8.gemspec +1 -1
  12. data/patches/build-standalone-static-library.patch +14 -0
  13. data/patches/disable-building-tests.patch +48 -10
  14. data/patches/fPIC-for-static.patch +3 -3
  15. data/release/x86-linux/Vagrantfile +8 -4
  16. data/release/x86_64-freebsd10/Vagrantfile +86 -0
  17. data/release/x86_64-linux/Vagrantfile +8 -4
  18. data/spec/compiler_spec.rb +5 -29
  19. data/spec/support/compiler_helpers.rb +2 -4
  20. data/vendor/depot_tools/.gitignore +15 -3
  21. data/vendor/depot_tools/OWNERS +2 -2
  22. data/vendor/depot_tools/PRESUBMIT.py +4 -2
  23. data/vendor/depot_tools/WATCHLISTS +6 -0
  24. data/vendor/depot_tools/apply_issue.py +70 -38
  25. data/vendor/depot_tools/bootstrap/win/README.md +66 -0
  26. data/vendor/depot_tools/bootstrap/win/git-bash.template.sh +12 -0
  27. data/vendor/depot_tools/bootstrap/win/git.template.bat +5 -0
  28. data/vendor/depot_tools/bootstrap/win/profile.d.python.sh +20 -0
  29. data/vendor/depot_tools/bootstrap/win/win_tools.bat +96 -45
  30. data/vendor/depot_tools/breakpad.py +6 -141
  31. data/vendor/depot_tools/buildbucket.py +45 -31
  32. data/vendor/depot_tools/cbuildbot +1 -0
  33. data/vendor/depot_tools/checkout.py +2 -1
  34. data/vendor/depot_tools/chrome_set_ver +1 -0
  35. data/vendor/depot_tools/cit +8 -0
  36. data/vendor/depot_tools/cit.bat +11 -0
  37. data/vendor/depot_tools/cit.py +120 -0
  38. data/vendor/depot_tools/codereview.settings +0 -2
  39. data/vendor/depot_tools/commit_queue +1 -5
  40. data/vendor/depot_tools/commit_queue.bat +1 -4
  41. data/vendor/depot_tools/commit_queue.py +78 -29
  42. data/vendor/depot_tools/cpplint.py +22 -14
  43. data/vendor/depot_tools/cros +1 -0
  44. data/vendor/depot_tools/cros_sdk +1 -0
  45. data/vendor/depot_tools/depot-tools-auth.py +3 -3
  46. data/vendor/depot_tools/download_from_google_storage.py +101 -21
  47. data/vendor/depot_tools/drover.py +2 -3
  48. data/vendor/depot_tools/fetch.py +31 -27
  49. data/vendor/depot_tools/{recipes → fetch_configs}/android.py +4 -4
  50. data/vendor/depot_tools/fetch_configs/breakpad.py +45 -0
  51. data/vendor/depot_tools/{recipes → fetch_configs}/chromium.py +3 -3
  52. data/vendor/depot_tools/{recipes/recipe_util.py → fetch_configs/config_util.py} +3 -3
  53. data/vendor/depot_tools/fetch_configs/crashpad.py +41 -0
  54. data/vendor/depot_tools/{recipes → fetch_configs}/dart.py +3 -3
  55. data/vendor/depot_tools/{recipes/pdfium.py → fetch_configs/dartino.py} +14 -13
  56. data/vendor/depot_tools/{recipes → fetch_configs}/dartium.py +3 -3
  57. data/vendor/depot_tools/{recipes → fetch_configs}/depot_tools.py +3 -3
  58. data/vendor/depot_tools/fetch_configs/gyp.py +42 -0
  59. data/vendor/depot_tools/{recipes → fetch_configs}/infra.py +3 -3
  60. data/vendor/depot_tools/{recipes → fetch_configs}/infra_internal.py +3 -3
  61. data/vendor/depot_tools/{recipes → fetch_configs}/ios.py +4 -4
  62. data/vendor/depot_tools/{recipes → fetch_configs}/mojo.py +3 -3
  63. data/vendor/depot_tools/{recipes → fetch_configs}/nacl.py +3 -3
  64. data/vendor/depot_tools/{recipes → fetch_configs}/naclports.py +3 -3
  65. data/vendor/depot_tools/fetch_configs/pdfium.py +40 -0
  66. data/vendor/depot_tools/{recipes → fetch_configs}/skia.py +3 -3
  67. data/vendor/depot_tools/{recipes → fetch_configs}/skia_buildbot.py +3 -3
  68. data/vendor/depot_tools/fetch_configs/syzygy.py +41 -0
  69. data/vendor/depot_tools/{recipes → fetch_configs}/v8.py +3 -3
  70. data/vendor/depot_tools/{recipes → fetch_configs}/webrtc.py +3 -3
  71. data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_android.py +4 -4
  72. data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_ios.py +4 -4
  73. data/vendor/depot_tools/fix_encoding.py +6 -6
  74. data/vendor/depot_tools/gcl.py +11 -21
  75. data/vendor/depot_tools/gclient +10 -0
  76. data/vendor/depot_tools/gclient-new-workdir.py +7 -38
  77. data/vendor/depot_tools/gclient.bat +2 -2
  78. data/vendor/depot_tools/gclient.py +85 -65
  79. data/vendor/depot_tools/gclient_scm.py +83 -10
  80. data/vendor/depot_tools/gclient_utils.py +5 -1
  81. data/vendor/depot_tools/gerrit_util.py +243 -26
  82. data/vendor/depot_tools/git-auto-svn +1 -1
  83. data/vendor/depot_tools/git-cache +1 -1
  84. data/vendor/depot_tools/git-cherry-pick-upload +1 -1
  85. data/vendor/depot_tools/git-cl +1 -1
  86. data/vendor/depot_tools/git-drover +6 -0
  87. data/vendor/depot_tools/git-find-releases +6 -0
  88. data/vendor/depot_tools/git-footers +1 -1
  89. data/vendor/depot_tools/git-freeze +1 -1
  90. data/vendor/depot_tools/git-gs +1 -1
  91. data/vendor/depot_tools/git-hyper-blame +6 -0
  92. data/vendor/depot_tools/git-map +1 -1
  93. data/vendor/depot_tools/git-map-branches +1 -1
  94. data/vendor/depot_tools/git-mark-merge-base +1 -1
  95. data/vendor/depot_tools/git-nav-downstream +1 -1
  96. data/vendor/depot_tools/git-new-branch +1 -1
  97. data/vendor/depot_tools/git-number +1 -1
  98. data/vendor/depot_tools/git-rebase-update +1 -1
  99. data/vendor/depot_tools/git-rename-branch +1 -1
  100. data/vendor/depot_tools/git-reparent-branch +1 -1
  101. data/vendor/depot_tools/git-retry +1 -1
  102. data/vendor/depot_tools/git-squash-branch +1 -1
  103. data/vendor/depot_tools/git-thaw +1 -1
  104. data/vendor/depot_tools/git-try +1 -1
  105. data/vendor/depot_tools/git-upstream-diff +1 -1
  106. data/vendor/depot_tools/git_auto_svn.py +24 -6
  107. data/vendor/depot_tools/git_cache.py +74 -27
  108. data/vendor/depot_tools/git_cl.py +2118 -747
  109. data/vendor/depot_tools/git_common.py +100 -6
  110. data/vendor/depot_tools/git_dates.py +62 -0
  111. data/vendor/depot_tools/git_drover.py +424 -0
  112. data/vendor/depot_tools/git_find_releases.py +65 -0
  113. data/vendor/depot_tools/git_footers.py +42 -0
  114. data/vendor/depot_tools/git_hyper_blame.py +391 -0
  115. data/vendor/depot_tools/git_map_branches.py +8 -6
  116. data/vendor/depot_tools/git_new_branch.py +6 -1
  117. data/vendor/depot_tools/git_rebase_update.py +56 -16
  118. data/vendor/depot_tools/git_reparent_branch.py +13 -0
  119. data/vendor/depot_tools/git_try.py +0 -2
  120. data/vendor/depot_tools/gsutil.py +51 -20
  121. data/vendor/depot_tools/infra/config/OWNERS +3 -1
  122. data/vendor/depot_tools/infra/config/cq.cfg +7 -3
  123. data/vendor/depot_tools/infra/config/recipes.cfg +9 -0
  124. data/vendor/depot_tools/luci_hacks/README.md +35 -0
  125. data/vendor/depot_tools/{bootstrap/virtualenv/tests → luci_hacks}/__init__.py +0 -0
  126. data/vendor/depot_tools/luci_hacks/luci_recipe_run.isolate +12 -0
  127. data/vendor/depot_tools/luci_hacks/luci_recipe_run.py +81 -0
  128. data/vendor/depot_tools/luci_hacks/trigger_luci_job.py +128 -0
  129. data/vendor/depot_tools/man/html/depot_tools.html +9 -1
  130. data/vendor/depot_tools/man/html/depot_tools_tutorial.html +4 -4
  131. data/vendor/depot_tools/man/html/git-drover.html +191 -35
  132. data/vendor/depot_tools/man/html/git-hyper-blame.html +878 -0
  133. data/vendor/depot_tools/man/html/git-rebase-update.html +9 -4
  134. data/vendor/depot_tools/man/man1/git-drover.1 +189 -36
  135. data/vendor/depot_tools/man/man1/git-hyper-blame.1 +128 -0
  136. data/vendor/depot_tools/man/man1/git-rebase-update.1 +8 -6
  137. data/vendor/depot_tools/man/man7/depot_tools.7 +9 -4
  138. data/vendor/depot_tools/man/src/_git-hyper-blame_desc.helper.txt +1 -0
  139. data/vendor/depot_tools/man/src/common_demo_functions.sh +5 -0
  140. data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +1 -1
  141. data/vendor/depot_tools/man/src/git-drover.demo.1.sh +11 -16
  142. data/vendor/depot_tools/man/src/git-drover.demo.3.sh +27 -0
  143. data/vendor/depot_tools/man/src/git-drover.demo.4.sh +39 -0
  144. data/vendor/depot_tools/man/src/git-drover.txt +49 -3
  145. data/vendor/depot_tools/man/src/git-hyper-blame.demo.1.sh +3 -0
  146. data/vendor/depot_tools/man/src/git-hyper-blame.demo.2.sh +4 -0
  147. data/vendor/depot_tools/man/src/git-hyper-blame.demo.common.sh +57 -0
  148. data/vendor/depot_tools/man/src/git-hyper-blame.txt +85 -0
  149. data/vendor/depot_tools/man/src/git-rebase-update.txt +5 -1
  150. data/vendor/depot_tools/my_activity.py +6 -21
  151. data/vendor/depot_tools/ninja +2 -2
  152. data/vendor/depot_tools/ninja-linux32 +0 -0
  153. data/vendor/depot_tools/ninja-linux64 +0 -0
  154. data/vendor/depot_tools/ninja-mac +0 -0
  155. data/vendor/depot_tools/ninja.exe +0 -0
  156. data/vendor/depot_tools/presubmit_canned_checks.py +83 -69
  157. data/vendor/depot_tools/presubmit_support.py +126 -42
  158. data/vendor/depot_tools/pylint.py +5 -1
  159. data/vendor/depot_tools/python_runner.sh +55 -0
  160. data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +32 -0
  161. data/vendor/depot_tools/recipe_modules/bot_update/api.py +283 -0
  162. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +56 -0
  163. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +63 -0
  164. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +57 -0
  165. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +44 -0
  166. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/forced.json +57 -0
  167. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +44 -0
  168. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +44 -0
  169. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +43 -0
  170. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +43 -0
  171. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/svn_mode.json +59 -0
  172. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +58 -0
  173. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +60 -0
  174. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +58 -0
  175. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +60 -0
  176. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +81 -0
  177. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +81 -0
  178. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +49 -0
  179. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +61 -0
  180. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +51 -0
  181. data/vendor/depot_tools/recipe_modules/bot_update/example.py +172 -0
  182. data/vendor/depot_tools/{bootstrap/virtualenv/virtualenv_support → recipe_modules/bot_update/resources}/__init__.py +0 -0
  183. data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +1764 -0
  184. data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +86 -0
  185. data/vendor/depot_tools/recipe_modules/depot_tools/__init__.py +3 -0
  186. data/vendor/depot_tools/recipe_modules/depot_tools/api.py +27 -0
  187. data/vendor/depot_tools/recipe_modules/gclient/__init__.py +10 -0
  188. data/vendor/depot_tools/recipe_modules/gclient/api.py +378 -0
  189. data/vendor/depot_tools/recipe_modules/gclient/config.py +671 -0
  190. data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +172 -0
  191. data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +174 -0
  192. data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +185 -0
  193. data/vendor/depot_tools/recipe_modules/gclient/example.py +100 -0
  194. data/vendor/depot_tools/recipe_modules/gclient/test_api.py +37 -0
  195. data/vendor/depot_tools/recipe_modules/git/__init__.py +9 -0
  196. data/vendor/depot_tools/recipe_modules/git/api.py +377 -0
  197. data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +177 -0
  198. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +177 -0
  199. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +179 -0
  200. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +176 -0
  201. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +177 -0
  202. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +178 -0
  203. data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +153 -0
  204. data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +181 -0
  205. data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +199 -0
  206. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +250 -0
  207. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +181 -0
  208. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +182 -0
  209. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +102 -0
  210. data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +181 -0
  211. data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +186 -0
  212. data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +179 -0
  213. data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +179 -0
  214. data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +178 -0
  215. data/vendor/depot_tools/recipe_modules/git/example.py +147 -0
  216. data/vendor/depot_tools/recipe_modules/git/resources/git_setup.py +61 -0
  217. data/vendor/depot_tools/recipe_modules/git/test_api.py +18 -0
  218. data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
  219. data/vendor/depot_tools/recipe_modules/git_cl/api.py +25 -0
  220. data/vendor/depot_tools/recipe_modules/git_cl/config.py +22 -0
  221. data/vendor/depot_tools/recipe_modules/git_cl/example.expected/basic.json +66 -0
  222. data/vendor/depot_tools/recipe_modules/git_cl/example.py +41 -0
  223. data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +4 -0
  224. data/vendor/depot_tools/recipe_modules/infra_paths/api.py +12 -0
  225. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +14 -0
  226. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +14 -0
  227. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +14 -0
  228. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +14 -0
  229. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +14 -0
  230. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +14 -0
  231. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +14 -0
  232. data/vendor/depot_tools/recipe_modules/infra_paths/example.py +28 -0
  233. data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +45 -0
  234. data/vendor/depot_tools/recipe_modules/presubmit/__init__.py +4 -0
  235. data/vendor/depot_tools/recipe_modules/presubmit/api.py +20 -0
  236. data/vendor/depot_tools/recipe_modules/presubmit/example.expected/basic.json +18 -0
  237. data/vendor/depot_tools/recipe_modules/presubmit/example.py +15 -0
  238. data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
  239. data/vendor/depot_tools/recipe_modules/rietveld/api.py +94 -0
  240. data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +30 -0
  241. data/vendor/depot_tools/recipe_modules/rietveld/example.py +24 -0
  242. data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +15 -0
  243. data/vendor/depot_tools/recipe_modules/tryserver/api.py +280 -0
  244. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +104 -0
  245. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +58 -0
  246. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +58 -0
  247. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_svn_patch.json +68 -0
  248. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +43 -0
  249. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +43 -0
  250. data/vendor/depot_tools/recipe_modules/tryserver/example.py +53 -0
  251. data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +7 -0
  252. data/vendor/depot_tools/recipes.py +136 -0
  253. data/vendor/depot_tools/repo +1 -1
  254. data/vendor/depot_tools/rietveld.py +46 -15
  255. data/vendor/depot_tools/roll_dep.py +97 -36
  256. data/vendor/depot_tools/scm.py +3 -3
  257. data/vendor/depot_tools/setup_color.py +94 -0
  258. data/vendor/depot_tools/subprocess2.py +10 -1
  259. data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -1
  260. data/vendor/depot_tools/third_party/cq_client/README.md +47 -9
  261. data/vendor/depot_tools/third_party/cq_client/cq.pb.go +617 -0
  262. data/vendor/depot_tools/third_party/cq_client/cq.proto +75 -17
  263. data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +168 -41
  264. data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +55 -0
  265. data/vendor/depot_tools/third_party/cq_client/{test/cq_example.cfg → testdata/cq_rietveld.cfg} +14 -6
  266. data/vendor/depot_tools/third_party/fancy_urllib/README +5 -4
  267. data/vendor/depot_tools/third_party/fancy_urllib/__init__.py +114 -52
  268. data/vendor/depot_tools/third_party/protobuf26/README.chromium +9 -6
  269. data/vendor/depot_tools/third_party/upload.py +17 -31
  270. data/vendor/depot_tools/trychange.py +0 -2
  271. data/vendor/depot_tools/update_depot_tools +29 -11
  272. data/vendor/depot_tools/update_depot_tools.bat +4 -9
  273. data/vendor/depot_tools/upload_to_google_storage.py +42 -5
  274. data/vendor/depot_tools/win_toolchain/OWNERS +1 -0
  275. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +227 -52
  276. data/vendor/depot_tools/win_toolchain/package_from_installed.py +203 -88
  277. metadata +161 -81
  278. data/patches/arm/do-not-imply-vfp3-and-armv7.patch +0 -16
  279. data/patches/arm/do-not-use-vfp2.patch +0 -13
  280. data/patches/clang51/no-unused-variable.patch +0 -12
  281. data/vendor/depot_tools/bootstrap/.gitignore +0 -2
  282. data/vendor/depot_tools/bootstrap/bootstrap.py +0 -234
  283. data/vendor/depot_tools/bootstrap/deps.pyl +0 -15
  284. data/vendor/depot_tools/bootstrap/util.py +0 -87
  285. data/vendor/depot_tools/bootstrap/virtualenv/.gitignore +0 -10
  286. data/vendor/depot_tools/bootstrap/virtualenv/.travis.yml +0 -28
  287. data/vendor/depot_tools/bootstrap/virtualenv/AUTHORS.txt +0 -91
  288. data/vendor/depot_tools/bootstrap/virtualenv/CONTRIBUTING.rst +0 -21
  289. data/vendor/depot_tools/bootstrap/virtualenv/LICENSE.txt +0 -22
  290. data/vendor/depot_tools/bootstrap/virtualenv/MANIFEST.in +0 -11
  291. data/vendor/depot_tools/bootstrap/virtualenv/README.rst +0 -10
  292. data/vendor/depot_tools/bootstrap/virtualenv/bin/rebuild-script.py +0 -71
  293. data/vendor/depot_tools/bootstrap/virtualenv/docs/changes.rst +0 -747
  294. data/vendor/depot_tools/bootstrap/virtualenv/docs/conf.py +0 -149
  295. data/vendor/depot_tools/bootstrap/virtualenv/docs/development.rst +0 -61
  296. data/vendor/depot_tools/bootstrap/virtualenv/docs/index.rst +0 -137
  297. data/vendor/depot_tools/bootstrap/virtualenv/docs/installation.rst +0 -58
  298. data/vendor/depot_tools/bootstrap/virtualenv/docs/make.bat +0 -170
  299. data/vendor/depot_tools/bootstrap/virtualenv/docs/reference.rst +0 -256
  300. data/vendor/depot_tools/bootstrap/virtualenv/docs/userguide.rst +0 -249
  301. data/vendor/depot_tools/bootstrap/virtualenv/scripts/virtualenv +0 -3
  302. data/vendor/depot_tools/bootstrap/virtualenv/setup.py +0 -111
  303. data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate.sh +0 -94
  304. data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate_expected.output +0 -2
  305. data/vendor/depot_tools/bootstrap/virtualenv/tests/test_virtualenv.py +0 -139
  306. data/vendor/depot_tools/bootstrap/virtualenv/tests/tox.ini +0 -12
  307. data/vendor/depot_tools/bootstrap/virtualenv/tox.ini +0 -17
  308. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv.py +0 -2367
  309. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.bat +0 -26
  310. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.csh +0 -42
  311. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.fish +0 -74
  312. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.ps1 +0 -150
  313. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.sh +0 -80
  314. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate_this.py +0 -34
  315. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/deactivate.bat +0 -20
  316. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils-init.py +0 -101
  317. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils.cfg +0 -6
  318. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/site.py +0 -758
  319. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/pip-6.0-py2.py3-none-any.whl +0 -0
  320. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/setuptools-8.2.1-py2.py3-none-any.whl +0 -0
  321. data/vendor/depot_tools/bootstrap/win/README.google +0 -16
  322. data/vendor/depot_tools/cbuildbot +0 -96
  323. data/vendor/depot_tools/chrome_set_ver +0 -96
  324. data/vendor/depot_tools/cros +0 -96
  325. data/vendor/depot_tools/cros_sdk +0 -96
  326. data/vendor/depot_tools/git-cl-upload-hook +0 -52
  327. data/vendor/depot_tools/git-crup +0 -45
  328. data/vendor/depot_tools/python_git_runner.sh +0 -36
  329. data/vendor/depot_tools/recipes/blink.py +0 -59
  330. data/vendor/depot_tools/third_party/cq_client/test/validate_config_test.py +0 -52
  331. data/vendor/depot_tools/third_party/cq_client/validate_config.py +0 -108
  332. data/vendor/depot_tools/win_toolchain/toolchain2013.py +0 -494
@@ -4,13 +4,13 @@
4
4
 
5
5
  import sys
6
6
 
7
- import recipe_util # pylint: disable=F0401
7
+ import config_util # pylint: disable=F0401
8
8
 
9
9
 
10
10
  # This class doesn't need an __init__ method, so we disable the warning
11
11
  # pylint: disable=W0232
12
- class WebRTC(recipe_util.Recipe):
13
- """Basic Recipe class for WebRTC."""
12
+ class WebRTC(config_util.Config):
13
+ """Basic Config class for WebRTC."""
14
14
 
15
15
  @staticmethod
16
16
  def fetch_spec(props):
@@ -4,19 +4,19 @@
4
4
 
5
5
  import sys
6
6
 
7
- import recipe_util # pylint: disable=F0401
7
+ import config_util # pylint: disable=F0401
8
8
 
9
9
 
10
10
  # This class doesn't need an __init__ method, so we disable the warning
11
11
  # pylint: disable=W0232
12
- class WebRTCAndroid(recipe_util.Recipe):
13
- """Basic Recipe alias for Android -> WebRTC."""
12
+ class WebRTCAndroid(config_util.Config):
13
+ """Basic Config alias for Android -> WebRTC."""
14
14
 
15
15
  @staticmethod
16
16
  def fetch_spec(props):
17
17
  return {
18
18
  'alias': {
19
- 'recipe': 'webrtc',
19
+ 'config': 'webrtc',
20
20
  'props': ['--target_os=android,unix'],
21
21
  },
22
22
  }
@@ -4,19 +4,19 @@
4
4
 
5
5
  import sys
6
6
 
7
- import recipe_util # pylint: disable=F0401
7
+ import config_util # pylint: disable=F0401
8
8
 
9
9
 
10
10
  # This class doesn't need an __init__ method, so we disable the warning
11
11
  # pylint: disable=W0232
12
- class WebRTCIOS(recipe_util.Recipe):
13
- """Basic Recipe alias for iOS -> WebRTC."""
12
+ class WebRTCIOS(config_util.Config):
13
+ """Basic Config alias for iOS -> WebRTC."""
14
14
 
15
15
  @staticmethod
16
16
  def fetch_spec(props):
17
17
  return {
18
18
  'alias': {
19
- 'recipe': 'webrtc',
19
+ 'config': 'webrtc',
20
20
  'props': ['--target_os=ios,mac'],
21
21
  },
22
22
  }
@@ -51,7 +51,7 @@ def fix_default_encoding():
51
51
  except locale.Error:
52
52
  continue
53
53
  try:
54
- lang = locale.getlocale(aref)[0]
54
+ lang, _ = locale.getdefaultlocale()
55
55
  except (TypeError, ValueError):
56
56
  continue
57
57
  if lang:
@@ -171,7 +171,7 @@ class WinUnicodeOutputBase(object):
171
171
  try:
172
172
  for line in lines:
173
173
  self.write(line)
174
- except Exception, e:
174
+ except Exception as e:
175
175
  complain('%s.writelines: %r' % (self.name, e))
176
176
  raise
177
177
 
@@ -230,7 +230,7 @@ class WinUnicodeConsoleOutput(WinUnicodeOutputBase):
230
230
  if not remaining:
231
231
  break
232
232
  text = text[int(n.value):]
233
- except Exception, e:
233
+ except Exception as e:
234
234
  complain('%s.write: %r' % (self.name, e))
235
235
  raise
236
236
 
@@ -253,7 +253,7 @@ class WinUnicodeOutput(WinUnicodeOutputBase):
253
253
  def flush(self):
254
254
  try:
255
255
  self._stream.flush()
256
- except Exception, e:
256
+ except Exception as e:
257
257
  complain('%s.flush: %r from %r' % (self.name, e, self._stream))
258
258
  raise
259
259
 
@@ -263,7 +263,7 @@ class WinUnicodeOutput(WinUnicodeOutputBase):
263
263
  # Replace characters that cannot be printed instead of failing.
264
264
  text = text.encode(self.encoding, 'replace')
265
265
  self._stream.write(text)
266
- except Exception, e:
266
+ except Exception as e:
267
267
  complain('%s.write: %r' % (self.name, e))
268
268
  raise
269
269
 
@@ -348,7 +348,7 @@ def fix_win_console(encoding):
348
348
  # TODO(maruel): Do sys.stdin with ReadConsoleW(). Albeit the limitation is
349
349
  # "It doesn't appear to be possible to read Unicode characters in UTF-8
350
350
  # mode" and this appears to be a limitation of cmd.exe.
351
- except Exception, e:
351
+ except Exception as e:
352
352
  complain('exception %r while fixing up sys.stdout and sys.stderr' % e)
353
353
  return True
354
354
 
@@ -20,8 +20,6 @@ import tempfile
20
20
  import time
21
21
  import urllib2
22
22
 
23
- import breakpad # pylint: disable=W0611
24
-
25
23
 
26
24
  import auth
27
25
  import fix_encoding
@@ -47,8 +45,10 @@ CODEREVIEW_SETTINGS = {
47
45
  # we store information about changelists.
48
46
  REPOSITORY_ROOT = ""
49
47
 
50
- # Replacement for project name.
51
- SWITCH_TO_GIT = "SWITCH_TO_GIT_ALREADY"
48
+ # Printed when people upload patches using svn.
49
+ SWITCH_TO_GIT = """You're using svn to work on depot_tools.
50
+ Consider switching to git today, so that you're ready when svn stops working
51
+ and you need a functional checkout for a future fire."""
52
52
 
53
53
  # Filename where we store repository specific information for gcl.
54
54
  CODEREVIEW_SETTINGS_FILE = "codereview.settings"
@@ -69,15 +69,9 @@ def CheckHomeForFile(filename):
69
69
  """Checks the users home dir for the existence of the given file. Returns
70
70
  the path to the file if it's there, or None if it is not.
71
71
  """
72
- home_vars = ['HOME']
73
- if sys.platform in ('cygwin', 'win32'):
74
- home_vars.append('USERPROFILE')
75
- for home_var in home_vars:
76
- home = os.getenv(home_var)
77
- if home != None:
78
- full_path = os.path.join(home, filename)
79
- if os.path.exists(full_path):
80
- return full_path
72
+ full_path = os.path.expanduser(os.path.join('~', filename))
73
+ if os.path.exists(full_path):
74
+ return full_path
81
75
  return None
82
76
 
83
77
 
@@ -747,12 +741,6 @@ def GetTreeStatus():
747
741
 
748
742
  def OptionallyDoPresubmitChecks(change_info, committing, args):
749
743
  if FilterFlag(args, "--no_presubmit") or FilterFlag(args, "--force"):
750
- breakpad.SendStack(
751
- breakpad.DEFAULT_URL + '/breakpad',
752
- 'GclHooksBypassedCommit',
753
- 'Issue %s/%s bypassed hook when committing (tree status was "%s")' %
754
- (change_info.rietveld, change_info.issue, GetTreeStatus()),
755
- verbose=False)
756
744
  return presubmit_support.PresubmitOutput()
757
745
  return DoPresubmitChecks(change_info, committing, True)
758
746
 
@@ -884,7 +872,8 @@ def CMDupload(change_info, args):
884
872
 
885
873
  project = GetCodeReviewSetting("PROJECT")
886
874
  if project:
887
- upload_arg.append("--project=%s" % SWITCH_TO_GIT)
875
+ print SWITCH_TO_GIT
876
+ upload_arg.append("--project=%s" % project)
888
877
 
889
878
  if not any(i.startswith('--title') or i.startswith('-t') for i in args):
890
879
  upload_arg.append('--title= ')
@@ -926,7 +915,8 @@ def CMDupload(change_info, args):
926
915
 
927
916
  project = GetCodeReviewSetting("PROJECT")
928
917
  if project:
929
- upload_arg.append("--project=%s" % SWITCH_TO_GIT)
918
+ print SWITCH_TO_GIT
919
+ upload_arg.append("--project=%s" % project)
930
920
 
931
921
  # If we have a lot of files with long paths, then we won't be able to fit
932
922
  # the command to "svn diff". Instead, we generate the diff manually for
@@ -7,6 +7,16 @@ base_dir=$(dirname "$0")
7
7
 
8
8
  if [[ "#grep#fetch#cleanup#diff#" != *"#$1#"* ]]; then
9
9
  "$base_dir"/update_depot_tools "$@"
10
+ case $? in
11
+ 123)
12
+ # msys environment was upgraded, need to quit.
13
+ exit 0
14
+ ;;
15
+ 0)
16
+ ;;
17
+ *)
18
+ exit $?
19
+ esac
10
20
  fi
11
21
 
12
22
  PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/gclient.py" "$@"
@@ -13,6 +13,8 @@ import subprocess
13
13
  import sys
14
14
  import textwrap
15
15
 
16
+ import git_common
17
+
16
18
 
17
19
  def print_err(msg):
18
20
  print >> sys.stderr, msg
@@ -32,7 +34,7 @@ def usage(msg=None):
32
34
 
33
35
  <repository> should contain a .gclient file
34
36
  <new_workdir> must not exist
35
- ''' % os.path.basename(sys.argv[0])
37
+ '''% os.path.basename(sys.argv[0])
36
38
 
37
39
  print_err(textwrap.dedent(usage_msg))
38
40
  sys.exit(1)
@@ -70,43 +72,10 @@ def main():
70
72
  for root, dirs, _ in os.walk(repository):
71
73
  if '.git' in dirs:
72
74
  workdir = root.replace(repository, new_workdir, 1)
73
- make_workdir(os.path.join(root, '.git'),
74
- os.path.join(workdir, '.git'))
75
-
76
-
77
- def make_workdir(repository, new_workdir):
78
- print('Creating: ' + new_workdir)
79
- os.makedirs(new_workdir)
80
-
81
- GIT_DIRECTORY_WHITELIST = [
82
- 'config',
83
- 'info',
84
- 'hooks',
85
- 'logs/refs',
86
- 'objects',
87
- 'packed-refs',
88
- 'refs',
89
- 'remotes',
90
- 'rr-cache',
91
- 'svn'
92
- ]
93
-
94
- for entry in GIT_DIRECTORY_WHITELIST:
95
- make_symlink(repository, new_workdir, entry)
96
-
97
- shutil.copy2(os.path.join(repository, 'HEAD'),
98
- os.path.join(new_workdir, 'HEAD'))
99
- subprocess.check_call(['git', 'checkout', '-f'],
100
- cwd=new_workdir.rstrip('.git'))
101
-
102
-
103
- def make_symlink(repository, new_workdir, link):
104
- if not os.path.exists(os.path.join(repository, link)):
105
- return
106
- link_dir = os.path.dirname(os.path.join(new_workdir, link))
107
- if not os.path.exists(link_dir):
108
- os.makedirs(link_dir)
109
- os.symlink(os.path.join(repository, link), os.path.join(new_workdir, link))
75
+ print('Creating: %s' % workdir)
76
+ git_common.make_workdir(os.path.join(root, '.git'),
77
+ os.path.join(workdir, '.git'))
78
+ subprocess.check_call(['git', 'checkout', '-f'], cwd=workdir)
110
79
 
111
80
 
112
81
  if __name__ == '__main__':
@@ -8,7 +8,7 @@ setlocal
8
8
  PATH=%~dp0;%PATH%
9
9
 
10
10
  :: Synchronize the root directory before deferring control back to gclient.py.
11
- call "%~dp0\update_depot_tools.bat" %*
11
+ call "%~dp0update_depot_tools.bat" %*
12
12
 
13
13
  :: Defer control.
14
- %~dp0python "%~dp0\gclient.py" %*
14
+ "%~dp0python" "%~dp0gclient.py" %*
@@ -76,6 +76,8 @@
76
76
  # target_os = [ "ios" ]
77
77
  # target_os_only = True
78
78
 
79
+ from __future__ import print_function
80
+
79
81
  __version__ = '0.7'
80
82
 
81
83
  import ast
@@ -93,8 +95,6 @@ import time
93
95
  import urllib
94
96
  import urlparse
95
97
 
96
- import breakpad # pylint: disable=W0611
97
-
98
98
  import fix_encoding
99
99
  import gclient_scm
100
100
  import gclient_utils
@@ -102,7 +102,7 @@ import git_cache
102
102
  from third_party.repo.progress import Progress
103
103
  import subcommand
104
104
  import subprocess2
105
- from third_party import colorama
105
+ import setup_color
106
106
 
107
107
  CHROMIUM_SRC_URL = 'https://chromium.googlesource.com/chromium/src.git'
108
108
 
@@ -244,7 +244,7 @@ class DependencySettings(GClientKeywords):
244
244
  if (self._custom_vars.get('webkit_trunk', '') ==
245
245
  'svn://svn-mirror.golo.chromium.org/webkit-readonly/trunk'):
246
246
  new_url = 'svn://svn-mirror.golo.chromium.org/blink/trunk'
247
- print 'Overwriting Var("webkit_trunk") with %s' % new_url
247
+ print('Overwriting Var("webkit_trunk") with %s' % new_url)
248
248
  self._custom_vars['webkit_trunk'] = new_url
249
249
 
250
250
  # Post process the url to remove trailing slashes.
@@ -636,7 +636,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
636
636
  # Eval the content.
637
637
  try:
638
638
  exec(deps_content, global_scope, local_scope)
639
- except SyntaxError, e:
639
+ except SyntaxError as e:
640
640
  gclient_utils.SyntaxErrorToError(filepath, e)
641
641
  if use_strict:
642
642
  for key, val in local_scope.iteritems():
@@ -709,7 +709,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
709
709
  for name, url in deps.iteritems():
710
710
  should_process = self.recursion_limit and self.should_process
711
711
  deps_to_add.append(Dependency(
712
- self, name, url, None, None, None, None, None,
712
+ self, name, url, None, None, None, self.custom_vars, None,
713
713
  self.deps_file, should_process))
714
714
  deps_to_add.sort(key=lambda x: x.name)
715
715
 
@@ -884,24 +884,24 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
884
884
 
885
885
  match = re.match('^Binary file ([^\0]+) matches$', line)
886
886
  if match:
887
- print 'Binary file %s matches\n' % mod_path(match.group(1))
887
+ print('Binary file %s matches\n' % mod_path(match.group(1)))
888
888
  return
889
889
 
890
890
  items = line.split('\0')
891
891
  if len(items) == 2 and items[1]:
892
- print '%s : %s' % (mod_path(items[0]), items[1])
892
+ print('%s : %s' % (mod_path(items[0]), items[1]))
893
893
  elif len(items) >= 2:
894
894
  # Multiple null bytes or a single trailing null byte indicate
895
895
  # git is likely displaying filenames only (such as with -l)
896
- print '\n'.join(mod_path(path) for path in items if path)
896
+ print('\n'.join(mod_path(path) for path in items if path))
897
897
  else:
898
- print line
898
+ print(line)
899
899
  else:
900
900
  print_stdout = True
901
901
  filter_fn = None
902
902
 
903
903
  if parsed_url is None:
904
- print >> sys.stderr, 'Skipped omitted dependency %s' % cwd
904
+ print('Skipped omitted dependency %s' % cwd, file=sys.stderr)
905
905
  elif os.path.isdir(cwd):
906
906
  try:
907
907
  gclient_utils.CheckCallAndFilter(
@@ -912,7 +912,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
912
912
  if not options.ignore:
913
913
  raise
914
914
  else:
915
- print >> sys.stderr, 'Skipped missing %s' % cwd
915
+ print('Skipped missing %s' % cwd, file=sys.stderr)
916
916
 
917
917
 
918
918
  @gclient_utils.lockedmethod
@@ -981,17 +981,17 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
981
981
  start_time = time.time()
982
982
  gclient_utils.CheckCallAndFilterAndHeader(
983
983
  hook, cwd=self.root.root_dir, always=True)
984
- except (gclient_utils.Error, subprocess2.CalledProcessError), e:
984
+ except (gclient_utils.Error, subprocess2.CalledProcessError) as e:
985
985
  # Use a discrete exit status code of 2 to indicate that a hook action
986
986
  # failed. Users of this script may wish to treat hook action failures
987
987
  # differently from VC failures.
988
- print >> sys.stderr, 'Error: %s' % str(e)
988
+ print('Error: %s' % str(e), file=sys.stderr)
989
989
  sys.exit(2)
990
990
  finally:
991
991
  elapsed_time = time.time() - start_time
992
992
  if elapsed_time > 10:
993
- print "Hook '%s' took %.2f secs" % (
994
- gclient_utils.CommandToStr(hook), elapsed_time)
993
+ print("Hook '%s' took %.2f secs" % (
994
+ gclient_utils.CommandToStr(hook), elapsed_time))
995
995
 
996
996
  def RunPreDepsHooks(self):
997
997
  assert self.processed
@@ -1006,17 +1006,17 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
1006
1006
  start_time = time.time()
1007
1007
  gclient_utils.CheckCallAndFilterAndHeader(
1008
1008
  hook, cwd=self.root.root_dir, always=True)
1009
- except (gclient_utils.Error, subprocess2.CalledProcessError), e:
1009
+ except (gclient_utils.Error, subprocess2.CalledProcessError) as e:
1010
1010
  # Use a discrete exit status code of 2 to indicate that a hook action
1011
1011
  # failed. Users of this script may wish to treat hook action failures
1012
1012
  # differently from VC failures.
1013
- print >> sys.stderr, 'Error: %s' % str(e)
1013
+ print('Error: %s' % str(e), file=sys.stderr)
1014
1014
  sys.exit(2)
1015
1015
  finally:
1016
1016
  elapsed_time = time.time() - start_time
1017
1017
  if elapsed_time > 10:
1018
- print "Hook '%s' took %.2f secs" % (
1019
- gclient_utils.CommandToStr(hook), elapsed_time)
1018
+ print("Hook '%s' took %.2f secs" % (
1019
+ gclient_utils.CommandToStr(hook), elapsed_time))
1020
1020
 
1021
1021
 
1022
1022
  def subtree(self, include_all):
@@ -1246,7 +1246,7 @@ want to set 'managed': False in .gclient.
1246
1246
  self.config_content = content
1247
1247
  try:
1248
1248
  exec(content, config_dict)
1249
- except SyntaxError, e:
1249
+ except SyntaxError as e:
1250
1250
  gclient_utils.SyntaxErrorToError('.gclient', e)
1251
1251
 
1252
1252
  # Append any target OS that is not already being enforced to the tuple.
@@ -1378,6 +1378,9 @@ been automagically updated. The previous version is available at %s.old.
1378
1378
  client = GClient('.', options)
1379
1379
  client.SetConfig(options.spec)
1380
1380
  else:
1381
+ if options.verbose:
1382
+ print('Looking for %s starting from %s\n' % (
1383
+ options.config_filename, os.getcwd()))
1381
1384
  path = gclient_utils.FindGclientRoot(os.getcwd(), options.config_filename)
1382
1385
  if not path:
1383
1386
  return None
@@ -1389,13 +1392,14 @@ been automagically updated. The previous version is available at %s.old.
1389
1392
  if (options.revisions and
1390
1393
  len(client.dependencies) > 1 and
1391
1394
  any('@' not in r for r in options.revisions)):
1392
- print >> sys.stderr, (
1393
- 'You must specify the full solution name like --revision %s@%s\n'
1394
- 'when you have multiple solutions setup in your .gclient file.\n'
1395
- 'Other solutions present are: %s.') % (
1395
+ print(
1396
+ ('You must specify the full solution name like --revision %s@%s\n'
1397
+ 'when you have multiple solutions setup in your .gclient file.\n'
1398
+ 'Other solutions present are: %s.') % (
1396
1399
  client.dependencies[0].name,
1397
1400
  options.revisions[0],
1398
- ', '.join(s.name for s in client.dependencies[1:]))
1401
+ ', '.join(s.name for s in client.dependencies[1:])),
1402
+ file=sys.stderr)
1399
1403
  return client
1400
1404
 
1401
1405
  def SetDefaultConfig(self, solution_name, deps_file, solution_url,
@@ -1440,7 +1444,7 @@ been automagically updated. The previous version is available at %s.old.
1440
1444
  return {}
1441
1445
  try:
1442
1446
  exec(gclient_utils.FileRead(filename), scope)
1443
- except SyntaxError, e:
1447
+ except SyntaxError as e:
1444
1448
  gclient_utils.SyntaxErrorToError(filename, e)
1445
1449
  return scope['entries']
1446
1450
 
@@ -1507,7 +1511,7 @@ been automagically updated. The previous version is available at %s.old.
1507
1511
  revision_overrides = self._EnforceRevisions()
1508
1512
  pm = None
1509
1513
  # Disable progress for non-tty stdout.
1510
- if (sys.stdout.isatty() and not self._options.verbose and progress):
1514
+ if (setup_color.IS_TTY and not self._options.verbose and progress):
1511
1515
  if command in ('update', 'revert'):
1512
1516
  pm = Progress('Syncing projects', 1)
1513
1517
  elif command == 'recurse':
@@ -1519,8 +1523,8 @@ been automagically updated. The previous version is available at %s.old.
1519
1523
  work_queue.enqueue(s)
1520
1524
  work_queue.flush(revision_overrides, command, args, options=self._options)
1521
1525
  if revision_overrides:
1522
- print >> sys.stderr, ('Please fix your script, having invalid '
1523
- '--revision flags will soon considered an error.')
1526
+ print('Please fix your script, having invalid --revision flags will soon '
1527
+ 'considered an error.', file=sys.stderr)
1524
1528
 
1525
1529
  # Once all the dependencies have been processed, it's now safe to run the
1526
1530
  # hooks.
@@ -1695,6 +1699,12 @@ been automagically updated. The previous version is available at %s.old.
1695
1699
  """No DEPS to parse for a .gclient file."""
1696
1700
  raise gclient_utils.Error('Internal error')
1697
1701
 
1702
+ def PrintLocationAndContents(self):
1703
+ # Print out the .gclient file. This is longer than if we just printed the
1704
+ # client dict, but more legible, and it might contain helpful comments.
1705
+ print('Loaded .gclient config in %s:\n%s' % (
1706
+ self.root_dir, self.config_content))
1707
+
1698
1708
  @property
1699
1709
  def root_dir(self):
1700
1710
  """Root directory of gclient checkout."""
@@ -1737,9 +1747,7 @@ def CMDcleanup(parser, args):
1737
1747
  if not client:
1738
1748
  raise gclient_utils.Error('client not configured; see \'gclient config\'')
1739
1749
  if options.verbose:
1740
- # Print out the .gclient file. This is longer than if we just printed the
1741
- # client dict, but more legible, and it might contain helpful comments.
1742
- print(client.config_content)
1750
+ client.PrintLocationAndContents()
1743
1751
  return client.RunOnDeps('cleanup', args)
1744
1752
 
1745
1753
 
@@ -1763,13 +1771,14 @@ def CMDrecurse(parser, args):
1763
1771
  help='Disable progress bar that shows sub-command updates')
1764
1772
  options, args = parser.parse_args(args)
1765
1773
  if not args:
1766
- print >> sys.stderr, 'Need to supply a command!'
1774
+ print('Need to supply a command!', file=sys.stderr)
1767
1775
  return 1
1768
1776
  root_and_entries = gclient_utils.GetGClientRootAndEntries()
1769
1777
  if not root_and_entries:
1770
- print >> sys.stderr, (
1778
+ print(
1771
1779
  'You need to run gclient sync at least once to use \'recurse\'.\n'
1772
- 'This is because .gclient_entries needs to exist and be up to date.')
1780
+ 'This is because .gclient_entries needs to exist and be up to date.',
1781
+ file=sys.stderr)
1773
1782
  return 1
1774
1783
 
1775
1784
  # Normalize options.scm to a set()
@@ -1803,13 +1812,13 @@ def CMDgrep(parser, args):
1803
1812
  # We can't use optparse because it will try to parse arguments sent
1804
1813
  # to git grep and throw an error. :-(
1805
1814
  if not args or re.match('(-h|--help)$', args[0]):
1806
- print >> sys.stderr, (
1815
+ print(
1807
1816
  'Usage: gclient grep [-j <N>] git-grep-args...\n\n'
1808
1817
  'Example: "gclient grep -j10 -A2 RefCountedBase" runs\n"git grep '
1809
1818
  '-A2 RefCountedBase" on each of gclient\'s git\nrepos with up to '
1810
1819
  '10 jobs.\n\nBonus: page output by appending "|& less -FRSX" to the'
1811
- ' end of your query.'
1812
- )
1820
+ ' end of your query.',
1821
+ file=sys.stderr)
1813
1822
  return 1
1814
1823
 
1815
1824
  jobs_arg = ['--jobs=1']
@@ -1886,6 +1895,12 @@ def CMDconfig(parser, args):
1886
1895
  else:
1887
1896
  # specify an alternate relpath for the given URL.
1888
1897
  name = options.name
1898
+ if not os.path.abspath(os.path.join(os.getcwd(), name)).startswith(
1899
+ os.getcwd()):
1900
+ parser.error('Do not pass a relative path for --name.')
1901
+ if any(x in ('..', '.', '/', '\\') for x in name.split(os.sep)):
1902
+ parser.error('Do not include relative path components in --name.')
1903
+
1889
1904
  deps_file = options.deps_file
1890
1905
  safesync_url = ''
1891
1906
  if len(args) > 1:
@@ -1921,9 +1936,7 @@ def CMDpack(parser, args):
1921
1936
  if not client:
1922
1937
  raise gclient_utils.Error('client not configured; see \'gclient config\'')
1923
1938
  if options.verbose:
1924
- # Print out the .gclient file. This is longer than if we just printed the
1925
- # client dict, but more legible, and it might contain helpful comments.
1926
- print(client.config_content)
1939
+ client.PrintLocationAndContents()
1927
1940
  return client.RunOnDeps('pack', args)
1928
1941
 
1929
1942
 
@@ -1938,9 +1951,7 @@ def CMDstatus(parser, args):
1938
1951
  if not client:
1939
1952
  raise gclient_utils.Error('client not configured; see \'gclient config\'')
1940
1953
  if options.verbose:
1941
- # Print out the .gclient file. This is longer than if we just printed the
1942
- # client dict, but more legible, and it might contain helpful comments.
1943
- print(client.config_content)
1954
+ client.PrintLocationAndContents()
1944
1955
  return client.RunOnDeps('status', args)
1945
1956
 
1946
1957
 
@@ -2039,6 +2050,14 @@ def CMDsync(parser, args):
2039
2050
  help='Don\'t bootstrap from Google Storage.')
2040
2051
  parser.add_option('--ignore_locks', action='store_true',
2041
2052
  help='GIT ONLY - Ignore cache locks.')
2053
+ parser.add_option('--break_repo_locks', action='store_true',
2054
+ help='GIT ONLY - Forcibly remove repo locks (e.g. '
2055
+ 'index.lock). This should only be used if you know for '
2056
+ 'certain that this invocation of gclient is the only '
2057
+ 'thing operating on the git repos (e.g. on a bot).')
2058
+ parser.add_option('--lock_timeout', type='int', default=5000,
2059
+ help='GIT ONLY - Deadline (in seconds) to wait for git '
2060
+ 'cache lock to become available. Default is %default.')
2042
2061
  (options, args) = parser.parse_args(args)
2043
2062
  client = GClient.LoadCurrentConfig(options)
2044
2063
 
@@ -2050,9 +2069,7 @@ def CMDsync(parser, args):
2050
2069
  print('Warning: you cannot use both --head and --revision')
2051
2070
 
2052
2071
  if options.verbose:
2053
- # Print out the .gclient file. This is longer than if we just printed the
2054
- # client dict, but more legible, and it might contain helpful comments.
2055
- print(client.config_content)
2072
+ client.PrintLocationAndContents()
2056
2073
  ret = client.RunOnDeps('update', args)
2057
2074
  if options.output_json:
2058
2075
  slns = {}
@@ -2082,9 +2099,7 @@ def CMDdiff(parser, args):
2082
2099
  if not client:
2083
2100
  raise gclient_utils.Error('client not configured; see \'gclient config\'')
2084
2101
  if options.verbose:
2085
- # Print out the .gclient file. This is longer than if we just printed the
2086
- # client dict, but more legible, and it might contain helpful comments.
2087
- print(client.config_content)
2102
+ client.PrintLocationAndContents()
2088
2103
  return client.RunOnDeps('diff', args)
2089
2104
 
2090
2105
 
@@ -2103,6 +2118,11 @@ def CMDrevert(parser, args):
2103
2118
  help='don\'t run pre-DEPS hooks', default=False)
2104
2119
  parser.add_option('--upstream', action='store_true',
2105
2120
  help='Make repo state match upstream branch.')
2121
+ parser.add_option('--break_repo_locks', action='store_true',
2122
+ help='GIT ONLY - Forcibly remove repo locks (e.g. '
2123
+ 'index.lock). This should only be used if you know for '
2124
+ 'certain that this invocation of gclient is the only '
2125
+ 'thing operating on the git repos (e.g. on a bot).')
2106
2126
  (options, args) = parser.parse_args(args)
2107
2127
  # --force is implied.
2108
2128
  options.force = True
@@ -2127,9 +2147,7 @@ def CMDrunhooks(parser, args):
2127
2147
  if not client:
2128
2148
  raise gclient_utils.Error('client not configured; see \'gclient config\'')
2129
2149
  if options.verbose:
2130
- # Print out the .gclient file. This is longer than if we just printed the
2131
- # client dict, but more legible, and it might contain helpful comments.
2132
- print(client.config_content)
2150
+ client.PrintLocationAndContents()
2133
2151
  options.force = True
2134
2152
  options.nohooks = False
2135
2153
  return client.RunOnDeps('runhooks', args)
@@ -2171,7 +2189,7 @@ def CMDhookinfo(parser, args):
2171
2189
  if not client:
2172
2190
  raise gclient_utils.Error('client not configured; see \'gclient config\'')
2173
2191
  client.RunOnDeps(None, [])
2174
- print '; '.join(' '.join(hook) for hook in client.GetHooks(options))
2192
+ print('; '.join(' '.join(hook) for hook in client.GetHooks(options)))
2175
2193
  return 0
2176
2194
 
2177
2195
 
@@ -2187,10 +2205,10 @@ def CMDverify(parser, args):
2187
2205
  bad_deps = dep.findDepsFromNotAllowedHosts()
2188
2206
  if not bad_deps:
2189
2207
  continue
2190
- print "There are deps from not allowed hosts in file %s" % dep.deps_file
2208
+ print("There are deps from not allowed hosts in file %s" % dep.deps_file)
2191
2209
  for bad_dep in bad_deps:
2192
- print "\t%s at %s" % (bad_dep.name, bad_dep.url)
2193
- print "allowed_hosts:", ', '.join(dep.allowed_hosts)
2210
+ print("\t%s at %s" % (bad_dep.name, bad_dep.url))
2211
+ print("allowed_hosts:", ', '.join(dep.allowed_hosts))
2194
2212
  sys.stdout.flush()
2195
2213
  raise gclient_utils.Error(
2196
2214
  'dependencies from disallowed hosts; check your DEPS file.')
@@ -2283,25 +2301,27 @@ def main(argv):
2283
2301
  """Doesn't parse the arguments here, just find the right subcommand to
2284
2302
  execute."""
2285
2303
  if sys.hexversion < 0x02060000:
2286
- print >> sys.stderr, (
2304
+ print(
2287
2305
  '\nYour python version %s is unsupported, please upgrade.\n' %
2288
- sys.version.split(' ', 1)[0])
2306
+ sys.version.split(' ', 1)[0],
2307
+ file=sys.stderr)
2289
2308
  return 2
2290
2309
  if not sys.executable:
2291
- print >> sys.stderr, (
2292
- '\nPython cannot find the location of it\'s own executable.\n')
2310
+ print(
2311
+ '\nPython cannot find the location of it\'s own executable.\n',
2312
+ file=sys.stderr)
2293
2313
  return 2
2294
2314
  fix_encoding.fix_encoding()
2295
2315
  disable_buffering()
2296
- colorama.init()
2316
+ setup_color.init()
2297
2317
  dispatcher = subcommand.CommandDispatcher(__name__)
2298
2318
  try:
2299
2319
  return dispatcher.execute(OptionParser(), argv)
2300
2320
  except KeyboardInterrupt:
2301
2321
  gclient_utils.GClientChildren.KillAllRemainingChildren()
2302
2322
  raise
2303
- except (gclient_utils.Error, subprocess2.CalledProcessError), e:
2304
- print >> sys.stderr, 'Error: %s' % str(e)
2323
+ except (gclient_utils.Error, subprocess2.CalledProcessError) as e:
2324
+ print('Error: %s' % str(e), file=sys.stderr)
2305
2325
  return 1
2306
2326
  finally:
2307
2327
  gclient_utils.PrintWarnings()