libv8 5.7.492.65.1 → 5.9.211.38.0beta0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +8 -2
- data/CHANGELOG.md +4 -0
- data/README.md +4 -3
- data/Rakefile +27 -10
- data/ext/libv8/builder.rb +4 -0
- data/lib/libv8/version.rb +1 -1
- data/libv8.gemspec +1 -1
- data/patches/0001-Build-a-standalone-static-library.patch +5 -5
- data/patches/0002-Don-t-compile-unnecessary-stuff.patch +20 -24
- data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +5 -5
- data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +5 -5
- data/patches/0005-Fix-GCC-7-build-errors.patch +147 -0
- data/scaleway.png +0 -0
- data/vendor/depot_tools/.gitattributes +52 -0
- data/vendor/depot_tools/.gitignore +10 -0
- data/vendor/depot_tools/README.md +7 -3
- data/vendor/depot_tools/apply_issue.bat +4 -3
- data/vendor/depot_tools/apply_issue.py +0 -10
- data/vendor/depot_tools/autoninja +12 -0
- data/vendor/depot_tools/autoninja.bat +9 -0
- data/vendor/depot_tools/autoninja.py +70 -0
- data/vendor/depot_tools/bootstrap/win/README.md +108 -26
- data/vendor/depot_tools/bootstrap/win/git-bash.template.sh +3 -3
- data/vendor/depot_tools/bootstrap/win/git.template.bat +2 -2
- data/vendor/depot_tools/bootstrap/win/manifest.txt +18 -0
- data/vendor/depot_tools/bootstrap/win/manifest_bleeding_edge.txt +18 -0
- data/vendor/depot_tools/bootstrap/win/python27.new.bat +49 -0
- data/vendor/depot_tools/bootstrap/win/win_tools.bat +55 -59
- data/vendor/depot_tools/bootstrap/win/win_tools.py +335 -0
- data/vendor/depot_tools/cipd +16 -2
- data/vendor/depot_tools/cipd.bat +20 -2
- data/vendor/depot_tools/cipd.ps1 +36 -22
- data/vendor/depot_tools/cipd_bin_setup.bat +6 -0
- data/vendor/depot_tools/cipd_bin_setup.sh +10 -0
- data/vendor/depot_tools/cipd_client_version +1 -1
- data/vendor/depot_tools/cipd_manifest.txt +9 -0
- data/vendor/depot_tools/cit.bat +12 -11
- data/vendor/depot_tools/clang-format.bat +4 -3
- data/vendor/depot_tools/clang_format_merge_driver.bat +12 -11
- data/vendor/depot_tools/commit_queue.bat +4 -3
- data/vendor/depot_tools/cpplint.bat +9 -3
- data/vendor/depot_tools/cpplint.py +3 -3
- data/vendor/depot_tools/depot-tools-auth.bat +4 -3
- data/vendor/depot_tools/download_from_google_storage.bat +5 -3
- data/vendor/depot_tools/download_from_google_storage.py +6 -1
- data/vendor/depot_tools/fetch.bat +5 -4
- data/vendor/depot_tools/fetch.py +4 -5
- data/vendor/depot_tools/gclient-new-workdir.py +82 -46
- data/vendor/depot_tools/gclient.bat +5 -4
- data/vendor/depot_tools/gclient.py +713 -319
- data/vendor/depot_tools/gclient_eval.py +284 -0
- data/vendor/depot_tools/gclient_utils.py +70 -4
- data/vendor/depot_tools/gerrit_client.py +26 -1
- data/vendor/depot_tools/gerrit_util.py +120 -127
- data/vendor/depot_tools/git-crrev-parse +1 -0
- data/vendor/depot_tools/git-gs +1 -1
- data/vendor/depot_tools/git_cl.py +731 -415
- data/vendor/depot_tools/git_common.py +23 -3
- data/vendor/depot_tools/git_drover.py +10 -1
- data/vendor/depot_tools/git_footers.py +62 -22
- data/vendor/depot_tools/git_hyper_blame.py +3 -2
- data/vendor/depot_tools/git_map.py +30 -3
- data/vendor/depot_tools/git_map_branches.py +18 -4
- data/vendor/depot_tools/git_number.py +8 -2
- data/vendor/depot_tools/git_retry.py +21 -0
- data/vendor/depot_tools/gn.bat +4 -3
- data/vendor/depot_tools/infra/config/cq.cfg +1 -5
- data/vendor/depot_tools/infra/config/recipes.cfg +18 -16
- data/vendor/depot_tools/led +12 -0
- data/vendor/depot_tools/led.bat +7 -0
- data/vendor/depot_tools/man/html/git-cl.html +9 -1
- data/vendor/depot_tools/man/html/git-drover.html +22 -18
- data/vendor/depot_tools/man/man1/git-cl.1 +8 -3
- data/vendor/depot_tools/man/man1/git-drover.1 +22 -20
- data/vendor/depot_tools/man/src/git-cl.txt +3 -0
- data/vendor/depot_tools/man/src/git-drover.txt +8 -0
- data/vendor/depot_tools/my_activity.py +8 -5
- data/vendor/depot_tools/owners.py +103 -11
- data/vendor/depot_tools/owners_finder.py +14 -2
- data/vendor/depot_tools/presubmit_canned_checks.py +25 -67
- data/vendor/depot_tools/presubmit_support.py +87 -35
- data/vendor/depot_tools/recipes/OWNERS +2 -0
- data/vendor/depot_tools/recipes/README.recipes.md +842 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +5 -3
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +181 -60
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/{example.expected → examples/full.expected}/apply_gerrit_ref.json +4 -2
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic.json +82 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json +149 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/buildbot.json +82 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json +149 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +122 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json +149 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json +149 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_shallow.json +149 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json +148 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange.json +150 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/{example.expected → examples/full.expected}/trychange_oauth2.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_buildbot.json +152 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json.json +150 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json_win.json +150 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob.json +156 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +91 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +118 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +118 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json +202 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle_deprecated.json +158 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json +196 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8.json +202 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json +202 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +162 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +162 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json +149 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/{example.py → examples/full.py} +46 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/bot_update.py +139 -133
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/test_api.py +25 -13
- data/vendor/depot_tools/recipes/recipe_modules/cipd/api.py +40 -9
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/basic.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/basic_pkg.json +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/describe-failed.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/describe-many-instances.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/mac64.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/pkg_bad_file.json +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/pkg_bad_mode.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/pkg_bad_verfile.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.expected → examples/full.expected}/win64.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/{example.py → examples/full.py} +1 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk arch.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk bits.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_32.json +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_64.json +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_32.json +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_64.json +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_mips_64.json +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/mac_intel_64.json +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_32.json +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_64.json +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.py +59 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/api.py +5 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/{example.expected → examples/full.expected}/basic.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/{example.expected → examples/full.expected}/win.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/{example.py → examples/full.py} +2 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/__init__.py +1 -4
- data/vendor/depot_tools/recipes/recipe_modules/gclient/api.py +28 -14
- data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +10 -235
- data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.expected → examples/full.expected}/basic.json +9 -9
- data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.expected → examples/full.expected}/buildbot.json +9 -9
- data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.expected → examples/full.expected}/revision.json +9 -9
- data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.expected → examples/full.expected}/tryserver.json +9 -9
- data/vendor/depot_tools/recipes/recipe_modules/gclient/{example.py → examples/full.py} +5 -21
- data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/patch_project.py +45 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/__init__.py +1 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/api.py +97 -2
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +283 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/{example.py → examples/full.py} +31 -2
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/test_api.py +30 -1
- data/vendor/depot_tools/recipes/recipe_modules/git/__init__.py +1 -4
- data/vendor/depot_tools/recipes/recipe_modules/git/api.py +7 -35
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_branch.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_file_name.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_hash.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_ref.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/basic_submodule_update_force.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/can_fail_build.json +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/cannot_fail_build.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/cat-file_test.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/count-objects_delta.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/count-objects_failed.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/count-objects_with_bad_output.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/count-objects_with_bad_output_fails_build.json +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/curl_trace_file.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/git-cache-checkout.json +6 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/platform_win.json +223 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/rebase_failed.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/remote_not_origin.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.expected → examples/full.expected}/set_got_revision.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/git/{example.py → examples/full.py} +2 -1
- data/vendor/depot_tools/recipes/recipe_modules/git/resources/git_setup.py +12 -21
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/__init__.py +1 -4
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/api.py +13 -11
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/{example.expected → examples/full.expected}/basic.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/{example.py → examples/full.py} +4 -2
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/OWNERS +3 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/__init__.py +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/api.py +135 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.expected/basic.json +537 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py +61 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/resources/gerrit_client.py +192 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/test_api.py +95 -0
- data/vendor/depot_tools/recipes/recipe_modules/gsutil/{example.expected → examples/full.expected}/basic.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/gsutil/{example.py → examples/full.py} +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/__init__.py +0 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/basic.json +3 -2
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_buildbot_linux.json +3 -2
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_buildbot_mac.json +3 -2
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_buildbot_win.json +3 -2
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_generic_linux.json +3 -2
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.expected → examples/full.expected}/paths_generic_mac.json +3 -2
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_generic_win.json +16 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_kitchen_linux.json +16 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_kitchen_mac.json +16 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_kitchen_win.json +16 -0
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/{example.py → examples/full.py} +2 -1
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/path_config.py +12 -3
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/__init__.py +1 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/api.py +2 -2
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/{example.expected → examples/full.expected}/basic.json +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/{example.py → examples/full.py} +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/__init__.py +0 -4
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/{example.expected → examples/full.expected}/basic.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/{example.expected → examples/full.expected}/buildbot.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/no_auth.json +27 -0
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/{example.py → examples/full.py} +9 -1
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/__init__.py +3 -5
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/api.py +21 -96
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/basic_tags.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/set_failure_hash_with_no_steps.json +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json +56 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected/with_gerrit_patch_deprecated.json → examples/full.expected/with_git_patch.json} +2 -2
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected/with_gerrit_patch.json → examples/full.expected/with_git_patch_luci.json} +2 -2
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/with_rietveld_patch.json +0 -20
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/with_rietveld_patch_new.json +0 -20
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/with_wrong_patch.json +1 -13
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.expected → examples/full.expected}/with_wrong_patch_new.json +1 -13
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/{example.py → examples/full.py} +3 -17
- data/vendor/depot_tools/recipes/recipes.py +141 -96
- data/vendor/depot_tools/rietveld.py +8 -1
- data/vendor/depot_tools/roll-dep-svn.bat +12 -10
- data/vendor/depot_tools/roll-dep.bat +5 -3
- data/vendor/depot_tools/scm.py +8 -1
- data/vendor/depot_tools/setup_color.py +0 -0
- data/vendor/depot_tools/split_cl.py +193 -0
- data/vendor/depot_tools/third_party/schema/.editorconfig +15 -0
- data/vendor/depot_tools/third_party/schema/.gitignore +174 -0
- data/vendor/depot_tools/third_party/schema/.travis.yml +37 -0
- data/vendor/depot_tools/third_party/schema/LICENSE-MIT +19 -0
- data/vendor/depot_tools/third_party/schema/MANIFEST.in +1 -0
- data/vendor/depot_tools/third_party/schema/README.chromium +12 -0
- data/vendor/depot_tools/third_party/schema/README.rst +382 -0
- data/vendor/depot_tools/third_party/schema/__init__.py +1 -0
- data/vendor/depot_tools/third_party/schema/schema.py +338 -0
- data/vendor/depot_tools/third_party/schema/setup.cfg +5 -0
- data/vendor/depot_tools/third_party/schema/setup.py +30 -0
- data/vendor/depot_tools/third_party/schema/test_schema.py +556 -0
- data/vendor/depot_tools/third_party/schema/tox.ini +33 -0
- data/vendor/depot_tools/third_party/upload.py +4 -0
- data/vendor/depot_tools/update_depot_tools +4 -16
- data/vendor/depot_tools/update_depot_tools.bat +4 -17
- data/vendor/depot_tools/update_depot_tools_toggle.py +38 -0
- data/vendor/depot_tools/vpython +12 -0
- data/vendor/depot_tools/vpython.bat +7 -0
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +17 -5
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +63 -33
- metadata +161 -113
- data/vendor/depot_tools/bootstrap/gclient.bat +0 -22
- data/vendor/depot_tools/bootstrap/win/get_file.js +0 -119
- data/vendor/depot_tools/bootstrap/win/git_bootstrap.py +0 -193
- data/vendor/depot_tools/bootstrap/win/git_version.txt +0 -1
- data/vendor/depot_tools/bootstrap/win/git_version_bleeding_edge.txt +0 -1
- data/vendor/depot_tools/bootstrap/win/python276.new.bat +0 -8
- data/vendor/depot_tools/bootstrap/win/svn.new.bat +0 -4
- data/vendor/depot_tools/bootstrap/win/svnversion.new.bat +0 -4
- data/vendor/depot_tools/bootstrap/win/unzip.js +0 -91
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/basic.json +0 -53
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/basic_output_manifest.json +0 -60
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +0 -54
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/buildbot.json +0 -53
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/clobber.json +0 -54
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +0 -54
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +0 -54
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/no_shallow.json +0 -54
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +0 -53
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/trychange.json +0 -55
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/trychange_oauth2_buildbot.json +0 -57
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/trychange_oauth2_json.json +0 -55
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/trychange_oauth2_json_win.json +0 -55
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob.json +0 -59
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_fail.json +0 -62
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +0 -83
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +0 -84
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +0 -60
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle_deprecated.json +0 -60
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_v8.json +0 -62
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +0 -62
- data/vendor/depot_tools/recipes/recipe_modules/gclient/bundle_extra_paths.txt +0 -4
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/example.expected/basic.json +0 -66
- data/vendor/depot_tools/recipes/recipe_modules/git/bundle_extra_paths.txt +0 -28
- data/vendor/depot_tools/recipes/recipe_modules/git/example.expected/platform_win.json +0 -237
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_win.json +0 -15
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +0 -15
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +0 -15
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +0 -15
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/bundle_extra_paths.txt +0 -30
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/example.expected/with_git_patch.json +0 -109
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/example.expected/with_git_patch_luci.json +0 -8
data/vendor/depot_tools/cipd
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
# Use of this source code is governed by a BSD-style license that can be
|
5
5
|
# found in the LICENSE file.
|
6
6
|
|
7
|
+
set -e -o pipefail
|
8
|
+
|
7
9
|
MYPATH=$(dirname "${BASH_SOURCE[0]}")
|
8
10
|
|
9
11
|
: ${CIPD_CLIENT_VER:=`cat $MYPATH/cipd_client_version`}
|
@@ -50,8 +52,20 @@ if [ ! -e "$CLIENT" ]; then
|
|
50
52
|
echo "Bootstrapping cipd client for ${PLAT}-${ARCH}..."
|
51
53
|
echo "From $URL"
|
52
54
|
if hash curl 2> /dev/null ; then
|
53
|
-
|
54
|
-
|
55
|
+
# Download the client into a temporary file, then move it into the final
|
56
|
+
# location atomically.
|
57
|
+
#
|
58
|
+
# This wonky tempdir method works on Linux and Mac.
|
59
|
+
CIPD_CLIENT_TMP=$(\
|
60
|
+
mktemp -p "$MYPATH" 2>/dev/null || \
|
61
|
+
mktemp "$MYPATH/.cipd_client.XXXXXXX")
|
62
|
+
|
63
|
+
curl "$URL" -f -A "$USER_AGENT" -L -o "$CIPD_CLIENT_TMP"
|
64
|
+
chmod +x "$CIPD_CLIENT_TMP"
|
65
|
+
|
66
|
+
set +e
|
67
|
+
mv "$CIPD_CLIENT_TMP" "$CLIENT"
|
68
|
+
set -e
|
55
69
|
else
|
56
70
|
echo Your platform is missing the \`curl\` command. Please use your package
|
57
71
|
echo manager to install it before continuing.
|
data/vendor/depot_tools/cipd.bat
CHANGED
@@ -3,10 +3,28 @@
|
|
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
|
:: To allow this powershell script to run if it was a byproduct of downloading
|
7
9
|
:: and unzipping the depot_tools.zip distribution, we clear the Zone.Identifier
|
8
10
|
:: alternate data stream. This is equivalent to clicking the "Unblock" button
|
9
11
|
:: in the file's properties dialog.
|
10
|
-
|
12
|
+
set errorlevel=
|
13
|
+
if not exist "%~dp0.cipd_client.exe" (
|
14
|
+
echo.>%~dp0cipd.ps1:Zone.Identifier
|
15
|
+
|
16
|
+
powershell -NoProfile -ExecutionPolicy RemoteSigned -Command "%~dp0cipd.ps1" < nul
|
17
|
+
if not errorlevel 0 goto :END
|
18
|
+
)
|
19
|
+
|
20
|
+
set /p CIPD_CLIENT_VER=<%~dp0cipd_client_version
|
21
|
+
"%~dp0.cipd_client.exe" selfupdate -version "%CIPD_CLIENT_VER%"
|
22
|
+
if not errorlevel 0 goto :END
|
23
|
+
|
24
|
+
"%~dp0.cipd_client.exe" %*
|
11
25
|
|
12
|
-
|
26
|
+
:END
|
27
|
+
endlocal & (
|
28
|
+
set ERRORLEVEL=%ERRORLEVEL%
|
29
|
+
)
|
30
|
+
exit /b %ERRORLEVEL%
|
data/vendor/depot_tools/cipd.ps1
CHANGED
@@ -28,30 +28,44 @@ if ([environment]::Is64BitOperatingSystem) {
|
|
28
28
|
$url = "$cipdClientSrv/client?platform=$plat-$arch&version=$cipdClientVer"
|
29
29
|
$client = Join-Path $myPath -ChildPath ".cipd_client.exe"
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
$
|
34
|
-
|
35
|
-
|
31
|
+
try {
|
32
|
+
$depot_tools_version = &git -C $myPath rev-parse HEAD 2>&1
|
33
|
+
if ($LastExitCode -eq 0) {
|
34
|
+
$user_agent = "depot_tools/$depot_tools_version"
|
35
|
+
} else {
|
36
|
+
$user_agent = "depot_tools/???"
|
37
|
+
}
|
38
|
+
} catch [System.Management.Automation.CommandNotFoundException] {
|
39
|
+
$user_agent = "depot_tools/no_git/???"
|
36
40
|
}
|
37
41
|
|
38
42
|
$Env:CIPD_HTTP_USER_AGENT_PREFIX = $user_agent
|
39
|
-
if (!(Test-Path $client)) {
|
40
|
-
echo "Bootstrapping cipd client for $plat-$arch..."
|
41
|
-
echo "From $url"
|
42
|
-
# TODO(iannucci): It would be really nice if there was a way to get this to
|
43
|
-
# show progress without also completely destroying the download speed, but
|
44
|
-
# I can't seem to find a way to do it. Patches welcome :)
|
45
|
-
$wc = (New-Object System.Net.WebClient)
|
46
|
-
$wc.Headers.add('User-Agent', $user_agent)
|
47
|
-
$wc.DownloadFile($url, $client)
|
48
|
-
}
|
49
43
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
44
|
+
# Use a lock fle to prevent simultaneous processes from stepping on each other.
|
45
|
+
$cipd_lock = Join-Path $myPath -ChildPath '.cipd_client.lock'
|
46
|
+
while ($true) {
|
47
|
+
$cipd_lock_file = $false
|
48
|
+
try {
|
49
|
+
$cipd_lock_file = [IO.File]::OpenWrite($cipd_lock)
|
50
|
+
|
51
|
+
if (!(Test-Path $client)) {
|
52
|
+
echo "Bootstrapping cipd client for $plat-$arch..."
|
53
|
+
echo "From $url"
|
55
54
|
|
56
|
-
|
57
|
-
|
55
|
+
# TODO(iannucci): It would be really nice if there was a way to get this to
|
56
|
+
# show progress without also completely destroying the download speed, but
|
57
|
+
# I can't seem to find a way to do it. Patches welcome :)
|
58
|
+
$wc = (New-Object System.Net.WebClient)
|
59
|
+
$wc.Headers.add('User-Agent', $user_agent)
|
60
|
+
$wc.DownloadFile($url, $client)
|
61
|
+
}
|
62
|
+
break
|
63
|
+
} catch {
|
64
|
+
echo "CIPD lock is held, trying again after delay..."
|
65
|
+
Start-Sleep -s 1
|
66
|
+
} finally {
|
67
|
+
if ($cipd_lock_file) {
|
68
|
+
$cipd_lock_file.close()
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
@echo off
|
2
|
+
:: Copyright 2017 The Chromium Authors. All rights reserved.
|
3
|
+
:: Use of this source code is governed by a BSD-style license that can be
|
4
|
+
:: found in the LICENSE file.
|
5
|
+
|
6
|
+
"%~dp0\cipd.bat" ensure -ensure-file "%~dp0\cipd_manifest.txt" -root "%~dp0\.cipd_bin"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Copyright 2017 The Chromium Authors. All rights reserved.
|
2
|
+
# Use of this source code is governed by a BSD-style license that can be
|
3
|
+
# found in the LICENSE file.
|
4
|
+
|
5
|
+
function cipd_bin_setup {
|
6
|
+
local MYPATH=$(dirname "${BASH_SOURCE[0]}")
|
7
|
+
|
8
|
+
"$MYPATH/cipd" ensure -ensure-file "$MYPATH/cipd_manifest.txt" \
|
9
|
+
-root "$MYPATH/.cipd_bin"
|
10
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
git_revision:
|
1
|
+
git_revision:5cf65fdf804a9b3f3023f79d5b3cab2a88ccd09e
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Copyright 2017 The Chromium Authors. All rights reserved.
|
2
|
+
# Use of this source code is governed by a BSD-style license that can be
|
3
|
+
# found in the LICENSE file.
|
4
|
+
|
5
|
+
# vpython.
|
6
|
+
infra/tools/luci/vpython/${platform} git_revision:5cf65fdf804a9b3f3023f79d5b3cab2a88ccd09e
|
7
|
+
|
8
|
+
# LUCI editor
|
9
|
+
infra/tools/luci/led/${platform} git_revision:5cf65fdf804a9b3f3023f79d5b3cab2a88ccd09e
|
data/vendor/depot_tools/cit.bat
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
@echo off
|
2
|
-
:: Copyright (c) 2015 The Chromium Authors. All rights reserved.
|
3
|
-
:: Use of this source code is governed by a BSD-style license that can be
|
4
|
-
:: found in the LICENSE file.
|
5
|
-
setlocal
|
6
|
-
|
7
|
-
::
|
8
|
-
PATH
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
@echo off
|
2
|
+
:: Copyright (c) 2015 The Chromium Authors. All rights reserved.
|
3
|
+
:: Use of this source code is governed by a BSD-style license that can be
|
4
|
+
:: found in the LICENSE file.
|
5
|
+
setlocal
|
6
|
+
|
7
|
+
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
|
8
|
+
:: standalone, but allow other PATH manipulations to take priority.
|
9
|
+
set PATH=%PATH%;%~dp0
|
10
|
+
|
11
|
+
:: Defer control.
|
12
|
+
python "%~dp0\cit.py" %*
|
@@ -4,8 +4,9 @@
|
|
4
4
|
:: found in the LICENSE file.
|
5
5
|
setlocal
|
6
6
|
|
7
|
-
::
|
8
|
-
PATH
|
7
|
+
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
|
8
|
+
:: standalone, but allow other PATH manipulations to take priority.
|
9
|
+
set PATH=%PATH%;%~dp0
|
9
10
|
|
10
11
|
:: Defer control.
|
11
|
-
|
12
|
+
python "%~dp0\clang_format.py" %*
|
@@ -1,11 +1,12 @@
|
|
1
|
-
@echo off
|
2
|
-
:: Copyright 2016 The Chromium Authors. All rights reserved.
|
3
|
-
:: Use of this source code is governed by a BSD-style license that can be
|
4
|
-
:: found in the LICENSE file.
|
5
|
-
setlocal
|
6
|
-
|
7
|
-
::
|
8
|
-
PATH
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
@echo off
|
2
|
+
:: Copyright 2016 The Chromium Authors. All rights reserved.
|
3
|
+
:: Use of this source code is governed by a BSD-style license that can be
|
4
|
+
:: found in the LICENSE file.
|
5
|
+
setlocal
|
6
|
+
|
7
|
+
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
|
8
|
+
:: standalone, but allow other PATH manipulations to take priority.
|
9
|
+
set PATH=%PATH%;%~dp0
|
10
|
+
|
11
|
+
:: Defer control.
|
12
|
+
python "%~dp0\clang_format_merge_driver.py" %*
|
@@ -4,8 +4,9 @@
|
|
4
4
|
:: found in the LICENSE file.
|
5
5
|
setlocal
|
6
6
|
|
7
|
-
::
|
8
|
-
PATH
|
7
|
+
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
|
8
|
+
:: standalone, but allow other PATH manipulations to take priority.
|
9
|
+
set PATH=%PATH%;%~dp0
|
9
10
|
|
10
11
|
:: Defer control.
|
11
|
-
|
12
|
+
python "%~dp0\commit_queue.py" %*
|
@@ -1,5 +1,11 @@
|
|
1
1
|
@echo off
|
2
|
+
:: Copyright 2016 The Chromium Authors. All rights reserved.
|
3
|
+
:: Use of this source code is governed by a BSD-style license that can be
|
4
|
+
:: found in the LICENSE file.
|
2
5
|
setlocal
|
3
|
-
|
4
|
-
PATH
|
5
|
-
|
6
|
+
|
7
|
+
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
|
8
|
+
:: standalone, but allow other PATH manipulations to take priority.
|
9
|
+
set PATH=%PATH%;%~dp0
|
10
|
+
|
11
|
+
python "%~dp0cpplint.py" %*
|
@@ -62,7 +62,7 @@ Syntax: cpplint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...]
|
|
62
62
|
<file> [file] ...
|
63
63
|
|
64
64
|
The style guidelines this tries to follow are those in
|
65
|
-
https://google
|
65
|
+
https://google.github.io/styleguide/cppguide.html
|
66
66
|
|
67
67
|
Every problem is given a confidence score from 1-5, with 5 meaning we are
|
68
68
|
certain of the problem, and 1 meaning it could be a legitimate construct.
|
@@ -2925,7 +2925,7 @@ def CheckForFunctionLengths(filename, clean_lines, linenum,
|
|
2925
2925
|
"""Reports for long function bodies.
|
2926
2926
|
|
2927
2927
|
For an overview why this is done, see:
|
2928
|
-
https://google
|
2928
|
+
https://google.github.io/styleguide/cppguide.html#Write_Short_Functions
|
2929
2929
|
|
2930
2930
|
Uses a simplistic algorithm assuming other style guidelines
|
2931
2931
|
(especially spacing) are followed.
|
@@ -4726,7 +4726,7 @@ def CheckLanguage(filename, clean_lines, linenum, file_extension,
|
|
4726
4726
|
and line[-1] != '\\'):
|
4727
4727
|
error(filename, linenum, 'build/namespaces', 4,
|
4728
4728
|
'Do not use unnamed namespaces in header files. See '
|
4729
|
-
'https://google
|
4729
|
+
'https://google.github.io/styleguide/cppguide.html#Namespaces'
|
4730
4730
|
' for more information.')
|
4731
4731
|
|
4732
4732
|
|
@@ -4,8 +4,9 @@
|
|
4
4
|
:: found in the LICENSE file.
|
5
5
|
setlocal
|
6
6
|
|
7
|
-
::
|
8
|
-
PATH
|
7
|
+
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
|
8
|
+
:: standalone, but allow other PATH manipulations to take priority.
|
9
|
+
set PATH=%PATH%;%~dp0
|
9
10
|
|
10
11
|
:: Defer control.
|
11
|
-
|
12
|
+
python "%~dp0\depot-tools-auth.py" %*
|
@@ -2,9 +2,11 @@
|
|
2
2
|
:: Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
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
|
+
setlocal
|
5
6
|
|
6
|
-
::
|
7
|
-
PATH
|
7
|
+
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
|
8
|
+
:: standalone, but allow other PATH manipulations to take priority.
|
9
|
+
set PATH=%PATH%;%~dp0
|
8
10
|
|
9
11
|
:: Defer control.
|
10
|
-
|
12
|
+
python "%~dp0\download_from_google_storage.py" %*
|
@@ -60,7 +60,7 @@ class Gsutil(object):
|
|
60
60
|
RETRY_BASE_DELAY = 5.0
|
61
61
|
RETRY_DELAY_MULTIPLE = 1.3
|
62
62
|
|
63
|
-
def __init__(self, path, boto_path=None, timeout=None, version='4.
|
63
|
+
def __init__(self, path, boto_path=None, timeout=None, version='4.26'):
|
64
64
|
if not os.path.exists(path):
|
65
65
|
raise FileNotFoundError('GSUtil not found in %s' % path)
|
66
66
|
self.path = path
|
@@ -284,6 +284,11 @@ def _downloader_worker_thread(thread_num, q, force, base_url,
|
|
284
284
|
continue
|
285
285
|
with tarfile.open(output_filename, 'r:gz') as tar:
|
286
286
|
dirname = os.path.dirname(os.path.abspath(output_filename))
|
287
|
+
# If there are long paths inside the tarball we can get extraction
|
288
|
+
# errors on windows due to the 260 path length limit (this includes
|
289
|
+
# pwd). Use the extended path syntax.
|
290
|
+
if sys.platform == 'win32':
|
291
|
+
dirname = '\\\\?\\%s' % dirname
|
287
292
|
if not _validate_tar_file(tar, os.path.basename(extract_dir)):
|
288
293
|
out_q.put('%d> Error: %s contains files outside %s.' % (
|
289
294
|
thread_num, output_filename, extract_dir))
|
@@ -4,11 +4,12 @@
|
|
4
4
|
:: found in the LICENSE file.
|
5
5
|
setlocal
|
6
6
|
|
7
|
-
:: This is required with cygwin only.
|
8
|
-
PATH=%~dp0;%PATH%
|
9
|
-
|
10
7
|
:: Synchronize the root directory before deferring control back to gclient.py.
|
11
8
|
call "%~dp0\update_depot_tools.bat"
|
12
9
|
|
10
|
+
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
|
11
|
+
:: standalone, but allow other PATH manipulations to take priority.
|
12
|
+
set PATH=%PATH%;%~dp0
|
13
|
+
|
13
14
|
:: Defer control.
|
14
|
-
|
15
|
+
python "%~dp0\fetch.py" %*
|
data/vendor/depot_tools/fetch.py
CHANGED
@@ -26,6 +26,8 @@ import subprocess
|
|
26
26
|
import sys
|
27
27
|
import textwrap
|
28
28
|
|
29
|
+
import git_common
|
30
|
+
|
29
31
|
from distutils import spawn
|
30
32
|
|
31
33
|
|
@@ -88,11 +90,8 @@ class GclientCheckout(Checkout):
|
|
88
90
|
class GitCheckout(Checkout):
|
89
91
|
|
90
92
|
def run_git(self, *cmd, **kwargs):
|
91
|
-
|
92
|
-
|
93
|
-
else:
|
94
|
-
git_path = 'git'
|
95
|
-
return self.run((git_path,) + cmd, **kwargs)
|
93
|
+
print 'Running: git %s' % (' '.join(pipes.quote(x) for x in cmd))
|
94
|
+
return git_common.run(*cmd, **kwargs)
|
96
95
|
|
97
96
|
|
98
97
|
class GclientGitCheckout(GclientCheckout, GitCheckout):
|
@@ -4,9 +4,10 @@
|
|
4
4
|
# found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# Usage:
|
7
|
-
# gclient-new-workdir.py <repository> <new_workdir>
|
7
|
+
# gclient-new-workdir.py [options] <repository> <new_workdir>
|
8
8
|
#
|
9
9
|
|
10
|
+
import argparse
|
10
11
|
import os
|
11
12
|
import shutil
|
12
13
|
import subprocess
|
@@ -16,67 +17,102 @@ import textwrap
|
|
16
17
|
import git_common
|
17
18
|
|
18
19
|
|
19
|
-
def print_err(msg):
|
20
|
-
print >> sys.stderr, msg
|
21
|
-
|
22
|
-
|
23
|
-
def usage(msg=None):
|
24
|
-
|
25
|
-
if msg is not None:
|
26
|
-
print_err('\n' + textwrap.dedent(msg) + '\n')
|
27
|
-
usage_msg = 'Run without arguments to get usage help.'
|
28
|
-
else:
|
29
|
-
usage_msg = '''\
|
30
|
-
usage: %s <repository> <new_workdir>
|
31
|
-
|
32
|
-
Clone an existing gclient directory, taking care of all sub-repositories
|
33
|
-
Works similarly to 'git new-workdir'.
|
34
|
-
|
35
|
-
<repository> should contain a .gclient file
|
36
|
-
<new_workdir> must not exist
|
37
|
-
'''% os.path.basename(sys.argv[0])
|
38
|
-
|
39
|
-
print_err(textwrap.dedent(usage_msg))
|
40
|
-
sys.exit(1)
|
41
|
-
|
42
|
-
|
43
20
|
def parse_options():
|
44
21
|
if sys.platform == 'win32':
|
45
|
-
|
22
|
+
print('ERROR: This script cannot run on Windows because it uses symlinks.')
|
23
|
+
sys.exit(1)
|
24
|
+
|
25
|
+
parser = argparse.ArgumentParser(description='''\
|
26
|
+
Clone an existing gclient directory, taking care of all sub-repositories.
|
27
|
+
Works similarly to 'git new-workdir'.''')
|
28
|
+
parser.add_argument('repository', type=os.path.abspath,
|
29
|
+
help='should contain a .gclient file')
|
30
|
+
parser.add_argument('new_workdir', help='must not exist')
|
31
|
+
parser.add_argument('--reflink', action='store_true', default=None,
|
32
|
+
help='''force to use "cp --reflink" for speed and disk
|
33
|
+
space. need supported FS like btrfs or ZFS.''')
|
34
|
+
parser.add_argument('--no-reflink', action='store_false', dest='reflink',
|
35
|
+
help='''force not to use "cp --reflink" even on supported
|
36
|
+
FS like btrfs or ZFS.''')
|
37
|
+
args = parser.parse_args()
|
38
|
+
|
39
|
+
if not os.path.exists(args.repository):
|
40
|
+
parser.error('Repository "%s" does not exist.' % args.repository)
|
41
|
+
|
42
|
+
gclient = os.path.join(args.repository, '.gclient')
|
43
|
+
if not os.path.exists(gclient):
|
44
|
+
parser.error('No .gclient file at "%s".' % gclient)
|
46
45
|
|
47
|
-
if
|
48
|
-
|
46
|
+
if os.path.exists(args.new_workdir):
|
47
|
+
parser.error('New workdir "%s" already exists.' % args.new_workdir)
|
49
48
|
|
50
|
-
|
51
|
-
new_workdir = sys.argv[2]
|
49
|
+
return args
|
52
50
|
|
53
|
-
if not os.path.exists(repository):
|
54
|
-
usage('Repository does not exist: ' + repository)
|
55
51
|
|
56
|
-
|
57
|
-
|
52
|
+
def support_cow(src, dest):
|
53
|
+
try:
|
54
|
+
subprocess.check_output(['cp', '-a', '--reflink', src, dest],
|
55
|
+
stderr=subprocess.STDOUT)
|
56
|
+
except subprocess.CalledProcessError:
|
57
|
+
return False
|
58
|
+
finally:
|
59
|
+
if os.path.isfile(dest):
|
60
|
+
os.remove(dest)
|
61
|
+
return True
|
58
62
|
|
59
|
-
return repository, new_workdir
|
60
63
|
|
64
|
+
def try_vol_snapshot(src, dest):
|
65
|
+
try:
|
66
|
+
subprocess.check_call(['btrfs', 'subvol', 'snapshot', src, dest],
|
67
|
+
stderr=subprocess.STDOUT)
|
68
|
+
except (subprocess.CalledProcessError, OSError):
|
69
|
+
return False
|
70
|
+
return True
|
61
71
|
|
62
|
-
def main():
|
63
|
-
repository, new_workdir = parse_options()
|
64
72
|
|
65
|
-
|
66
|
-
|
67
|
-
print_err('No .gclient file: ' + gclient)
|
73
|
+
def main():
|
74
|
+
args = parse_options()
|
68
75
|
|
69
|
-
os.
|
70
|
-
|
76
|
+
gclient = os.path.join(args.repository, '.gclient')
|
77
|
+
new_gclient = os.path.join(args.new_workdir, '.gclient')
|
71
78
|
|
72
|
-
|
79
|
+
if try_vol_snapshot(args.repository, args.new_workdir):
|
80
|
+
args.reflink = True
|
81
|
+
else:
|
82
|
+
os.makedirs(args.new_workdir)
|
83
|
+
if args.reflink is None:
|
84
|
+
args.reflink = support_cow(gclient, new_gclient)
|
85
|
+
if args.reflink:
|
86
|
+
print('Copy-on-write support is detected.')
|
87
|
+
os.symlink(gclient, new_gclient)
|
88
|
+
|
89
|
+
for root, dirs, _ in os.walk(args.repository):
|
73
90
|
if '.git' in dirs:
|
74
|
-
workdir = root.replace(repository, new_workdir, 1)
|
91
|
+
workdir = root.replace(args.repository, args.new_workdir, 1)
|
75
92
|
print('Creating: %s' % workdir)
|
93
|
+
|
94
|
+
if args.reflink:
|
95
|
+
if not os.path.exists(workdir):
|
96
|
+
print('Copying: %s' % workdir)
|
97
|
+
subprocess.check_call(['cp', '-a', '--reflink', root, workdir])
|
98
|
+
shutil.rmtree(os.path.join(workdir, '.git'))
|
99
|
+
|
76
100
|
git_common.make_workdir(os.path.join(root, '.git'),
|
77
101
|
os.path.join(workdir, '.git'))
|
78
|
-
|
79
|
-
|
102
|
+
if args.reflink:
|
103
|
+
subprocess.check_call(['cp', '-a', '--reflink',
|
104
|
+
os.path.join(root, '.git', 'index'),
|
105
|
+
os.path.join(workdir, '.git', 'index')])
|
106
|
+
else:
|
107
|
+
subprocess.check_call(['git', 'checkout', '-f'], cwd=workdir)
|
108
|
+
|
109
|
+
if args.reflink:
|
110
|
+
print(textwrap.dedent('''\
|
111
|
+
The repo was copied with copy-on-write, and the artifacts were retained.
|
112
|
+
More details on http://crbug.com/721585.
|
113
|
+
|
114
|
+
Depending on your usage pattern, you might want to do "gn gen"
|
115
|
+
on the output directories. More details: http://crbug.com/723856.'''))
|
80
116
|
|
81
117
|
if __name__ == '__main__':
|
82
118
|
sys.exit(main())
|