libv8 5.6.326.50.0beta1 → 5.7.492.65.0beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/README.md +1 -0
- data/Rakefile +8 -1
- data/ext/libv8/arch.rb +5 -5
- data/ext/libv8/builder.rb +9 -5
- data/lib/libv8/version.rb +1 -1
- data/patches/0001-Build-a-standalone-static-library.patch +2 -2
- data/patches/0002-Don-t-compile-unnecessary-stuff.patch +11 -7
- data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +2 -2
- data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +2 -2
- data/vendor/depot_tools/.gitignore +1 -0
- data/vendor/depot_tools/cbuildbot +1 -1
- data/vendor/depot_tools/chrome_set_ver +1 -1
- data/vendor/depot_tools/cipd_client_version +1 -1
- data/vendor/depot_tools/cit.py +1 -1
- data/vendor/depot_tools/cpplint.py +2 -1
- data/vendor/depot_tools/cros +1 -1
- data/vendor/depot_tools/cros_sdk +1 -1
- data/vendor/depot_tools/gclient.py +3 -2
- data/vendor/depot_tools/gerrit_util.py +99 -55
- data/vendor/depot_tools/git_cache.py +22 -6
- data/vendor/depot_tools/git_cl.py +532 -92
- data/vendor/depot_tools/git_common.py +3 -1
- data/vendor/depot_tools/infra/config/recipes.cfg +21 -8
- data/vendor/depot_tools/man/html/depot_tools.html +9 -1
- data/vendor/depot_tools/man/html/git-cl.html +1025 -0
- data/vendor/depot_tools/man/html/git-squash-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-upstream-diff.html +1 -1
- data/vendor/depot_tools/man/man1/git-cl.1 +193 -0
- data/vendor/depot_tools/man/man1/git-squash-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-upstream-diff.1 +3 -3
- data/vendor/depot_tools/man/man7/depot_tools.7 +8 -3
- data/vendor/depot_tools/man/src/_git-cl_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/git-cl.txt +116 -0
- data/vendor/depot_tools/my_activity.py +226 -50
- data/vendor/depot_tools/owners.py +50 -25
- data/vendor/depot_tools/presubmit_canned_checks.py +3 -0
- data/vendor/depot_tools/presubmit_support.py +19 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/OWNERS +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/api.py +14 -11
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/apply_gerrit_ref.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/basic.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/basic_output_manifest.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/basic_with_branch_heads.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/buildbot.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/clobber.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/gerrit_no_reset.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/no_shallow.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/reset_root_solution_revision.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2_buildbot.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2_json.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2_json_win.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_fail.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_fail_patch.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_fail_patch_download.json +2 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_gerrit_angle.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_gerrit_angle_deprecated.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_v8.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_v8_head_by_default.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/resources/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/resources/apply_gerrit.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/resources/bot_update.py +2 -2
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/test_api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/__init__.py +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/api.py +412 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/basic.json +8 -2
- data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/basic_pkg.json +405 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/describe-failed.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/describe-many-instances.json +8 -2
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/mac64.json +8 -2
- data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/pkg_bad_file.json +289 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/pkg_bad_mode.json +289 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/pkg_bad_verfile.json +289 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/win64.json +21 -15
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.py +101 -20
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/test_api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/example.expected/basic.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/example.expected/win.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/example.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/api.py +12 -10
- data/vendor/depot_tools/recipes/recipe_modules/gclient/bundle_extra_paths.txt +4 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/config.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/basic.json +9 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/buildbot.json +9 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/revision.json +9 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/tryserver.json +9 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/test_api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/__init__.py +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/api.py +11 -10
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/example.expected/basic.json +2 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/example.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/test_api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/api.py +8 -7
- data/vendor/depot_tools/recipes/recipe_modules/git/bundle_extra_paths.txt +28 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_branch.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_file_name.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_hash.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_ref.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_submodule_update_force.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/can_fail_build.json +12 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/cannot_fail_build.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/cat-file_test.json +19 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_delta.json +19 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_failed.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_with_bad_output.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_with_bad_output_fails_build.json +7 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/curl_trace_file.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/git-cache-checkout.json +20 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/platform_win.json +18 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/rebase_failed.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/remote_not_origin.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/set_got_revision.json +17 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/resources/git_setup.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/test_api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/config.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/example.expected/basic.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/example.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/example.expected/basic.json +11 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/example.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/resources/gsutil_smart_retry.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/example.expected/basic.json +1 -2
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +15 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +15 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +15 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_linux.json +15 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_mac.json +15 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_win.json +15 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +15 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +15 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +15 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/example.py +2 -3
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/path_config.py +5 -3
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/__init__.py +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/api.py +7 -6
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/bundle_extra_paths.txt +30 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/example.expected/basic.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/example.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/example.expected/basic.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/example.expected/buildbot.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/example.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/__init__.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/api.py +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/basic_tags.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/set_failure_hash_with_no_steps.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_gerrit_patch.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_gerrit_patch_deprecated.json +1 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_git_patch.json +4 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_git_patch_luci.json +0 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_rietveld_patch.json +4 -2
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_rietveld_patch_new.json +4 -2
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_wrong_patch.json +2 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_wrong_patch_new.json +2 -0
- data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.py +0 -0
- data/vendor/depot_tools/{recipes.py → recipes/recipes.py} +57 -81
- data/vendor/depot_tools/roll_dep.py +13 -5
- data/vendor/depot_tools/scm.py +7 -0
- data/vendor/depot_tools/third_party/upload.py +4 -0
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +3 -39
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +159 -114
- metadata +144 -133
- data/vendor/depot_tools/recipe_modules/cipd/api.py +0 -219
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +0 -16
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +0 -16
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +0 -16
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +0 -16
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +0 -16
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +0 -16
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +0 -16
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +0 -16
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49da25131392fb1dd3b357a9ecc6625208fc27bd
|
4
|
+
data.tar.gz: b2a6ba3094fd54ddbc3f478ebe2e83eb81d2ac1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e961ed6cf39bfc9e21a26acf035cfaa3909ebea807d0dc6aedd28300dc5726cf3f7224ccbca25d426650fe9059741aea724c89b003e558273446c1858ac3bd8
|
7
|
+
data.tar.gz: ef5bfff65de21bc7b646828ee750caae706b79d3369e8e2ee3dd60a21c3cf00b9478798cb009e609337fbb422e877675c6298f708f898842bc29f04f1c68d565
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
### Unreleased
|
2
2
|
|
3
|
-
* Update upstream v8 version to 5.
|
3
|
+
* Update upstream v8 version to 5.7.492.65
|
4
|
+
* Stop using the bundled toolchain to compile. (Fixes Alpine Linux compilation
|
5
|
+
failures) #227
|
6
|
+
* Set GYP_DEFINES when fetching/syncing upstream source #233
|
7
|
+
* Add ARMv6 architecture detection #234, #235
|
8
|
+
* Add an Alpine Linux Vagrant VM for testing purposes #221
|
4
9
|
|
5
10
|
### v5.3.332.38.4, v5.3.332.38.5 - 2016-02-27
|
6
11
|
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -51,7 +51,14 @@ task :binary => :compile do
|
|
51
51
|
end
|
52
52
|
|
53
53
|
namespace :build do
|
54
|
-
[
|
54
|
+
[
|
55
|
+
'x86_64-linux',
|
56
|
+
'x86-linux',
|
57
|
+
'armhf-linux',
|
58
|
+
'x86_64-freebsd-10',
|
59
|
+
'x86_64-freebsd-11',
|
60
|
+
'x86_64-linux-musl'
|
61
|
+
].each do |arch|
|
55
62
|
desc "build binary gem for #{arch}"
|
56
63
|
task arch do
|
57
64
|
arch_dir = Pathname(__FILE__).dirname.join("release/#{arch}")
|
data/ext/libv8/arch.rb
CHANGED
@@ -6,11 +6,11 @@ module Libv8
|
|
6
6
|
|
7
7
|
def libv8_arch
|
8
8
|
case Gem::Platform.local.cpu
|
9
|
-
when /^arm(v7.*)*$/
|
10
|
-
when /^a(rm|arch)64$/
|
11
|
-
when /^x86$/
|
12
|
-
when /^(x86_64|amd64)$/
|
13
|
-
when /^universal$/
|
9
|
+
when /^arm(v6.*|v7.*)*$/ then 'arm'
|
10
|
+
when /^a(rm|arch)64$/ then 'arm64'
|
11
|
+
when /^x86$/ then 'ia32'
|
12
|
+
when /^(x86_64|amd64)$/ then 'x64'
|
13
|
+
when /^universal$/ then 'x64' # OS X
|
14
14
|
else
|
15
15
|
warn "Unsupported target: #{Gem::Platform.local.cpu}"
|
16
16
|
Gem::Platform.local.cpu
|
data/ext/libv8/builder.rb
CHANGED
@@ -29,8 +29,12 @@ module Libv8
|
|
29
29
|
# Do not use an external snapshot as we don't really care for binary size
|
30
30
|
defines << 'v8_use_external_startup_data=0'
|
31
31
|
|
32
|
-
# Do not use the
|
33
|
-
|
32
|
+
# Do not use the embedded toolchain
|
33
|
+
defines << 'use_sysroot=0'
|
34
|
+
defines << 'linux_use_bundled_binutils=0'
|
35
|
+
defines << 'linux_use_bundled_gold=0'
|
36
|
+
defines << 'make_clang_dir=""'
|
37
|
+
defines << 'clang_dir=""'
|
34
38
|
|
35
39
|
# Pass clang flag to GYP in order to work around GCC compilation failures
|
36
40
|
defines << "clang=#{@compiler.is_a?(Compiler::Clang) ? '1' : '0'}"
|
@@ -106,15 +110,15 @@ module Libv8
|
|
106
110
|
ENV['PATH'] = "#{File.expand_path('../../../vendor/depot_tools', __FILE__)}:#{ENV['PATH']}"
|
107
111
|
Dir.chdir(File.expand_path('../../../vendor', __FILE__)) do
|
108
112
|
unless Dir.exists? 'v8'
|
109
|
-
system "fetch v8" or fail "unable to fetch v8 source"
|
113
|
+
system "env #{gyp_defines} fetch v8" or fail "unable to fetch v8 source"
|
110
114
|
else
|
111
|
-
system "gclient fetch" or fail "could not fetch v8 build dependencies commits"
|
115
|
+
system "env #{gyp_defines} gclient fetch" or fail "could not fetch v8 build dependencies commits"
|
112
116
|
end
|
113
117
|
Dir.chdir('v8') do
|
114
118
|
unless system "git checkout #{source_version}"
|
115
119
|
fail "unable to checkout source for v8 #{source_version}"
|
116
120
|
end
|
117
|
-
system "gclient sync" or fail "could not sync v8 build dependencies"
|
121
|
+
system "env #{gyp_defines} gclient sync" or fail "could not sync v8 build dependencies"
|
118
122
|
system "git checkout Makefile" # Work around a weird bug on FreeBSD
|
119
123
|
end
|
120
124
|
end
|
data/lib/libv8/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
From
|
1
|
+
From 66dd2280b3ecbb4a09f4f262d52a3a99a97afd45 Mon Sep 17 00:00:00 2001
|
2
2
|
From: Petko Bordjukov <bordjukov@gmail.com>
|
3
3
|
Date: Mon, 25 Jul 2016 00:00:19 +0300
|
4
4
|
Subject: [PATCH 1/4] Build a standalone static library
|
@@ -22,5 +22,5 @@ index d438a5aeab..f28c9bfa9f 100644
|
|
22
22
|
'defines!': [
|
23
23
|
'DEBUG',
|
24
24
|
--
|
25
|
-
2.
|
25
|
+
2.12.1
|
26
26
|
|
@@ -1,12 +1,12 @@
|
|
1
|
-
From
|
1
|
+
From 73b9ff314b5027e9bd1410130df607dbd7f40aa4 Mon Sep 17 00:00:00 2001
|
2
2
|
From: Petko Bordjukov <bordjukov@gmail.com>
|
3
3
|
Date: Tue, 28 Feb 2017 00:04:26 +0200
|
4
4
|
Subject: [PATCH 2/4] Don't compile unnecessary stuff
|
5
5
|
|
6
6
|
---
|
7
7
|
Makefile | 7 +------
|
8
|
-
gypfiles/all.gyp |
|
9
|
-
2 files changed, 2 insertions(+),
|
8
|
+
gypfiles/all.gyp | 43 +------------------------------------------
|
9
|
+
2 files changed, 2 insertions(+), 48 deletions(-)
|
10
10
|
|
11
11
|
diff --git a/Makefile b/Makefile
|
12
12
|
index 6eeac09a14..a2807ffafe 100644
|
@@ -27,10 +27,10 @@ index 6eeac09a14..a2807ffafe 100644
|
|
27
27
|
# If vtunejit=on, the v8vtune.gyp will be appended.
|
28
28
|
ifeq ($(vtunejit), on)
|
29
29
|
diff --git a/gypfiles/all.gyp b/gypfiles/all.gyp
|
30
|
-
index
|
30
|
+
index 12e1fdadb7..9b02b4d305 100644
|
31
31
|
--- a/gypfiles/all.gyp
|
32
32
|
+++ b/gypfiles/all.gyp
|
33
|
-
@@ -15,
|
33
|
+
@@ -15,48 +15,7 @@
|
34
34
|
'dependencies': [
|
35
35
|
'../tools/parser-shell.gyp:parser-shell',
|
36
36
|
],
|
@@ -46,10 +46,14 @@ index a3f2eedc77..9b02b4d305 100644
|
|
46
46
|
- }],
|
47
47
|
- ['v8_enable_inspector==1', {
|
48
48
|
- 'dependencies': [
|
49
|
-
- '../test/debugger/debugger.gyp:*',
|
50
49
|
- '../test/inspector/inspector.gyp:*',
|
51
50
|
- ],
|
52
51
|
- }],
|
52
|
+
- ['v8_enable_inspector==1 and test_isolation_mode != "noop"', {
|
53
|
+
- 'dependencies': [
|
54
|
+
- '../test/debugger/debugger.gyp:*',
|
55
|
+
- ],
|
56
|
+
- }],
|
53
57
|
- ['test_isolation_mode != "noop"', {
|
54
58
|
- 'dependencies': [
|
55
59
|
- '../test/bot_default.gyp:*',
|
@@ -77,5 +81,5 @@ index a3f2eedc77..9b02b4d305 100644
|
|
77
81
|
}
|
78
82
|
]
|
79
83
|
--
|
80
|
-
2.
|
84
|
+
2.12.1
|
81
85
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
From
|
1
|
+
From f40d71bda11b9de95ba732e455832517d1e3b9d6 Mon Sep 17 00:00:00 2001
|
2
2
|
From: Petko Bordjukov <bordjukov@gmail.com>
|
3
3
|
Date: Mon, 25 Jul 2016 00:05:47 +0300
|
4
4
|
Subject: [PATCH 3/4] Use the -fPIC flag for the static library
|
@@ -21,5 +21,5 @@ index f28c9bfa9f..01e4dc9336 100644
|
|
21
21
|
}],
|
22
22
|
[ 'clang==0 and coverage==1', {
|
23
23
|
--
|
24
|
-
2.
|
24
|
+
2.12.1
|
25
25
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
From
|
1
|
+
From 3084588d43a95001266fdc77a6c6ed3ce9747937 Mon Sep 17 00:00:00 2001
|
2
2
|
From: Jb Aviat <jb@sqreen.io>
|
3
3
|
Date: Mon, 27 Feb 2017 11:14:42 +0200
|
4
4
|
Subject: [PATCH 4/4] Do not embed debug symbols in macOS libraries
|
@@ -21,5 +21,5 @@ index 01e4dc9336..027eaff718 100644
|
|
21
21
|
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
|
22
22
|
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
|
23
23
|
--
|
24
|
-
2.
|
24
|
+
2.12.1
|
25
25
|
|
@@ -1 +1 @@
|
|
1
|
-
support/chromite_wrapper
|
1
|
+
vendor/depot_tools/support/chromite_wrapper
|
@@ -1 +1 @@
|
|
1
|
-
support/chromite_wrapper
|
1
|
+
vendor/depot_tools/support/chromite_wrapper
|
@@ -1 +1 @@
|
|
1
|
-
git_revision:
|
1
|
+
git_revision:76eadcd75c5ad2638e1fc098f81748aad150c7c0
|
data/vendor/depot_tools/cit.py
CHANGED
@@ -146,7 +146,7 @@ def run(args):
|
|
146
146
|
|
147
147
|
def main():
|
148
148
|
parser = argparse.ArgumentParser("Chrome Infrastructure CLI.")
|
149
|
-
parser.add_argument('-b', '--infra-branch', default='
|
149
|
+
parser.add_argument('-b', '--infra-branch', default='cit',
|
150
150
|
help="The name of the 'infra' branch to use (default is %(default)s).")
|
151
151
|
parser.add_argument('args', nargs=argparse.REMAINDER)
|
152
152
|
|
@@ -2752,7 +2752,8 @@ def CheckForNonStandardConstructs(filename, clean_lines, linenum,
|
|
2752
2752
|
# Look for single-argument constructors that aren't marked explicit.
|
2753
2753
|
# Technically a valid construct, but against style.
|
2754
2754
|
explicit_constructor_match = Match(
|
2755
|
-
r'\s+(?:inline\s+)
|
2755
|
+
r'\s+(?:(?:inline|constexpr)\s+)*(explicit\s+)?'
|
2756
|
+
r'(?:(?:inline|constexpr)\s+)*%s\s*'
|
2756
2757
|
r'\(((?:[^()]|\([^()]*\))*)\)'
|
2757
2758
|
% re.escape(base_classname),
|
2758
2759
|
line)
|
data/vendor/depot_tools/cros
CHANGED
@@ -1 +1 @@
|
|
1
|
-
support/chromite_wrapper
|
1
|
+
vendor/depot_tools/support/chromite_wrapper
|
data/vendor/depot_tools/cros_sdk
CHANGED
@@ -1 +1 @@
|
|
1
|
-
support/chromite_wrapper
|
1
|
+
vendor/depot_tools/support/chromite_wrapper
|
@@ -714,8 +714,9 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
|
714
714
|
if 'action' in hook:
|
715
715
|
hooks_to_run.append(hook)
|
716
716
|
|
717
|
-
|
718
|
-
|
717
|
+
if self.recursion_limit:
|
718
|
+
self._pre_deps_hooks = [self.GetHookAction(hook, []) for hook in
|
719
|
+
local_scope.get('pre_deps_hooks', [])]
|
719
720
|
|
720
721
|
self.add_dependencies_and_close(deps_to_add, hooks_to_run)
|
721
722
|
logging.info('ParseDepsFile(%s) done' % self.name)
|
@@ -11,7 +11,7 @@ https://gerrit-review.googlesource.com/Documentation/rest-api.html
|
|
11
11
|
import base64
|
12
12
|
import contextlib
|
13
13
|
import cookielib
|
14
|
-
import httplib
|
14
|
+
import httplib # Still used for its constants.
|
15
15
|
import json
|
16
16
|
import logging
|
17
17
|
import netrc
|
@@ -27,6 +27,7 @@ import urlparse
|
|
27
27
|
from cStringIO import StringIO
|
28
28
|
|
29
29
|
import gclient_utils
|
30
|
+
from third_party import httplib2
|
30
31
|
|
31
32
|
LOGGER = logging.getLogger()
|
32
33
|
TRY_LIMIT = 5
|
@@ -59,13 +60,11 @@ def _QueryString(param_dict, first_param=None):
|
|
59
60
|
return '+'.join(q)
|
60
61
|
|
61
62
|
|
62
|
-
def
|
63
|
+
def GetConnectionObject(protocol=None):
|
63
64
|
if protocol is None:
|
64
65
|
protocol = GERRIT_PROTOCOL
|
65
|
-
if protocol
|
66
|
-
return
|
67
|
-
elif protocol == 'http':
|
68
|
-
return httplib.HTTPConnection
|
66
|
+
if protocol in ('http', 'https'):
|
67
|
+
return httplib2.Http()
|
69
68
|
else:
|
70
69
|
raise RuntimeError(
|
71
70
|
"Don't know how to work with protocol '%s'" % protocol)
|
@@ -107,7 +106,7 @@ class CookiesAuthenticator(Authenticator):
|
|
107
106
|
if not parts[0].endswith('-review'):
|
108
107
|
parts[0] += '-review'
|
109
108
|
url = 'https://%s/new-password' % ('.'.join(parts))
|
110
|
-
return 'You can (re)generate your
|
109
|
+
return 'You can (re)generate your credentials by visiting %s' % url
|
111
110
|
|
112
111
|
@classmethod
|
113
112
|
def get_netrc_path(cls):
|
@@ -185,19 +184,30 @@ class CookiesAuthenticator(Authenticator):
|
|
185
184
|
|
186
185
|
return gitcookies
|
187
186
|
|
188
|
-
def
|
189
|
-
auth = None
|
187
|
+
def _get_auth_for_host(self, host):
|
190
188
|
for domain, creds in self.gitcookies.iteritems():
|
191
189
|
if cookielib.domain_match(host, domain):
|
192
|
-
|
193
|
-
|
190
|
+
return (creds[0], None, creds[1])
|
191
|
+
return self.netrc.authenticators(host)
|
194
192
|
|
195
|
-
|
196
|
-
|
193
|
+
def get_auth_header(self, host):
|
194
|
+
auth = self._get_auth_for_host(host)
|
197
195
|
if auth:
|
198
196
|
return 'Basic %s' % (base64.b64encode('%s:%s' % (auth[0], auth[2])))
|
199
197
|
return None
|
200
198
|
|
199
|
+
def get_auth_email(self, host):
|
200
|
+
"""Best effort parsing of email to be used for auth for the given host."""
|
201
|
+
auth = self._get_auth_for_host(host)
|
202
|
+
if not auth:
|
203
|
+
return None
|
204
|
+
login = auth[0]
|
205
|
+
# login typically looks like 'git-xxx.example.com'
|
206
|
+
if not login.startswith('git-') or '.' not in login:
|
207
|
+
return None
|
208
|
+
username, domain = login[len('git-'):].split('.', 1)
|
209
|
+
return '%s@%s' % (username, domain)
|
210
|
+
|
201
211
|
|
202
212
|
# Backwards compatibility just in case somebody imports this outside of
|
203
213
|
# depot_tools.
|
@@ -229,11 +239,11 @@ class GceAuthenticator(Authenticator):
|
|
229
239
|
def _test_is_gce(cls):
|
230
240
|
# Based on https://cloud.google.com/compute/docs/metadata#runninggce
|
231
241
|
try:
|
232
|
-
resp = cls._get(cls._INFO_URL)
|
233
|
-
except socket.error:
|
242
|
+
resp, _ = cls._get(cls._INFO_URL)
|
243
|
+
except (socket.error, httplib2.ServerNotFoundError):
|
234
244
|
# Could not resolve URL.
|
235
245
|
return False
|
236
|
-
return resp.
|
246
|
+
return resp.get('metadata-flavor') == 'Google'
|
237
247
|
|
238
248
|
@staticmethod
|
239
249
|
def _get(url, **kwargs):
|
@@ -247,12 +257,11 @@ class GceAuthenticator(Authenticator):
|
|
247
257
|
next_delay_sec *= 2
|
248
258
|
|
249
259
|
p = urlparse.urlparse(url)
|
250
|
-
c =
|
251
|
-
c.request('GET',
|
252
|
-
resp = c.getresponse()
|
260
|
+
c = GetConnectionObject(protocol=p.scheme)
|
261
|
+
resp, contents = c.request(url, 'GET', **kwargs)
|
253
262
|
LOGGER.debug('GET [%s] #%d/%d (%d)', url, i+1, TRY_LIMIT, resp.status)
|
254
263
|
if resp.status < httplib.INTERNAL_SERVER_ERROR:
|
255
|
-
return resp
|
264
|
+
return (resp, contents)
|
256
265
|
|
257
266
|
@classmethod
|
258
267
|
def _get_token_dict(cls):
|
@@ -261,10 +270,10 @@ class GceAuthenticator(Authenticator):
|
|
261
270
|
if cls._token_expiration < time.time() - 25:
|
262
271
|
return cls._token_cache
|
263
272
|
|
264
|
-
resp = cls._get(cls._ACQUIRE_URL, headers=cls._ACQUIRE_HEADERS)
|
273
|
+
resp, contents = cls._get(cls._ACQUIRE_URL, headers=cls._ACQUIRE_HEADERS)
|
265
274
|
if resp.status != httplib.OK:
|
266
275
|
return None
|
267
|
-
cls._token_cache = json.
|
276
|
+
cls._token_cache = json.loads(contents)
|
268
277
|
cls._token_expiration = cls._token_cache['expires_in'] + time.time()
|
269
278
|
return cls._token_cache
|
270
279
|
|
@@ -303,15 +312,14 @@ def CreateHttpConn(host, path, reqtype='GET', headers=None, body=None):
|
|
303
312
|
LOGGER.debug('%s: %s' % (key, val))
|
304
313
|
if body:
|
305
314
|
LOGGER.debug(body)
|
306
|
-
conn =
|
315
|
+
conn = GetConnectionObject()
|
307
316
|
conn.req_host = host
|
308
317
|
conn.req_params = {
|
309
|
-
'
|
318
|
+
'uri': urlparse.urljoin('%s://%s' % (GERRIT_PROTOCOL, host), url),
|
310
319
|
'method': reqtype,
|
311
320
|
'headers': headers,
|
312
321
|
'body': body,
|
313
322
|
}
|
314
|
-
conn.request(**conn.req_params)
|
315
323
|
return conn
|
316
324
|
|
317
325
|
|
@@ -319,7 +327,7 @@ def ReadHttpResponse(conn, expect_status=200, ignore_404=True):
|
|
319
327
|
"""Reads an http response from a connection into a string buffer.
|
320
328
|
|
321
329
|
Args:
|
322
|
-
conn: An
|
330
|
+
conn: An Http object created by CreateHttpConn above.
|
323
331
|
expect_status: Success is indicated by this status in the response.
|
324
332
|
ignore_404: For many requests, gerrit-on-borg will return 404 if the request
|
325
333
|
doesn't match the database contents. In most such cases, we
|
@@ -329,10 +337,10 @@ def ReadHttpResponse(conn, expect_status=200, ignore_404=True):
|
|
329
337
|
|
330
338
|
sleep_time = 0.5
|
331
339
|
for idx in range(TRY_LIMIT):
|
332
|
-
response = conn.
|
340
|
+
response, contents = conn.request(**conn.req_params)
|
333
341
|
|
334
342
|
# Check if this is an authentication issue.
|
335
|
-
www_authenticate = response.
|
343
|
+
www_authenticate = response.get('www-authenticate')
|
336
344
|
if (response.status in (httplib.UNAUTHORIZED, httplib.FOUND) and
|
337
345
|
www_authenticate):
|
338
346
|
auth_match = re.search('realm="([^"]+)"', www_authenticate, re.I)
|
@@ -344,31 +352,25 @@ def ReadHttpResponse(conn, expect_status=200, ignore_404=True):
|
|
344
352
|
# If response.status < 500 then the result is final; break retry loop.
|
345
353
|
if response.status < 500:
|
346
354
|
LOGGER.debug('got response %d for %s %s', response.status,
|
347
|
-
conn.req_params['method'], conn.req_params['
|
355
|
+
conn.req_params['method'], conn.req_params['uri'])
|
348
356
|
break
|
349
357
|
# A status >=500 is assumed to be a possible transient error; retry.
|
350
358
|
http_version = 'HTTP/%s' % ('1.1' if response.version == 11 else '1.0')
|
351
359
|
LOGGER.warn('A transient error occurred while querying %s:\n'
|
352
360
|
'%s %s %s\n'
|
353
361
|
'%s %d %s',
|
354
|
-
conn.host, conn.req_params['method'], conn.req_params['
|
362
|
+
conn.host, conn.req_params['method'], conn.req_params['uri'],
|
355
363
|
http_version, http_version, response.status, response.reason)
|
356
364
|
if TRY_LIMIT - idx > 1:
|
357
365
|
LOGGER.warn('... will retry %d more times.', TRY_LIMIT - idx - 1)
|
358
366
|
time.sleep(sleep_time)
|
359
367
|
sleep_time = sleep_time * 2
|
360
|
-
req_host = conn.req_host
|
361
|
-
req_params = conn.req_params
|
362
|
-
conn = GetConnectionClass()(req_host)
|
363
|
-
conn.req_host = req_host
|
364
|
-
conn.req_params = req_params
|
365
|
-
conn.request(**req_params)
|
366
368
|
if ignore_404 and response.status == 404:
|
367
369
|
return StringIO()
|
368
370
|
if response.status != expect_status:
|
369
|
-
reason = '%s: %s' % (response.reason,
|
371
|
+
reason = '%s: %s' % (response.reason, contents)
|
370
372
|
raise GerritError(response.status, reason)
|
371
|
-
return StringIO(
|
373
|
+
return StringIO(contents)
|
372
374
|
|
373
375
|
|
374
376
|
def ReadHttpJsonResponse(conn, expect_status=200, ignore_404=True):
|
@@ -386,7 +388,7 @@ def ReadHttpJsonResponse(conn, expect_status=200, ignore_404=True):
|
|
386
388
|
|
387
389
|
|
388
390
|
def QueryChanges(host, param_dict, first_param=None, limit=None, o_params=None,
|
389
|
-
|
391
|
+
start=None):
|
390
392
|
"""
|
391
393
|
Queries a gerrit-on-borg server for changes matching query terms.
|
392
394
|
|
@@ -395,6 +397,7 @@ def QueryChanges(host, param_dict, first_param=None, limit=None, o_params=None,
|
|
395
397
|
http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/user-search.html
|
396
398
|
first_param: A change identifier
|
397
399
|
limit: Maximum number of results to return.
|
400
|
+
start: how many changes to skip (starting with the most recent)
|
398
401
|
o_params: A list of additional output specifiers, as documented here:
|
399
402
|
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
|
400
403
|
Returns:
|
@@ -404,8 +407,8 @@ def QueryChanges(host, param_dict, first_param=None, limit=None, o_params=None,
|
|
404
407
|
if not param_dict and not first_param:
|
405
408
|
raise RuntimeError('QueryChanges requires search parameters')
|
406
409
|
path = 'changes/?q=%s' % _QueryString(param_dict, first_param)
|
407
|
-
if
|
408
|
-
path = '%s&
|
410
|
+
if start:
|
411
|
+
path = '%s&start=%s' % (path, start)
|
409
412
|
if limit:
|
410
413
|
path = '%s&n=%d' % (path, limit)
|
411
414
|
if o_params:
|
@@ -415,30 +418,49 @@ def QueryChanges(host, param_dict, first_param=None, limit=None, o_params=None,
|
|
415
418
|
|
416
419
|
|
417
420
|
def GenerateAllChanges(host, param_dict, first_param=None, limit=500,
|
418
|
-
o_params=None,
|
421
|
+
o_params=None, start=None):
|
419
422
|
"""
|
420
423
|
Queries a gerrit-on-borg server for all the changes matching the query terms.
|
421
424
|
|
425
|
+
WARNING: this is unreliable if a change matching the query is modified while
|
426
|
+
this function is being called.
|
427
|
+
|
422
428
|
A single query to gerrit-on-borg is limited on the number of results by the
|
423
429
|
limit parameter on the request (see QueryChanges) and the server maximum
|
424
|
-
limit.
|
425
|
-
the returned changes to iterate all of them making multiple queries to the
|
426
|
-
server, regardless the query limit.
|
430
|
+
limit.
|
427
431
|
|
428
432
|
Args:
|
429
433
|
param_dict, first_param: Refer to QueryChanges().
|
430
434
|
limit: Maximum number of requested changes per query.
|
431
435
|
o_params: Refer to QueryChanges().
|
432
|
-
|
433
|
-
start from the first change.
|
436
|
+
start: Refer to QueryChanges().
|
434
437
|
|
435
438
|
Returns:
|
436
|
-
A generator object to the list of returned changes
|
439
|
+
A generator object to the list of returned changes.
|
437
440
|
"""
|
441
|
+
already_returned = set()
|
442
|
+
def at_most_once(cls):
|
443
|
+
for cl in cls:
|
444
|
+
if cl['_number'] not in already_returned:
|
445
|
+
already_returned.add(cl['_number'])
|
446
|
+
yield cl
|
447
|
+
|
448
|
+
start = start or 0
|
449
|
+
cur_start = start
|
438
450
|
more_changes = True
|
451
|
+
|
439
452
|
while more_changes:
|
440
|
-
|
441
|
-
|
453
|
+
# This will fetch changes[start..start+limit] sorted by most recently
|
454
|
+
# updated. Since the rank of any change in this list can be changed any time
|
455
|
+
# (say user posting comment), subsequent calls may overalp like this:
|
456
|
+
# > initial order ABCDEFGH
|
457
|
+
# query[0..3] => ABC
|
458
|
+
# > E get's updated. New order: EABCDFGH
|
459
|
+
# query[3..6] => CDF # C is a dup
|
460
|
+
# query[6..9] => GH # E is missed.
|
461
|
+
page = QueryChanges(host, param_dict, first_param, limit, o_params,
|
462
|
+
cur_start)
|
463
|
+
for cl in at_most_once(page):
|
442
464
|
yield cl
|
443
465
|
|
444
466
|
more_changes = [cl for cl in page if '_more_changes' in cl]
|
@@ -448,11 +470,18 @@ def GenerateAllChanges(host, param_dict, first_param=None, limit=500,
|
|
448
470
|
'Received %d changes with a _more_changes attribute set but should '
|
449
471
|
'receive at most one.' % len(more_changes))
|
450
472
|
if more_changes:
|
451
|
-
|
473
|
+
cur_start += len(page)
|
474
|
+
|
475
|
+
# If we paged through, query again the first page which in most circumstances
|
476
|
+
# will fetch all changes that were modified while this function was run.
|
477
|
+
if start != cur_start:
|
478
|
+
page = QueryChanges(host, param_dict, first_param, limit, o_params, start)
|
479
|
+
for cl in at_most_once(page):
|
480
|
+
yield cl
|
452
481
|
|
453
482
|
|
454
483
|
def MultiQueryChanges(host, param_dict, change_list, limit=None, o_params=None,
|
455
|
-
|
484
|
+
start=None):
|
456
485
|
"""Initiate a query composed of multiple sets of query parameters."""
|
457
486
|
if not change_list:
|
458
487
|
raise RuntimeError(
|
@@ -462,8 +491,8 @@ def MultiQueryChanges(host, param_dict, change_list, limit=None, o_params=None,
|
|
462
491
|
q.append(_QueryString(param_dict))
|
463
492
|
if limit:
|
464
493
|
q.append('n=%d' % limit)
|
465
|
-
if
|
466
|
-
q.append('
|
494
|
+
if start:
|
495
|
+
q.append('S=%s' % start)
|
467
496
|
if o_params:
|
468
497
|
q.extend(['o=%s' % p for p in o_params])
|
469
498
|
path = 'changes/?%s' % '&'.join(q)
|
@@ -659,7 +688,7 @@ def AddReviewers(host, change, add=None, is_reviewer=True, notify=True):
|
|
659
688
|
_ = ReadHttpJsonResponse(conn, ignore_404=False)
|
660
689
|
except GerritError as e:
|
661
690
|
if e.http_status == 422: # "Unprocessable Entity"
|
662
|
-
LOGGER.warn('
|
691
|
+
LOGGER.warn('Note: "%s" not added as a %s' % (r, state.lower()))
|
663
692
|
errors = True
|
664
693
|
else:
|
665
694
|
raise
|
@@ -787,6 +816,21 @@ def GetGerritBranch(host, project, branch):
|
|
787
816
|
raise GerritError(200, 'Unable to get gerrit branch')
|
788
817
|
|
789
818
|
|
819
|
+
def GetAccountDetails(host, account_id='self'):
|
820
|
+
"""Returns details of the account.
|
821
|
+
|
822
|
+
If account_id is not given, uses magic value 'self' which corresponds to
|
823
|
+
whichever account user is authenticating as.
|
824
|
+
|
825
|
+
Documentation:
|
826
|
+
https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#get-account
|
827
|
+
"""
|
828
|
+
if account_id != 'self':
|
829
|
+
account_id = int(account_id)
|
830
|
+
conn = CreateHttpConn(host, '/accounts/%s' % account_id)
|
831
|
+
return ReadHttpJsonResponse(conn)
|
832
|
+
|
833
|
+
|
790
834
|
@contextlib.contextmanager
|
791
835
|
def tempdir():
|
792
836
|
tdir = None
|