libv8 7.3.492.27.1 → 7.3.492.27.3beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/ext/libv8/builder.rb +1 -2
  4. data/lib/libv8/version.rb +1 -1
  5. data/vendor/depot_tools/.gitignore +4 -1
  6. data/vendor/depot_tools/autoninja.bat +8 -0
  7. data/vendor/depot_tools/autoninja.py +1 -1
  8. data/vendor/depot_tools/cipd_manifest.txt +2 -2
  9. data/vendor/depot_tools/cipd_manifest.versions +52 -52
  10. data/vendor/depot_tools/gclient.py +4 -1
  11. data/vendor/depot_tools/gclient_scm.py +17 -6
  12. data/vendor/depot_tools/git_cache.py +109 -128
  13. data/vendor/depot_tools/git_cl.py +98 -26
  14. data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
  15. data/vendor/depot_tools/man/src/filter_demo_output.py +1 -1
  16. data/vendor/depot_tools/metrics.README.md +3 -3
  17. data/vendor/depot_tools/metrics.py +3 -2
  18. data/vendor/depot_tools/metrics_utils.py +1 -11
  19. data/vendor/depot_tools/owners.py +109 -32
  20. data/vendor/depot_tools/patch.py +1 -1
  21. data/vendor/depot_tools/recipes/README.recipes.md +23 -20
  22. data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +1 -0
  23. data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +67 -51
  24. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic.json +7 -0
  25. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json +7 -0
  26. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json +7 -0
  27. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json +7 -0
  28. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +1 -1
  29. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json +7 -0
  30. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json +7 -0
  31. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json +7 -0
  32. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json +7 -0
  33. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json +8 -1
  34. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json +57 -0
  35. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_branch_head.json +59 -0
  36. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json +57 -0
  37. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_master.json +59 -0
  38. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/refs.json +7 -0
  39. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json +7 -0
  40. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +1 -1
  41. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +9 -2
  42. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +8 -1
  43. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json +8 -1
  44. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json +8 -1
  45. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json +11 -2
  46. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json +9 -2
  47. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json +8 -1
  48. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +8 -1
  49. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +8 -1
  50. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json +0 -7
  51. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json +7 -0
  52. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.py +92 -3
  53. data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +2 -2
  54. data/vendor/depot_tools/scm.py +1 -1
  55. data/vendor/depot_tools/upload_to_google_storage.py +1 -1
  56. metadata +8 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5f3a751f1949fb116d34c03ea18a114d99e16f004edb49ecdfa921b25a2d4b3
4
- data.tar.gz: 94adb9e6ad6311d80d3df8e07105fb874a44284264d5b4154bf557c32d1161f0
3
+ metadata.gz: 5321dc353de2410898c5ac90db9b9a56cdd0f07b0fe29477679717159b3ccbb8
4
+ data.tar.gz: 7893a2e6e871e59cf156828f6825fa24ba0634ac93bdf44f0835b1104b5d695e
5
5
  SHA512:
6
- metadata.gz: 3bc4c9522848a968e061accedc85ac5a40d3effaeecc0109e51372d9cbd82f525ca9521cd57d5a8115dff7b865c58975023462b1d1c6532134529b9339b2c866
7
- data.tar.gz: 2ae44f9bf3b789160b160700dbbea8fbd14b360177c804637ba9e186562c56ed38d9b20feb74f945283e7b1315ca93df35fdf12052f53b95aa1352f6a65a412a
6
+ metadata.gz: 4beb86a19489d3066056a91870da1b01d0137208158a371f4397cd7ba0b84c1c916c9efefc333c4f7c5a0f9e22314da25c16ffe16fc25df05f262490dd14993d
7
+ data.tar.gz: 0025be7136ef59e550b8e529937b3c7793933732d8314be414ec093092b2c599c5ee2abbdf1cd1c6e3c0286ffb0ab33d2d96c77aa6bab8a0deb021e6f22f1762
@@ -1,3 +1,7 @@
1
+ ### Unreleased
2
+
3
+ * Enable I18n support in V8
4
+
1
5
  ### v7.3.492.27.0, v7.3.492.27.1 - 2019-04-24
2
6
 
3
7
  * Update upstream v8 version to 7.3.492.27
@@ -23,8 +23,7 @@ module Libv8
23
23
  v8_use_external_startup_data=false
24
24
  target_cpu="#{libv8_arch}"
25
25
  v8_target_cpu="#{libv8_arch}"
26
- treat_warnings_as_errors=false
27
- v8_enable_i18n_support=false).join(' ')
26
+ treat_warnings_as_errors=false).join(' ')
28
27
  end
29
28
 
30
29
  def generate_gn_args
@@ -1,3 +1,3 @@
1
1
  module Libv8
2
- VERSION = "7.3.492.27.1"
2
+ VERSION = "7.3.492.27.3beta1"
3
3
  end
@@ -84,4 +84,7 @@ testing_support/google_appengine
84
84
  /metrics.cfg
85
85
 
86
86
  # Ignore the ninjalog upload config.
87
- /ninjalog.cfg
87
+ /ninjalog.cfg
88
+
89
+ # Ignore git traces produced by git push on git-cl upload.
90
+ /traces
@@ -3,9 +3,17 @@
3
3
  :: Use of this source code is governed by a BSD-style license that can be
4
4
  :: found in the LICENSE file.
5
5
 
6
+ setlocal
7
+
6
8
  REM Set unique build ID.
7
9
  FOR /f "usebackq tokens=*" %%a in (`python -c "import uuid; print uuid.uuid4()"`) do set AUTONINJA_BUILD_ID=%%a
8
10
 
11
+ REM If a build performance summary has been requested then also set NINJA_STATUS
12
+ REM to trigger more verbose status updates. In particular this makes it possible
13
+ REM to see how quickly process creation is happening - often a critical clue on
14
+ REM Windows. The trailing space is intentional.
15
+ if "%NINJA_SUMMARIZE_BUILD%" == "1" set NINJA_STATUS=[%%r processes, %%f/%%t @ %%o/s : %%es ]
16
+
9
17
  REM Execute whatever is printed by autoninja.py.
10
18
  REM Also print it to reassure that the right settings are being used.
11
19
  FOR /f "usebackq tokens=*" %%a in (`python %~dp0autoninja.py "%*"`) do echo %%a & %%a
@@ -60,7 +60,7 @@ try:
60
60
  with open(os.path.join(output_dir, 'args.gn')) as file_handle:
61
61
  for line in file_handle:
62
62
  # This regex pattern copied from create_installer_archive.py
63
- m = re.match('^\s*use_goma\s*=\s*true(\s*$|\s*#.*$)', line)
63
+ m = re.match(r'^\s*use_goma\s*=\s*true(\s*$|\s*#.*$)', line)
64
64
  if m:
65
65
  use_goma = True
66
66
  except IOError:
@@ -22,10 +22,10 @@ $VerifiedPlatform linux-mips64 linux-mips64le linux-mipsle
22
22
  infra/tools/luci/vpython/${platform} git_revision:0bff6ebf817352838b0e6f65fd6460b38c505c9c
23
23
 
24
24
  # LUCI editor
25
- infra/tools/luci/led/${platform} git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
25
+ infra/tools/luci/led/${platform} git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
26
26
 
27
27
  # LUCI config generator
28
- infra/tools/luci/lucicfg/${platform} git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
28
+ infra/tools/luci/lucicfg/${platform} git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
29
29
 
30
30
  # Mac toolchain installer
31
31
  infra/tools/mac_toolchain/${os=mac}-${arch} git_revision:edd5644be66d37cdf82978efb0e5d6504d0d552f
@@ -106,108 +106,108 @@ infra/tools/luci-auth/windows-amd64
106
106
  GBs8p3OBQPPVvztd0oS5qFhvEy5JVvPZFnbod0DZ-FAC
107
107
 
108
108
  infra/tools/luci/led/linux-386
109
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
110
- WmLhGAU8dI-OUoQFtns-pa4cwdmPsgEi0ifsEsgXGIoC
109
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
110
+ f65Ck-56x8iB11aHOos87RPvnGb8lBCu50osiuvAGP4C
111
111
 
112
112
  infra/tools/luci/led/linux-amd64
113
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
114
- bIXofUbVs48AlVC4Wg8EQILoOonaYPPX1uSXgiy_sP8C
113
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
114
+ tuF6k0Pgjv8ko9_v3T_hq9tFRtDI9eGKoRnAIvIY2aIC
115
115
 
116
116
  infra/tools/luci/led/linux-arm64
117
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
118
- PEzkMzBHP2aQXCByroOgjlbO_RHg9uKLqKK7_5EFvUkC
117
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
118
+ m5ywbTNqVtvJVZ55jAcOPo2BkPdlPvZcErIYO6YFiqgC
119
119
 
120
120
  infra/tools/luci/led/linux-armv6l
121
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
122
- iuHuYjaoRnUa1DtgIW_VqutuVVDScDeRGFlMvG_F4oEC
121
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
122
+ SpQmAAVXem9w9WcWHtfjysdHL4Siu-D6VMCOL1n78wwC
123
123
 
124
124
  infra/tools/luci/led/linux-mips64
125
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
126
- 9nte8TLuUUpDqdGurb5YQ5_yrIIHAe8QC7nlsqZv8eIC
125
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
126
+ zh_JUvzlUX4KEgRsWTe821QE4sBg9RmPdrQvsnwnGHwC
127
127
 
128
128
  infra/tools/luci/led/linux-mips64le
129
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
130
- qiJ8qoUmPPmfq-Fkox0cFtPEVhFRuw5EMTdNjVIMtT8C
129
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
130
+ In3IWJ0mtOmF6FSA4LSQky_W1pcy1sToc_nSYMRK-vAC
131
131
 
132
132
  infra/tools/luci/led/linux-mipsle
133
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
134
- RtausZx16fkl65FgESrLvYX12FWJwnZGRket5j8n7p4C
133
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
134
+ kRFA9I-L-NnF7X1OsqDWnr2lkOuzgfuRKTY4OP138VUC
135
135
 
136
136
  infra/tools/luci/led/linux-ppc64
137
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
138
- yVttYbuzyiJWgWPf6tEoV80EtuOLiNvuRwJSoYoQrp4C
137
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
138
+ tizc_x9nS4mPurDy435pqD7hZI18YxN0WWeEIjqzbY8C
139
139
 
140
140
  infra/tools/luci/led/linux-ppc64le
141
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
142
- N4VNZVNlmIUYTyBleWG3M8-Lz0j9B8fyi8h6GIjawCMC
141
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
142
+ LXH0gMErZY7zzVZVS9QB_C1TPUpmzxm4JkrYtNWznhMC
143
143
 
144
144
  infra/tools/luci/led/linux-s390x
145
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
146
- lDaipKpuK69E3jDZesWdQmeW5McLDesvSqhRumCcP14C
145
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
146
+ srzPKRFkTHYC-_U-IOnwub8MlgwW0T4KqxJuUZ8-tbIC
147
147
 
148
148
  infra/tools/luci/led/mac-amd64
149
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
150
- yFn0BLG3ZK1vIwcbWuniqi7w3gsOED7-BWvdAPfh8_4C
149
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
150
+ FqWvQqAPxJBKARcF-afsNyJTlmNsvO0q_0EyBlilAZUC
151
151
 
152
152
  infra/tools/luci/led/windows-386
153
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
154
- EFthyJJIkZJfC52-d8jd0vVmZibzDbrvGqDwsuRD7hsC
153
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
154
+ apfJayXPEbugi7-gIWUH_F9BsYU30MjlDxHnikvxV6kC
155
155
 
156
156
  infra/tools/luci/led/windows-amd64
157
- git_revision:e4631c9c5c5abf39ac8247aaf647a95563714ec1
158
- VlDL4g6pdFTxz61iQdlA55IWS2Gx8421BcXm92H5iLEC
157
+ git_revision:201038605be27025b386bfa5e7c9b4945aa6027d
158
+ cbmSVvGk8oz4_2tLG-j3JOsJ89ZWfJW_tMURj4GSQGgC
159
159
 
160
160
  infra/tools/luci/lucicfg/linux-386
161
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
162
- RyA-MKvh2YU4w-1MBZ3XFnFJDvAB5f-TUCfPy6Vo-hwC
161
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
162
+ oKHGrFGwV6d8u7cZlNn0pxLt8S6WGfdaDxeec7xtHnUC
163
163
 
164
164
  infra/tools/luci/lucicfg/linux-amd64
165
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
166
- KnFdZRjhMkpQ8cp5kUncDG6Kj2KXHE6b1L3j9mYBBM8C
165
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
166
+ ElPoPGvTKN2_SqCk1xQz_8a27V-BdFQ3vCIWr-WPbpYC
167
167
 
168
168
  infra/tools/luci/lucicfg/linux-arm64
169
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
170
- jFW-An-kloCZGZGCZ27eWn465kt6znCdflqKUuYeAaIC
169
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
170
+ s9djXyOsGamo8iSBK0xnRfkgiQvXkpKi2fUKoDMjFs4C
171
171
 
172
172
  infra/tools/luci/lucicfg/linux-armv6l
173
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
174
- f5ajllwfnkbwHTZUhq8fAomKL1T-mrqrcrGQiy8rbbQC
173
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
174
+ SM5jr0ti1apt7NvZuC-nShMkFdxImG5QOZu2_oTojlgC
175
175
 
176
176
  infra/tools/luci/lucicfg/linux-mips64
177
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
178
- CKxhSu3ddgRPM31mCZDDHXI9PTw27236SkVf-u7qwd4C
177
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
178
+ 1v1wY1kcotYt6PiNRCVv7XRGVmExcal4BIyYLdEphucC
179
179
 
180
180
  infra/tools/luci/lucicfg/linux-mips64le
181
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
182
- nqyKvhL5PorLQbKqWY7WElNHDvtkV3bvz3h0figLepwC
181
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
182
+ JRxI8uGklbokPTFKnLXDg7SkP7wIeBtk2fpgKMKXfIYC
183
183
 
184
184
  infra/tools/luci/lucicfg/linux-mipsle
185
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
186
- W4GuKT7dAoMQwG4vnqT8e1VsV8VIMz3NzQmgtFOeaDUC
185
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
186
+ sNRitF-m4rPbAp7Qc1zCsKXlQ-w_mwWdpoSC5Lfj8SQC
187
187
 
188
188
  infra/tools/luci/lucicfg/linux-ppc64
189
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
190
- ydOFRX3yAkcDJHbqY8d-KZBpKHbJE3bWeVO3UET6_5kC
189
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
190
+ oW72rSZzoVtNy6tKT68QJpnRTQXZIAZ9FYgWkWQdxVEC
191
191
 
192
192
  infra/tools/luci/lucicfg/linux-ppc64le
193
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
194
- M8XG-GiXv_YVmR05pcc3IobNS_QKZY8YrhG5hPSwmb4C
193
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
194
+ EWYwgpUcB38JJsONXAluKK1PNRwbdn1InprRgiIURcUC
195
195
 
196
196
  infra/tools/luci/lucicfg/linux-s390x
197
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
198
- uO0EFzlu-ytLrVwSi9U-8TF3TuP3aqFqpci5j-xTsKEC
197
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
198
+ 177EmZFtynwRGm6ym5dOIfrXAT_aJNLbn6GF3hdchYwC
199
199
 
200
200
  infra/tools/luci/lucicfg/mac-amd64
201
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
202
- 88C0eZY7h_pTim4U_BHokhp5T-Ajg79uqmCswmHcOXkC
201
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
202
+ 4S8vkAdhJeKzYv0qKMYXL13eiFICS80bTL7DbhTWSgsC
203
203
 
204
204
  infra/tools/luci/lucicfg/windows-386
205
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
206
- GtDSK5R4yqlRNbpgPW6pX41mU8ScrZBKc0_HnkMwDr0C
205
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
206
+ e8HjDgXAimjOzOejNtRm0Ni8qCJKUIkTTmBmzCBJWNsC
207
207
 
208
208
  infra/tools/luci/lucicfg/windows-amd64
209
- git_revision:b1dbee0e43053ad42566a64d37b0eb1502a20302
210
- MqpuIAeFAetEW11Ux-OBSFdcsH9mINm6nonJKqB-S2IC
209
+ git_revision:1399f5bdee4cf1c0826b64cf103418b1b9e7c15b
210
+ B-6hDi0Z_r1xBDh9uBaIJlwbRZMNDrfRQFUyaU8ps5oC
211
211
 
212
212
  infra/tools/luci/vpython/linux-386
213
213
  git_revision:0bff6ebf817352838b0e6f65fd6460b38c505c9c
@@ -125,6 +125,8 @@ except NameError:
125
125
  basestring = str
126
126
 
127
127
 
128
+ DEPOT_TOOLS_DIR = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
129
+
128
130
  # Singleton object to represent an unset cache_dir (as opposed to a disabled
129
131
  # one, e.g. if a spec explicitly says `cache_dir = None`.)
130
132
  UNSET_CACHE_DIR = object()
@@ -3100,7 +3102,8 @@ def disable_buffering():
3100
3102
 
3101
3103
  def path_contains_tilde():
3102
3104
  for element in os.environ['PATH'].split(os.pathsep):
3103
- if element.startswith('~/'):
3105
+ if element.startswith('~') and os.path.abspath(
3106
+ os.path.realpath(os.path.expanduser(element))) == DEPOT_TOOLS_DIR:
3104
3107
  return True
3105
3108
  return False
3106
3109
 
@@ -370,11 +370,7 @@ class GitWrapper(SCMWrapper):
370
370
  return ref
371
371
  self.Print('Failed to find a remote ref that contains %s. '
372
372
  'Candidate refs were %s.' % (commit, remote_refs))
373
- # Fallback to the commit we got.
374
- # This means that apply_path_ref will try to find the merge-base between the
375
- # patch and the commit (which is most likely the commit) and cherry-pick
376
- # everything in between.
377
- return commit
373
+ return None
378
374
 
379
375
  def apply_patch_ref(self, patch_repo, patch_ref, target_branch, options,
380
376
  file_list):
@@ -419,7 +415,22 @@ class GitWrapper(SCMWrapper):
419
415
  pass
420
416
 
421
417
  base_rev = self._Capture(['rev-parse', 'HEAD'])
422
- target_branch = target_branch or self._GetTargetBranchForCommit(base_rev)
418
+
419
+ if target_branch:
420
+ # Convert the target branch to a remote ref if possible.
421
+ remote_ref = scm.GIT.RefToRemoteRef(target_branch, self.remote)
422
+ if remote_ref:
423
+ target_branch = ''.join(remote_ref)
424
+ else:
425
+ target_branch = self._GetTargetBranchForCommit(base_rev)
426
+
427
+ # Fallback to the commit we got.
428
+ # This means that apply_path_ref will try to find the merge-base between the
429
+ # patch and the commit (which is most likely the commit) and cherry-pick
430
+ # everything in between.
431
+ if not target_branch:
432
+ target_branch = base_rev
433
+
423
434
  self.Print('===Applying patch ref===')
424
435
  self.Print('Patch ref is %r @ %r. Target branch for patch is %r. '
425
436
  'Current HEAD is %r. Current dir is %r' % (
@@ -13,11 +13,11 @@ import logging
13
13
  import optparse
14
14
  import os
15
15
  import re
16
+ import subprocess
17
+ import sys
16
18
  import tempfile
17
19
  import threading
18
20
  import time
19
- import subprocess
20
- import sys
21
21
 
22
22
  try:
23
23
  import urlparse
@@ -258,6 +258,10 @@ class Mirror(object):
258
258
  # Not recognized.
259
259
  return None
260
260
 
261
+ @property
262
+ def _gs_path(self):
263
+ return 'gs://%s/v2/%s' % (self.bootstrap_bucket, self.basedir)
264
+
261
265
  @classmethod
262
266
  def FromPath(cls, path):
263
267
  return cls(cls.CacheDirToUrl(path))
@@ -372,87 +376,54 @@ class Mirror(object):
372
376
  """
373
377
  if not self.bootstrap_bucket:
374
378
  return False
375
- python_fallback = (
376
- (sys.platform.startswith('win') and
377
- not gclient_utils.FindExecutable('7z')) or
378
- (not gclient_utils.FindExecutable('unzip')) or
379
- ('ZIP64_SUPPORT' not in subprocess.check_output(["unzip", "-v"]))
380
- )
381
-
382
- gs_folder = 'gs://%s/%s' % (self.bootstrap_bucket, self.basedir)
379
+
383
380
  gsutil = Gsutil(self.gsutil_exe, boto_path=None)
384
- # Get the most recent version of the zipfile.
385
- _, ls_out, ls_err = gsutil.check_call('ls', gs_folder)
386
-
387
- def compare_filenames(a, b):
388
- # |a| and |b| look like gs://.../.../9999.zip. They both have the same
389
- # gs://bootstrap_bucket/basedir/ prefix because they come from the same
390
- # `gsutil ls`.
391
- # This function only compares the numeral parts before .zip.
392
- regex_pattern = r'/(\d+)\.zip$'
393
- match_a = re.search(regex_pattern, a)
394
- match_b = re.search(regex_pattern, b)
395
- if (match_a is not None) and (match_b is not None):
396
- num_a = int(match_a.group(1))
397
- num_b = int(match_b.group(1))
398
- return cmp(num_a, num_b)
399
- # If it doesn't match the format, fallback to string comparison.
400
- return cmp(a, b)
401
-
402
- ls_out_sorted = sorted(ls_out.splitlines(), cmp=compare_filenames)
403
- if not ls_out_sorted:
404
- # This repo is not on Google Storage.
381
+
382
+ # Get the most recent version of the directory.
383
+ # This is determined from the most recent version of a .ready file.
384
+ # The .ready file is only uploaded when an entire directory has been
385
+ # uploaded to GS.
386
+ _, ls_out, ls_err = gsutil.check_call('ls', self._gs_path)
387
+
388
+ ready_file_pattern = re.compile(r'.*/(\d+).ready$')
389
+
390
+ objects = set(ls_out.strip().splitlines())
391
+ ready_dirs = []
392
+
393
+ for name in objects:
394
+ m = ready_file_pattern.match(name)
395
+ # Given <path>/<number>.ready,
396
+ # we are interested in <path>/<number> directory
397
+
398
+ if m and (name[:-len('.ready')] + '/') in objects:
399
+ ready_dirs.append((int(m.group(1)), name[:-len('.ready')]))
400
+
401
+ if not ready_dirs:
405
402
  self.print('No bootstrap file for %s found in %s, stderr:\n %s' %
406
403
  (self.mirror_path, self.bootstrap_bucket,
407
- ' '.join((ls_err or '').splitlines(True))))
404
+ ' '.join((ls_err or '').splitlines(True))))
408
405
  return False
409
- latest_checkout = ls_out_sorted[-1]
406
+ latest_dir = max(ready_dirs)[1]
410
407
 
411
- # Download zip file to a temporary directory.
412
408
  try:
409
+ # create new temporary directory locally
413
410
  tempdir = tempfile.mkdtemp(prefix='_cache_tmp', dir=self.GetCachePath())
414
- self.print('Downloading %s' % latest_checkout)
411
+ self.RunGit(['init', '--bare'], cwd=tempdir)
412
+ self.print('Downloading files in %s/* into %s.' %
413
+ (latest_dir, tempdir))
415
414
  with self.print_duration_of('download'):
416
- code = gsutil.call('cp', latest_checkout, tempdir)
415
+ code = gsutil.call('-m', 'cp', '-r', latest_dir + "/*",
416
+ tempdir)
417
417
  if code:
418
418
  return False
419
- filename = os.path.join(tempdir, latest_checkout.split('/')[-1])
420
-
421
- # Unpack the file with 7z on Windows, unzip on linux, or fallback.
422
- with self.print_duration_of('unzip'):
423
- if not python_fallback:
424
- if sys.platform.startswith('win'):
425
- cmd = ['7z', 'x', '-o%s' % directory, '-tzip', filename]
426
- else:
427
- cmd = ['unzip', filename, '-d', directory]
428
- retcode = subprocess.call(cmd)
429
- else:
430
- try:
431
- with zipfile.ZipFile(filename, 'r') as f:
432
- f.printdir()
433
- f.extractall(directory)
434
- except Exception as e:
435
- self.print('Encountered error: %s' % str(e), file=sys.stderr)
436
- retcode = 1
437
- else:
438
- retcode = 0
439
- finally:
440
- # Clean up the downloaded zipfile.
441
- #
442
- # This is somehow racy on Windows.
443
- # Catching OSError because WindowsError isn't portable and
444
- # pylint complains.
445
- exponential_backoff_retry(
446
- lambda: gclient_utils.rm_file_or_tree(tempdir),
447
- excs=(OSError,),
448
- name='rmtree [%s]' % (tempdir,),
449
- printerr=self.print)
450
-
451
- if retcode:
452
- self.print(
453
- 'Extracting bootstrap zipfile %s failed.\n'
454
- 'Resuming normal operations.' % filename)
419
+ except Exception as e:
420
+ self.print('Encountered error: %s' % str(e), file=sys.stderr)
421
+ gclient_utils.rmtree(tempdir)
455
422
  return False
423
+ # delete the old directory
424
+ if os.path.exists(directory):
425
+ gclient_utils.rmtree(directory)
426
+ self.Rename(tempdir, directory)
456
427
  return True
457
428
 
458
429
  def contains_revision(self, revision):
@@ -503,47 +474,50 @@ class Mirror(object):
503
474
  % os.path.join(self.mirror_path, 'config'))
504
475
 
505
476
  def _ensure_bootstrapped(self, depth, bootstrap, force=False):
506
- tempdir = None
507
477
  pack_dir = os.path.join(self.mirror_path, 'objects', 'pack')
508
478
  pack_files = []
509
-
510
479
  if os.path.isdir(pack_dir):
511
480
  pack_files = [f for f in os.listdir(pack_dir) if f.endswith('.pack')]
512
481
  self.print('%s has %d .pack files, re-bootstrapping if >%d' %
513
- (self.mirror_path, len(pack_files), GC_AUTOPACKLIMIT))
482
+ (self.mirror_path, len(pack_files), GC_AUTOPACKLIMIT))
514
483
 
515
484
  should_bootstrap = (force or
516
485
  not self.exists() or
517
486
  len(pack_files) > GC_AUTOPACKLIMIT)
518
- if should_bootstrap:
519
- if self.exists():
520
- # Re-bootstrapping an existing mirror; preserve existing fetch spec.
521
- self._preserve_fetchspec()
522
- tempdir = tempfile.mkdtemp(
523
- prefix='_cache_tmp', suffix=self.basedir, dir=self.GetCachePath())
524
- bootstrapped = not depth and bootstrap and self.bootstrap_repo(tempdir)
525
- if bootstrapped:
526
- # Bootstrap succeeded; delete previous cache, if any.
487
+
488
+ if not should_bootstrap:
489
+ if depth and os.path.exists(os.path.join(self.mirror_path, 'shallow')):
490
+ logging.warn(
491
+ 'Shallow fetch requested, but repo cache already exists.')
492
+ return
493
+
494
+ if self.exists():
495
+ # Re-bootstrapping an existing mirror; preserve existing fetch spec.
496
+ self._preserve_fetchspec()
497
+ else:
498
+ if os.path.exists(self.mirror_path):
499
+ # If the mirror path exists but self.exists() returns false, we're
500
+ # in an unexpected state. Nuke the previous mirror directory and
501
+ # start fresh.
527
502
  gclient_utils.rmtree(self.mirror_path)
528
- elif not self.exists() or not self.supported_project():
529
- # Bootstrap failed due to either
530
- # 1. No previous cache
531
- # 2. Project doesn't have a bootstrap zip file
503
+ os.mkdir(self.mirror_path)
504
+
505
+ bootstrapped = (not depth and bootstrap and
506
+ self.bootstrap_repo(self.mirror_path))
507
+
508
+ if not bootstrapped:
509
+ if not self.exists() or not self.supported_project():
510
+ # Bootstrap failed due to:
511
+ # 1. No previous cache.
512
+ # 2. Project doesn't have a bootstrap folder.
532
513
  # Start with a bare git dir.
533
- self.RunGit(['init', '--bare'], cwd=tempdir)
514
+ self.RunGit(['init', '--bare'], cwd=self.mirror_path)
534
515
  else:
535
516
  # Bootstrap failed, previous cache exists; warn and continue.
536
517
  logging.warn(
537
518
  'Git cache has a lot of pack files (%d). Tried to re-bootstrap '
538
519
  'but failed. Continuing with non-optimized repository.'
539
520
  % len(pack_files))
540
- gclient_utils.rmtree(tempdir)
541
- tempdir = None
542
- else:
543
- if depth and os.path.exists(os.path.join(self.mirror_path, 'shallow')):
544
- logging.warn(
545
- 'Shallow fetch requested, but repo cache already exists.')
546
- return tempdir
547
521
 
548
522
  def _fetch(self, rundir, verbose, depth, reset_fetch_config):
549
523
  self.config(rundir, reset_fetch_config)
@@ -579,49 +553,57 @@ class Mirror(object):
579
553
  if not ignore_lock:
580
554
  lockfile.lock()
581
555
 
582
- tempdir = None
583
556
  try:
584
- tempdir = self._ensure_bootstrapped(depth, bootstrap)
585
- rundir = tempdir or self.mirror_path
586
- self._fetch(rundir, verbose, depth, reset_fetch_config)
557
+ self._ensure_bootstrapped(depth, bootstrap)
558
+ self._fetch(self.mirror_path, verbose, depth, reset_fetch_config)
587
559
  except ClobberNeeded:
588
560
  # This is a major failure, we need to clean and force a bootstrap.
589
- gclient_utils.rmtree(rundir)
561
+ gclient_utils.rmtree(self.mirror_path)
590
562
  self.print(GIT_CACHE_CORRUPT_MESSAGE)
591
- tempdir = self._ensure_bootstrapped(depth, bootstrap, force=True)
592
- assert tempdir
593
- self._fetch(tempdir, verbose, depth, reset_fetch_config)
563
+ self._ensure_bootstrapped(depth, bootstrap, force=True)
564
+ self._fetch(self.mirror_path, verbose, depth, reset_fetch_config)
594
565
  finally:
595
- if tempdir:
596
- if os.path.exists(self.mirror_path):
597
- gclient_utils.rmtree(self.mirror_path)
598
- self.Rename(tempdir, self.mirror_path)
599
566
  if not ignore_lock:
600
567
  lockfile.unlock()
601
568
 
602
569
  def update_bootstrap(self, prune=False):
603
- # The files are named <git number>.zip
570
+ # The folder is <git number>
604
571
  gen_number = subprocess.check_output(
605
572
  [self.git_exe, 'number', 'master'], cwd=self.mirror_path).strip()
573
+ gsutil = Gsutil(path=self.gsutil_exe, boto_path=None)
574
+
575
+ src_name = self.mirror_path
576
+ dest_name = '%s/%s' % (self._gs_path, gen_number)
577
+
578
+ # check to see if folder already exists in gs
579
+ _, ls_out, ls_err = gsutil.check_call('ls', dest_name)
580
+ _, ls_out_ready, ls_err_ready = (
581
+ gsutil.check_call('ls', dest_name + '.ready'))
582
+
583
+ # only printing out errors because the folder/ready file
584
+ # might not exist yet, so it will error no matter what
585
+ if ls_err:
586
+ print('Failed to check GS:\n%s' % (ls_err))
587
+ if ls_err_ready:
588
+ print('Failed to check GS:\n%s' % (ls_err_ready))
589
+
590
+ if not (ls_out == '' and ls_out_ready == ''):
591
+ print('Cache %s already exists' % dest_name)
592
+ return
593
+
606
594
  # Run Garbage Collect to compress packfile.
607
595
  self.RunGit(['gc', '--prune=all'])
608
- # Creating a temp file and then deleting it ensures we can use this name.
609
- _, tmp_zipfile = tempfile.mkstemp(suffix='.zip')
610
- os.remove(tmp_zipfile)
611
- subprocess.call(['zip', '-r', tmp_zipfile, '.'], cwd=self.mirror_path)
612
- gsutil = Gsutil(path=self.gsutil_exe, boto_path=None)
613
- gs_folder = 'gs://%s/%s' % (self.bootstrap_bucket, self.basedir)
614
- dest_name = '%s/%s.zip' % (gs_folder, gen_number)
615
- gsutil.call('cp', tmp_zipfile, dest_name)
616
- os.remove(tmp_zipfile)
617
-
618
- # Remove all other files in the same directory.
619
- if prune:
620
- _, ls_out, _ = gsutil.check_call('ls', gs_folder)
621
- for filename in ls_out.splitlines():
622
- if filename == dest_name:
623
- continue
624
- gsutil.call('rm', filename)
596
+
597
+ gsutil.call('-m', 'cp', '-r', src_name, dest_name)
598
+
599
+ #TODO(karenqian): prune old caches
600
+
601
+ # create .ready file and upload
602
+ _, ready_file_name = tempfile.mkstemp(suffix='.ready')
603
+ try:
604
+ gsutil.call('cp', ready_file_name, '%s.ready' % (dest_name))
605
+ finally:
606
+ os.remove(ready_file_name)
625
607
 
626
608
  @staticmethod
627
609
  def DeleteTmpPackFiles(path):
@@ -701,11 +683,10 @@ def CMDupdate_bootstrap(parser, args):
701
683
  return 1
702
684
 
703
685
  parser.add_option('--prune', action='store_true',
704
- help='Prune all other cached zipballs of the same repo.')
686
+ help='Prune all other cached bundles of the same repo.')
705
687
 
706
688
  # First, we need to ensure the cache is populated.
707
689
  populate_args = args[:]
708
- populate_args.append('--no-bootstrap')
709
690
  CMDpopulate(parser, populate_args)
710
691
 
711
692
  # Get the repo directory.