libv8 4.5.95.5 → 5.0.71.48.0beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +45 -19
- data/CHANGELOG.md +14 -0
- data/README.md +30 -15
- data/Rakefile +7 -6
- data/ext/libv8/arch.rb +5 -4
- data/ext/libv8/builder.rb +25 -19
- data/ext/libv8/compiler.rb +6 -33
- data/ext/libv8/location.rb +7 -8
- data/lib/libv8/version.rb +1 -1
- data/libv8.gemspec +1 -1
- data/patches/build-standalone-static-library.patch +14 -0
- data/patches/disable-building-tests.patch +48 -10
- data/patches/fPIC-for-static.patch +3 -3
- data/release/x86-linux/Vagrantfile +8 -4
- data/release/x86_64-freebsd10/Vagrantfile +86 -0
- data/release/x86_64-linux/Vagrantfile +8 -4
- data/spec/compiler_spec.rb +5 -29
- data/spec/support/compiler_helpers.rb +2 -4
- data/vendor/depot_tools/.gitignore +15 -3
- data/vendor/depot_tools/OWNERS +2 -2
- data/vendor/depot_tools/PRESUBMIT.py +4 -2
- data/vendor/depot_tools/WATCHLISTS +6 -0
- data/vendor/depot_tools/apply_issue.py +70 -38
- data/vendor/depot_tools/bootstrap/win/README.md +66 -0
- data/vendor/depot_tools/bootstrap/win/git-bash.template.sh +12 -0
- data/vendor/depot_tools/bootstrap/win/git.template.bat +5 -0
- data/vendor/depot_tools/bootstrap/win/profile.d.python.sh +20 -0
- data/vendor/depot_tools/bootstrap/win/win_tools.bat +96 -45
- data/vendor/depot_tools/breakpad.py +6 -141
- data/vendor/depot_tools/buildbucket.py +45 -31
- data/vendor/depot_tools/cbuildbot +1 -0
- data/vendor/depot_tools/checkout.py +2 -1
- data/vendor/depot_tools/chrome_set_ver +1 -0
- data/vendor/depot_tools/cit +8 -0
- data/vendor/depot_tools/cit.bat +11 -0
- data/vendor/depot_tools/cit.py +120 -0
- data/vendor/depot_tools/codereview.settings +0 -2
- data/vendor/depot_tools/commit_queue +1 -5
- data/vendor/depot_tools/commit_queue.bat +1 -4
- data/vendor/depot_tools/commit_queue.py +78 -29
- data/vendor/depot_tools/cpplint.py +22 -14
- data/vendor/depot_tools/cros +1 -0
- data/vendor/depot_tools/cros_sdk +1 -0
- data/vendor/depot_tools/depot-tools-auth.py +3 -3
- data/vendor/depot_tools/download_from_google_storage.py +101 -21
- data/vendor/depot_tools/drover.py +2 -3
- data/vendor/depot_tools/fetch.py +31 -27
- data/vendor/depot_tools/{recipes → fetch_configs}/android.py +4 -4
- data/vendor/depot_tools/fetch_configs/breakpad.py +45 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/chromium.py +3 -3
- data/vendor/depot_tools/{recipes/recipe_util.py → fetch_configs/config_util.py} +3 -3
- data/vendor/depot_tools/fetch_configs/crashpad.py +41 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/dart.py +3 -3
- data/vendor/depot_tools/{recipes/pdfium.py → fetch_configs/dartino.py} +14 -13
- data/vendor/depot_tools/{recipes → fetch_configs}/dartium.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/depot_tools.py +3 -3
- data/vendor/depot_tools/fetch_configs/gyp.py +42 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/infra.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/infra_internal.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/ios.py +4 -4
- data/vendor/depot_tools/{recipes → fetch_configs}/mojo.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/nacl.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/naclports.py +3 -3
- data/vendor/depot_tools/fetch_configs/pdfium.py +40 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/skia.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/skia_buildbot.py +3 -3
- data/vendor/depot_tools/fetch_configs/syzygy.py +41 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/v8.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/webrtc.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_android.py +4 -4
- data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_ios.py +4 -4
- data/vendor/depot_tools/fix_encoding.py +6 -6
- data/vendor/depot_tools/gcl.py +11 -21
- data/vendor/depot_tools/gclient +10 -0
- data/vendor/depot_tools/gclient-new-workdir.py +7 -38
- data/vendor/depot_tools/gclient.bat +2 -2
- data/vendor/depot_tools/gclient.py +85 -65
- data/vendor/depot_tools/gclient_scm.py +83 -10
- data/vendor/depot_tools/gclient_utils.py +5 -1
- data/vendor/depot_tools/gerrit_util.py +243 -26
- data/vendor/depot_tools/git-auto-svn +1 -1
- data/vendor/depot_tools/git-cache +1 -1
- data/vendor/depot_tools/git-cherry-pick-upload +1 -1
- data/vendor/depot_tools/git-cl +1 -1
- data/vendor/depot_tools/git-drover +6 -0
- data/vendor/depot_tools/git-find-releases +6 -0
- data/vendor/depot_tools/git-footers +1 -1
- data/vendor/depot_tools/git-freeze +1 -1
- data/vendor/depot_tools/git-gs +1 -1
- data/vendor/depot_tools/git-hyper-blame +6 -0
- data/vendor/depot_tools/git-map +1 -1
- data/vendor/depot_tools/git-map-branches +1 -1
- data/vendor/depot_tools/git-mark-merge-base +1 -1
- data/vendor/depot_tools/git-nav-downstream +1 -1
- data/vendor/depot_tools/git-new-branch +1 -1
- data/vendor/depot_tools/git-number +1 -1
- data/vendor/depot_tools/git-rebase-update +1 -1
- data/vendor/depot_tools/git-rename-branch +1 -1
- data/vendor/depot_tools/git-reparent-branch +1 -1
- data/vendor/depot_tools/git-retry +1 -1
- data/vendor/depot_tools/git-squash-branch +1 -1
- data/vendor/depot_tools/git-thaw +1 -1
- data/vendor/depot_tools/git-try +1 -1
- data/vendor/depot_tools/git-upstream-diff +1 -1
- data/vendor/depot_tools/git_auto_svn.py +24 -6
- data/vendor/depot_tools/git_cache.py +74 -27
- data/vendor/depot_tools/git_cl.py +2118 -747
- data/vendor/depot_tools/git_common.py +100 -6
- data/vendor/depot_tools/git_dates.py +62 -0
- data/vendor/depot_tools/git_drover.py +424 -0
- data/vendor/depot_tools/git_find_releases.py +65 -0
- data/vendor/depot_tools/git_footers.py +42 -0
- data/vendor/depot_tools/git_hyper_blame.py +391 -0
- data/vendor/depot_tools/git_map_branches.py +8 -6
- data/vendor/depot_tools/git_new_branch.py +6 -1
- data/vendor/depot_tools/git_rebase_update.py +56 -16
- data/vendor/depot_tools/git_reparent_branch.py +13 -0
- data/vendor/depot_tools/git_try.py +0 -2
- data/vendor/depot_tools/gsutil.py +51 -20
- data/vendor/depot_tools/infra/config/OWNERS +3 -1
- data/vendor/depot_tools/infra/config/cq.cfg +7 -3
- data/vendor/depot_tools/infra/config/recipes.cfg +9 -0
- data/vendor/depot_tools/luci_hacks/README.md +35 -0
- data/vendor/depot_tools/{bootstrap/virtualenv/tests → luci_hacks}/__init__.py +0 -0
- data/vendor/depot_tools/luci_hacks/luci_recipe_run.isolate +12 -0
- data/vendor/depot_tools/luci_hacks/luci_recipe_run.py +81 -0
- data/vendor/depot_tools/luci_hacks/trigger_luci_job.py +128 -0
- data/vendor/depot_tools/man/html/depot_tools.html +9 -1
- data/vendor/depot_tools/man/html/depot_tools_tutorial.html +4 -4
- data/vendor/depot_tools/man/html/git-drover.html +191 -35
- data/vendor/depot_tools/man/html/git-hyper-blame.html +878 -0
- data/vendor/depot_tools/man/html/git-rebase-update.html +9 -4
- data/vendor/depot_tools/man/man1/git-drover.1 +189 -36
- data/vendor/depot_tools/man/man1/git-hyper-blame.1 +128 -0
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +8 -6
- data/vendor/depot_tools/man/man7/depot_tools.7 +9 -4
- data/vendor/depot_tools/man/src/_git-hyper-blame_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/common_demo_functions.sh +5 -0
- data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +1 -1
- data/vendor/depot_tools/man/src/git-drover.demo.1.sh +11 -16
- data/vendor/depot_tools/man/src/git-drover.demo.3.sh +27 -0
- data/vendor/depot_tools/man/src/git-drover.demo.4.sh +39 -0
- data/vendor/depot_tools/man/src/git-drover.txt +49 -3
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.1.sh +3 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.2.sh +4 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.common.sh +57 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.txt +85 -0
- data/vendor/depot_tools/man/src/git-rebase-update.txt +5 -1
- data/vendor/depot_tools/my_activity.py +6 -21
- data/vendor/depot_tools/ninja +2 -2
- data/vendor/depot_tools/ninja-linux32 +0 -0
- data/vendor/depot_tools/ninja-linux64 +0 -0
- data/vendor/depot_tools/ninja-mac +0 -0
- data/vendor/depot_tools/ninja.exe +0 -0
- data/vendor/depot_tools/presubmit_canned_checks.py +83 -69
- data/vendor/depot_tools/presubmit_support.py +126 -42
- data/vendor/depot_tools/pylint.py +5 -1
- data/vendor/depot_tools/python_runner.sh +55 -0
- data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +32 -0
- data/vendor/depot_tools/recipe_modules/bot_update/api.py +283 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +56 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +63 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +57 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +44 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/forced.json +57 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +44 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +44 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +43 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +43 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/svn_mode.json +59 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +58 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +60 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +58 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +60 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +81 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +81 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +49 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +61 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +51 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.py +172 -0
- data/vendor/depot_tools/{bootstrap/virtualenv/virtualenv_support → recipe_modules/bot_update/resources}/__init__.py +0 -0
- data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +1764 -0
- data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +86 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/__init__.py +3 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/api.py +27 -0
- data/vendor/depot_tools/recipe_modules/gclient/__init__.py +10 -0
- data/vendor/depot_tools/recipe_modules/gclient/api.py +378 -0
- data/vendor/depot_tools/recipe_modules/gclient/config.py +671 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +172 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +174 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +185 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.py +100 -0
- data/vendor/depot_tools/recipe_modules/gclient/test_api.py +37 -0
- data/vendor/depot_tools/recipe_modules/git/__init__.py +9 -0
- data/vendor/depot_tools/recipe_modules/git/api.py +377 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +177 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +177 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +179 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +176 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +177 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +178 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +153 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +181 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +199 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +250 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +181 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +182 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +102 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +181 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +186 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +179 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +179 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +178 -0
- data/vendor/depot_tools/recipe_modules/git/example.py +147 -0
- data/vendor/depot_tools/recipe_modules/git/resources/git_setup.py +61 -0
- data/vendor/depot_tools/recipe_modules/git/test_api.py +18 -0
- data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/git_cl/api.py +25 -0
- data/vendor/depot_tools/recipe_modules/git_cl/config.py +22 -0
- data/vendor/depot_tools/recipe_modules/git_cl/example.expected/basic.json +66 -0
- data/vendor/depot_tools/recipe_modules/git_cl/example.py +41 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/api.py +12 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.py +28 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +45 -0
- data/vendor/depot_tools/recipe_modules/presubmit/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/presubmit/api.py +20 -0
- data/vendor/depot_tools/recipe_modules/presubmit/example.expected/basic.json +18 -0
- data/vendor/depot_tools/recipe_modules/presubmit/example.py +15 -0
- data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
- data/vendor/depot_tools/recipe_modules/rietveld/api.py +94 -0
- data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +30 -0
- data/vendor/depot_tools/recipe_modules/rietveld/example.py +24 -0
- data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +15 -0
- data/vendor/depot_tools/recipe_modules/tryserver/api.py +280 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +104 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +58 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +58 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_svn_patch.json +68 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +43 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +43 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.py +53 -0
- data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +7 -0
- data/vendor/depot_tools/recipes.py +136 -0
- data/vendor/depot_tools/repo +1 -1
- data/vendor/depot_tools/rietveld.py +46 -15
- data/vendor/depot_tools/roll_dep.py +97 -36
- data/vendor/depot_tools/scm.py +3 -3
- data/vendor/depot_tools/setup_color.py +94 -0
- data/vendor/depot_tools/subprocess2.py +10 -1
- data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -1
- data/vendor/depot_tools/third_party/cq_client/README.md +47 -9
- data/vendor/depot_tools/third_party/cq_client/cq.pb.go +617 -0
- data/vendor/depot_tools/third_party/cq_client/cq.proto +75 -17
- data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +168 -41
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +55 -0
- data/vendor/depot_tools/third_party/cq_client/{test/cq_example.cfg → testdata/cq_rietveld.cfg} +14 -6
- data/vendor/depot_tools/third_party/fancy_urllib/README +5 -4
- data/vendor/depot_tools/third_party/fancy_urllib/__init__.py +114 -52
- data/vendor/depot_tools/third_party/protobuf26/README.chromium +9 -6
- data/vendor/depot_tools/third_party/upload.py +17 -31
- data/vendor/depot_tools/trychange.py +0 -2
- data/vendor/depot_tools/update_depot_tools +29 -11
- data/vendor/depot_tools/update_depot_tools.bat +4 -9
- data/vendor/depot_tools/upload_to_google_storage.py +42 -5
- data/vendor/depot_tools/win_toolchain/OWNERS +1 -0
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +227 -52
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +203 -88
- metadata +161 -81
- data/patches/arm/do-not-imply-vfp3-and-armv7.patch +0 -16
- data/patches/arm/do-not-use-vfp2.patch +0 -13
- data/patches/clang51/no-unused-variable.patch +0 -12
- data/vendor/depot_tools/bootstrap/.gitignore +0 -2
- data/vendor/depot_tools/bootstrap/bootstrap.py +0 -234
- data/vendor/depot_tools/bootstrap/deps.pyl +0 -15
- data/vendor/depot_tools/bootstrap/util.py +0 -87
- data/vendor/depot_tools/bootstrap/virtualenv/.gitignore +0 -10
- data/vendor/depot_tools/bootstrap/virtualenv/.travis.yml +0 -28
- data/vendor/depot_tools/bootstrap/virtualenv/AUTHORS.txt +0 -91
- data/vendor/depot_tools/bootstrap/virtualenv/CONTRIBUTING.rst +0 -21
- data/vendor/depot_tools/bootstrap/virtualenv/LICENSE.txt +0 -22
- data/vendor/depot_tools/bootstrap/virtualenv/MANIFEST.in +0 -11
- data/vendor/depot_tools/bootstrap/virtualenv/README.rst +0 -10
- data/vendor/depot_tools/bootstrap/virtualenv/bin/rebuild-script.py +0 -71
- data/vendor/depot_tools/bootstrap/virtualenv/docs/changes.rst +0 -747
- data/vendor/depot_tools/bootstrap/virtualenv/docs/conf.py +0 -149
- data/vendor/depot_tools/bootstrap/virtualenv/docs/development.rst +0 -61
- data/vendor/depot_tools/bootstrap/virtualenv/docs/index.rst +0 -137
- data/vendor/depot_tools/bootstrap/virtualenv/docs/installation.rst +0 -58
- data/vendor/depot_tools/bootstrap/virtualenv/docs/make.bat +0 -170
- data/vendor/depot_tools/bootstrap/virtualenv/docs/reference.rst +0 -256
- data/vendor/depot_tools/bootstrap/virtualenv/docs/userguide.rst +0 -249
- data/vendor/depot_tools/bootstrap/virtualenv/scripts/virtualenv +0 -3
- data/vendor/depot_tools/bootstrap/virtualenv/setup.py +0 -111
- data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate.sh +0 -94
- data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate_expected.output +0 -2
- data/vendor/depot_tools/bootstrap/virtualenv/tests/test_virtualenv.py +0 -139
- data/vendor/depot_tools/bootstrap/virtualenv/tests/tox.ini +0 -12
- data/vendor/depot_tools/bootstrap/virtualenv/tox.ini +0 -17
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv.py +0 -2367
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.bat +0 -26
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.csh +0 -42
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.fish +0 -74
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.ps1 +0 -150
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.sh +0 -80
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate_this.py +0 -34
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/deactivate.bat +0 -20
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils-init.py +0 -101
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils.cfg +0 -6
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/site.py +0 -758
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/pip-6.0-py2.py3-none-any.whl +0 -0
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/setuptools-8.2.1-py2.py3-none-any.whl +0 -0
- data/vendor/depot_tools/bootstrap/win/README.google +0 -16
- data/vendor/depot_tools/cbuildbot +0 -96
- data/vendor/depot_tools/chrome_set_ver +0 -96
- data/vendor/depot_tools/cros +0 -96
- data/vendor/depot_tools/cros_sdk +0 -96
- data/vendor/depot_tools/git-cl-upload-hook +0 -52
- data/vendor/depot_tools/git-crup +0 -45
- data/vendor/depot_tools/python_git_runner.sh +0 -36
- data/vendor/depot_tools/recipes/blink.py +0 -59
- data/vendor/depot_tools/third_party/cq_client/test/validate_config_test.py +0 -52
- data/vendor/depot_tools/third_party/cq_client/validate_config.py +0 -108
- data/vendor/depot_tools/win_toolchain/toolchain2013.py +0 -494
@@ -0,0 +1,100 @@
|
|
1
|
+
# Copyright 2013 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
|
+
DEPS = [
|
6
|
+
'gclient',
|
7
|
+
'recipe_engine/path',
|
8
|
+
'recipe_engine/properties',
|
9
|
+
]
|
10
|
+
|
11
|
+
|
12
|
+
TEST_CONFIGS = [
|
13
|
+
'android',
|
14
|
+
'android_bare',
|
15
|
+
'blink',
|
16
|
+
'blink_or_chromium',
|
17
|
+
'boringssl',
|
18
|
+
'build_internal',
|
19
|
+
'build_internal_scripts_slave',
|
20
|
+
'catapult',
|
21
|
+
'chrome_internal',
|
22
|
+
'chromium',
|
23
|
+
'chromium_lkcr',
|
24
|
+
'chromium_lkgr',
|
25
|
+
'chromium_skia',
|
26
|
+
'chromium_webrtc',
|
27
|
+
'chromium_webrtc_tot',
|
28
|
+
'crashpad',
|
29
|
+
'custom_tabs_client',
|
30
|
+
'dart',
|
31
|
+
'gerrit_test_cq_normal',
|
32
|
+
'gyp',
|
33
|
+
'infra',
|
34
|
+
'infradata_master_manager',
|
35
|
+
'internal_deps',
|
36
|
+
'ios',
|
37
|
+
'luci_gae',
|
38
|
+
'luci_go',
|
39
|
+
'luci_py',
|
40
|
+
'master_deps',
|
41
|
+
'mojo',
|
42
|
+
'nacl',
|
43
|
+
'pdfium',
|
44
|
+
'perf',
|
45
|
+
'recipes_py',
|
46
|
+
'show_v8_revision',
|
47
|
+
'slave_deps',
|
48
|
+
'v8_bleeding_edge_git',
|
49
|
+
'v8_canary',
|
50
|
+
'wasm_llvm',
|
51
|
+
'webports',
|
52
|
+
'webrtc_test_resources',
|
53
|
+
'with_branch_heads',
|
54
|
+
]
|
55
|
+
|
56
|
+
|
57
|
+
def RunSteps(api):
|
58
|
+
for config_name in TEST_CONFIGS:
|
59
|
+
api.gclient.make_config(config_name)
|
60
|
+
|
61
|
+
src_cfg = api.gclient.make_config(GIT_MODE=True, CACHE_DIR='[ROOT]/git_cache')
|
62
|
+
soln = src_cfg.solutions.add()
|
63
|
+
soln.name = 'src'
|
64
|
+
soln.url = 'https://chromium.googlesource.com/chromium/src.git'
|
65
|
+
soln.revision = api.properties.get('revision')
|
66
|
+
src_cfg.parent_got_revision_mapping['parent_got_revision'] = 'got_revision'
|
67
|
+
api.gclient.c = src_cfg
|
68
|
+
api.gclient.checkout()
|
69
|
+
|
70
|
+
api.gclient.spec_alias = 'WebKit'
|
71
|
+
bl_cfg = api.gclient.make_config()
|
72
|
+
soln = bl_cfg.solutions.add()
|
73
|
+
soln.name = 'WebKit'
|
74
|
+
soln.url = 'svn://svn.chromium.org/blink/trunk'
|
75
|
+
bl_cfg.revisions['third_party/WebKit'] = '123'
|
76
|
+
|
77
|
+
# Use safesync url for lkgr.
|
78
|
+
soln.safesync_url = 'https://blink-status.appspot.com/lkgr'
|
79
|
+
|
80
|
+
bl_cfg.got_revision_mapping['src/blatley'] = 'got_blatley_revision'
|
81
|
+
api.gclient.checkout(
|
82
|
+
gclient_config=bl_cfg,
|
83
|
+
with_branch_heads=True,
|
84
|
+
cwd=api.path['slave_build'].join('src', 'third_party'))
|
85
|
+
|
86
|
+
api.gclient.break_locks()
|
87
|
+
|
88
|
+
del api.gclient.spec_alias
|
89
|
+
|
90
|
+
api.gclient.runhooks()
|
91
|
+
|
92
|
+
assert not api.gclient.is_blink_mode
|
93
|
+
|
94
|
+
|
95
|
+
def GenTests(api):
|
96
|
+
yield api.test('basic')
|
97
|
+
|
98
|
+
yield api.test('revision') + api.properties(revision='abc')
|
99
|
+
|
100
|
+
yield api.test('tryserver') + api.properties.tryserver()
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Copyright 2014 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
|
+
import hashlib
|
6
|
+
|
7
|
+
from recipe_engine import recipe_test_api
|
8
|
+
|
9
|
+
class GclientTestApi(recipe_test_api.RecipeTestApi):
|
10
|
+
def output_json(self, projects, git_mode=False):
|
11
|
+
"""Deterministically synthesize json.output test data for gclient's
|
12
|
+
--output-json option.
|
13
|
+
|
14
|
+
Args:
|
15
|
+
projects - a list of project paths (e.g. ['src', 'src/dependency'])
|
16
|
+
git_mode - Return git hashes instead of svn revs.
|
17
|
+
"""
|
18
|
+
# TODO(iannucci): Account for parent_got_revision_mapping. Right now the
|
19
|
+
# synthesized json output from this method will always use
|
20
|
+
# gen_revision(project), but if parent_got_revision and its ilk are
|
21
|
+
# specified, we should use those values instead.
|
22
|
+
return self.m.json.output({
|
23
|
+
'solutions': dict(
|
24
|
+
(p+'/', {'revision': self.gen_revision(p, git_mode)})
|
25
|
+
for p in projects
|
26
|
+
)
|
27
|
+
})
|
28
|
+
|
29
|
+
@staticmethod
|
30
|
+
def gen_revision(project, GIT_MODE):
|
31
|
+
"""Hash project to bogus deterministic revision values."""
|
32
|
+
h = hashlib.sha1(project)
|
33
|
+
if GIT_MODE:
|
34
|
+
return h.hexdigest()
|
35
|
+
else:
|
36
|
+
import struct
|
37
|
+
return struct.unpack('!I', h.digest()[:4])[0] % 300000
|
@@ -0,0 +1,377 @@
|
|
1
|
+
# Copyright 2013 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
|
+
import itertools
|
6
|
+
import re
|
7
|
+
|
8
|
+
from recipe_engine import recipe_api
|
9
|
+
|
10
|
+
class GitApi(recipe_api.RecipeApi):
|
11
|
+
_GIT_HASH_RE = re.compile('[0-9a-f]{40}', re.IGNORECASE)
|
12
|
+
|
13
|
+
def __init__(self, *args, **kwargs):
|
14
|
+
super(GitApi, self).__init__(*args, **kwargs)
|
15
|
+
self.initialized_win_git = False
|
16
|
+
|
17
|
+
def __call__(self, *args, **kwargs):
|
18
|
+
"""Return a git command step."""
|
19
|
+
name = kwargs.pop('name', 'git '+args[0])
|
20
|
+
infra_step = kwargs.pop('infra_step', True)
|
21
|
+
if 'cwd' not in kwargs:
|
22
|
+
kwargs.setdefault('cwd', self.m.path['checkout'])
|
23
|
+
git_cmd = ['git']
|
24
|
+
if self.m.platform.is_win:
|
25
|
+
self.ensure_win_git_tooling()
|
26
|
+
git_cmd = [self.package_repo_resource('git.bat')]
|
27
|
+
options = kwargs.pop('git_config_options', {})
|
28
|
+
for k, v in sorted(options.iteritems()):
|
29
|
+
git_cmd.extend(['-c', '%s=%s' % (k, v)])
|
30
|
+
can_fail_build = kwargs.pop('can_fail_build', True)
|
31
|
+
try:
|
32
|
+
return self.m.step(name, git_cmd + list(args), infra_step=infra_step,
|
33
|
+
**kwargs)
|
34
|
+
except self.m.step.StepFailure as f:
|
35
|
+
if can_fail_build:
|
36
|
+
raise
|
37
|
+
else:
|
38
|
+
return f.result
|
39
|
+
|
40
|
+
def ensure_win_git_tooling(self):
|
41
|
+
"""Ensures that depot_tools/git.bat actually exists."""
|
42
|
+
if not self.m.platform.is_win or self.initialized_win_git:
|
43
|
+
return
|
44
|
+
self.m.step(
|
45
|
+
'ensure git tooling on windows',
|
46
|
+
[self.package_repo_resource('bootstrap', 'win', 'win_tools.bat')],
|
47
|
+
infra_step=True,
|
48
|
+
cwd=self.package_repo_resource())
|
49
|
+
self.initialized_win_git = True
|
50
|
+
|
51
|
+
def fetch_tags(self, remote_name=None, **kwargs):
|
52
|
+
"""Fetches all tags from the remote."""
|
53
|
+
kwargs.setdefault('name', 'git fetch tags')
|
54
|
+
remote_name = remote_name or 'origin'
|
55
|
+
return self('fetch', remote_name, '--tags', **kwargs)
|
56
|
+
|
57
|
+
def cat_file_at_commit(self, file_path, commit_hash, remote_name=None,
|
58
|
+
**kwargs):
|
59
|
+
"""Outputs the contents of a file at a given revision."""
|
60
|
+
self.fetch_tags(remote_name=remote_name, **kwargs)
|
61
|
+
kwargs.setdefault('name', 'git cat-file %s:%s' % (commit_hash, file_path))
|
62
|
+
return self('cat-file', 'blob', '%s:%s' % (commit_hash, file_path),
|
63
|
+
**kwargs)
|
64
|
+
|
65
|
+
def count_objects(self, previous_result=None, can_fail_build=False, **kwargs):
|
66
|
+
"""Returns `git count-objects` result as a dict.
|
67
|
+
|
68
|
+
Args:
|
69
|
+
previous_result (dict): the result of previous count_objects call.
|
70
|
+
If passed, delta is reported in the log and step text.
|
71
|
+
can_fail_build (bool): if True, may fail the build and/or raise an
|
72
|
+
exception. Defaults to False.
|
73
|
+
|
74
|
+
Returns:
|
75
|
+
A dict of count-object values, or None if count-object run failed.
|
76
|
+
"""
|
77
|
+
if previous_result:
|
78
|
+
assert isinstance(previous_result, dict)
|
79
|
+
assert all(isinstance(v, long) for v in previous_result.itervalues())
|
80
|
+
assert 'size' in previous_result
|
81
|
+
assert 'size-pack' in previous_result
|
82
|
+
|
83
|
+
step_result = None
|
84
|
+
try:
|
85
|
+
step_result = self(
|
86
|
+
'count-objects', '-v', stdout=self.m.raw_io.output(),
|
87
|
+
can_fail_build=can_fail_build, **kwargs)
|
88
|
+
|
89
|
+
if not step_result.stdout:
|
90
|
+
return None
|
91
|
+
|
92
|
+
result = {}
|
93
|
+
for line in step_result.stdout.splitlines():
|
94
|
+
name, value = line.split(':', 1)
|
95
|
+
result[name] = long(value.strip())
|
96
|
+
|
97
|
+
def results_to_text(results):
|
98
|
+
return [' %s: %s' % (k, v) for k, v in results.iteritems()]
|
99
|
+
|
100
|
+
step_result.presentation.logs['result'] = results_to_text(result)
|
101
|
+
|
102
|
+
if previous_result:
|
103
|
+
delta = {
|
104
|
+
key: value - previous_result[key]
|
105
|
+
for key, value in result.iteritems()
|
106
|
+
if key in previous_result}
|
107
|
+
step_result.presentation.logs['delta'] = (
|
108
|
+
['before:'] + results_to_text(previous_result) +
|
109
|
+
['', 'after:'] + results_to_text(result) +
|
110
|
+
['', 'delta:'] + results_to_text(delta)
|
111
|
+
)
|
112
|
+
|
113
|
+
size_delta = (
|
114
|
+
result['size'] + result['size-pack']
|
115
|
+
- previous_result['size'] - previous_result['size-pack'])
|
116
|
+
# size_delta is in KiB.
|
117
|
+
step_result.presentation.step_text = (
|
118
|
+
'size delta: %+.2f MiB' % (size_delta / 1024.0))
|
119
|
+
|
120
|
+
return result
|
121
|
+
except Exception as ex:
|
122
|
+
if step_result:
|
123
|
+
step_result.presentation.logs['exception'] = ['%r' % ex]
|
124
|
+
step_result.presentation.status = self.m.step.WARNING
|
125
|
+
if can_fail_build:
|
126
|
+
raise recipe_api.InfraFailure('count-objects failed: %s' % ex)
|
127
|
+
return None
|
128
|
+
|
129
|
+
def checkout(self, url, ref=None, dir_path=None, recursive=False,
|
130
|
+
submodules=True, submodule_update_force=False,
|
131
|
+
keep_paths=None, step_suffix=None,
|
132
|
+
curl_trace_file=None, can_fail_build=True,
|
133
|
+
set_got_revision=False, remote_name=None,
|
134
|
+
display_fetch_size=None, file_name=None,
|
135
|
+
submodule_update_recursive=True):
|
136
|
+
"""Returns an iterable of steps to perform a full git checkout.
|
137
|
+
Args:
|
138
|
+
url (str): url of remote repo to use as upstream
|
139
|
+
ref (str): ref to fetch and check out
|
140
|
+
dir_path (Path): optional directory to clone into
|
141
|
+
recursive (bool): whether to recursively fetch submodules or not
|
142
|
+
submodules (bool): whether to sync and update submodules or not
|
143
|
+
submodule_update_force (bool): whether to update submodules with --force
|
144
|
+
keep_paths (iterable of strings): paths to ignore during git-clean;
|
145
|
+
paths are gitignore-style patterns relative to checkout_path.
|
146
|
+
step_suffix (str): suffix to add to a each step name
|
147
|
+
curl_trace_file (Path): if not None, dump GIT_CURL_VERBOSE=1 trace to that
|
148
|
+
file. Useful for debugging git issue reproducible only on bots. It has
|
149
|
+
a side effect of all stderr output of 'git fetch' going to that file.
|
150
|
+
can_fail_build (bool): if False, ignore errors during fetch or checkout.
|
151
|
+
set_got_revision (bool): if True, resolves HEAD and sets got_revision
|
152
|
+
property.
|
153
|
+
remote_name (str): name of the git remote to use
|
154
|
+
display_fetch_size (bool): if True, run `git count-objects` before and
|
155
|
+
after fetch and display delta. Adds two more steps. Defaults to False.
|
156
|
+
file_name (str): optional path to a single file to checkout.
|
157
|
+
submodule_update_recursive (bool): if True, updates submodules
|
158
|
+
recursively.
|
159
|
+
|
160
|
+
Returns: If the checkout was successful, this returns the commit hash of
|
161
|
+
the checked-out-repo. Otherwise this returns None.
|
162
|
+
"""
|
163
|
+
retVal = None
|
164
|
+
|
165
|
+
# TODO(robertocn): Break this function and refactor calls to it.
|
166
|
+
# The problem is that there are way too many unrealated use cases for
|
167
|
+
# it, and the function's signature is getting unwieldy and its body
|
168
|
+
# unreadable.
|
169
|
+
display_fetch_size = display_fetch_size or False
|
170
|
+
if not dir_path:
|
171
|
+
dir_path = url.rsplit('/', 1)[-1]
|
172
|
+
if dir_path.endswith('.git'): # ex: https://host/foobar.git
|
173
|
+
dir_path = dir_path[:-len('.git')]
|
174
|
+
|
175
|
+
# ex: ssh://host:repo/foobar/.git
|
176
|
+
dir_path = dir_path or dir_path.rsplit('/', 1)[-1]
|
177
|
+
|
178
|
+
dir_path = self.m.path['slave_build'].join(dir_path)
|
179
|
+
|
180
|
+
if 'checkout' not in self.m.path:
|
181
|
+
self.m.path['checkout'] = dir_path
|
182
|
+
|
183
|
+
git_setup_args = ['--path', dir_path, '--url', url]
|
184
|
+
|
185
|
+
if remote_name:
|
186
|
+
git_setup_args += ['--remote', remote_name]
|
187
|
+
else:
|
188
|
+
remote_name = 'origin'
|
189
|
+
|
190
|
+
if self.m.platform.is_win:
|
191
|
+
self.ensure_win_git_tooling()
|
192
|
+
git_setup_args += [
|
193
|
+
'--git_cmd_path', self.package_repo_resource('git.bat')]
|
194
|
+
|
195
|
+
step_suffix = '' if step_suffix is None else ' (%s)' % step_suffix
|
196
|
+
self.m.python(
|
197
|
+
'git setup%s' % step_suffix,
|
198
|
+
self.resource('git_setup.py'),
|
199
|
+
git_setup_args)
|
200
|
+
|
201
|
+
# There are five kinds of refs we can be handed:
|
202
|
+
# 0) None. In this case, we default to properties['branch'].
|
203
|
+
# 1) A 40-character SHA1 hash.
|
204
|
+
# 2) A fully-qualifed arbitrary ref, e.g. 'refs/foo/bar/baz'.
|
205
|
+
# 3) A fully qualified branch name, e.g. 'refs/heads/master'.
|
206
|
+
# Chop off 'refs/heads' and now it matches case (4).
|
207
|
+
# 4) A branch name, e.g. 'master'.
|
208
|
+
# Note that 'FETCH_HEAD' can be many things (and therefore not a valid
|
209
|
+
# checkout target) if many refs are fetched, but we only explicitly fetch
|
210
|
+
# one ref here, so this is safe.
|
211
|
+
fetch_args = []
|
212
|
+
if not ref: # Case 0
|
213
|
+
fetch_remote = remote_name
|
214
|
+
fetch_ref = self.m.properties.get('branch') or 'master'
|
215
|
+
checkout_ref = 'FETCH_HEAD'
|
216
|
+
elif self._GIT_HASH_RE.match(ref): # Case 1.
|
217
|
+
fetch_remote = remote_name
|
218
|
+
fetch_ref = ''
|
219
|
+
checkout_ref = ref
|
220
|
+
elif ref.startswith('refs/heads/'): # Case 3.
|
221
|
+
fetch_remote = remote_name
|
222
|
+
fetch_ref = ref[len('refs/heads/'):]
|
223
|
+
checkout_ref = 'FETCH_HEAD'
|
224
|
+
else: # Cases 2 and 4.
|
225
|
+
fetch_remote = remote_name
|
226
|
+
fetch_ref = ref
|
227
|
+
checkout_ref = 'FETCH_HEAD'
|
228
|
+
|
229
|
+
fetch_args = [x for x in (fetch_remote, fetch_ref) if x]
|
230
|
+
if recursive:
|
231
|
+
fetch_args.append('--recurse-submodules')
|
232
|
+
|
233
|
+
fetch_env = {}
|
234
|
+
fetch_stderr = None
|
235
|
+
if curl_trace_file:
|
236
|
+
fetch_env['GIT_CURL_VERBOSE'] = '1'
|
237
|
+
fetch_stderr = self.m.raw_io.output(leak_to=curl_trace_file)
|
238
|
+
|
239
|
+
fetch_step_name = 'git fetch%s' % step_suffix
|
240
|
+
if display_fetch_size:
|
241
|
+
count_objects_before_fetch = self.count_objects(
|
242
|
+
name='count-objects before %s' % fetch_step_name,
|
243
|
+
cwd=dir_path,
|
244
|
+
step_test_data=lambda: self.m.raw_io.test_api.stream_output(
|
245
|
+
self.test_api.count_objects_output(1000)))
|
246
|
+
self('retry', 'fetch', *fetch_args,
|
247
|
+
cwd=dir_path,
|
248
|
+
name=fetch_step_name,
|
249
|
+
env=fetch_env,
|
250
|
+
stderr=fetch_stderr,
|
251
|
+
can_fail_build=can_fail_build)
|
252
|
+
if display_fetch_size:
|
253
|
+
self.count_objects(
|
254
|
+
name='count-objects after %s' % fetch_step_name,
|
255
|
+
cwd=dir_path,
|
256
|
+
previous_result=count_objects_before_fetch,
|
257
|
+
step_test_data=lambda: self.m.raw_io.test_api.stream_output(
|
258
|
+
self.test_api.count_objects_output(2000)))
|
259
|
+
|
260
|
+
if file_name:
|
261
|
+
self('checkout', '-f', checkout_ref, '--', file_name,
|
262
|
+
cwd=dir_path,
|
263
|
+
name='git checkout%s' % step_suffix,
|
264
|
+
can_fail_build=can_fail_build)
|
265
|
+
|
266
|
+
else:
|
267
|
+
self('checkout', '-f', checkout_ref,
|
268
|
+
cwd=dir_path,
|
269
|
+
name='git checkout%s' % step_suffix,
|
270
|
+
can_fail_build=can_fail_build)
|
271
|
+
|
272
|
+
rev_parse_step = self('rev-parse', 'HEAD',
|
273
|
+
cwd=dir_path,
|
274
|
+
name='read revision',
|
275
|
+
stdout=self.m.raw_io.output(),
|
276
|
+
can_fail_build=False,
|
277
|
+
step_test_data=lambda:
|
278
|
+
self.m.raw_io.test_api.stream_output('deadbeef'))
|
279
|
+
|
280
|
+
if rev_parse_step.presentation.status == 'SUCCESS':
|
281
|
+
sha = rev_parse_step.stdout.strip()
|
282
|
+
retVal = sha
|
283
|
+
rev_parse_step.presentation.step_text = "<br/>checked out %r<br/>" % sha
|
284
|
+
if set_got_revision:
|
285
|
+
rev_parse_step.presentation.properties['got_revision'] = sha
|
286
|
+
|
287
|
+
clean_args = list(itertools.chain(
|
288
|
+
*[('-e', path) for path in keep_paths or []]))
|
289
|
+
|
290
|
+
self('clean', '-f', '-d', '-x', *clean_args,
|
291
|
+
name='git clean%s' % step_suffix,
|
292
|
+
cwd=dir_path,
|
293
|
+
can_fail_build=can_fail_build)
|
294
|
+
|
295
|
+
if submodules:
|
296
|
+
self('submodule', 'sync',
|
297
|
+
name='submodule sync%s' % step_suffix,
|
298
|
+
cwd=dir_path,
|
299
|
+
can_fail_build=can_fail_build)
|
300
|
+
submodule_update = ['submodule', 'update', '--init']
|
301
|
+
if submodule_update_recursive:
|
302
|
+
submodule_update.append('--recursive')
|
303
|
+
if submodule_update_force:
|
304
|
+
submodule_update.append('--force')
|
305
|
+
self(*submodule_update,
|
306
|
+
name='submodule update%s' % step_suffix,
|
307
|
+
cwd=dir_path,
|
308
|
+
can_fail_build=can_fail_build)
|
309
|
+
|
310
|
+
return retVal
|
311
|
+
|
312
|
+
def get_timestamp(self, commit='HEAD', test_data=None, **kwargs):
|
313
|
+
"""Find and return the timestamp of the given commit."""
|
314
|
+
step_test_data = None
|
315
|
+
if test_data is not None:
|
316
|
+
step_test_data = lambda: self.m.raw_io.test_api.stream_output(test_data)
|
317
|
+
return self('show', commit, '--format=%at', '-s',
|
318
|
+
stdout=self.m.raw_io.output(),
|
319
|
+
step_test_data=step_test_data).stdout.rstrip()
|
320
|
+
|
321
|
+
def rebase(self, name_prefix, branch, dir_path, remote_name=None,
|
322
|
+
**kwargs):
|
323
|
+
"""Run rebase HEAD onto branch
|
324
|
+
Args:
|
325
|
+
name_prefix (str): a prefix used for the step names
|
326
|
+
branch (str): a branch name or a hash to rebase onto
|
327
|
+
dir_path (Path): directory to clone into
|
328
|
+
remote_name (str): the remote name to rebase from if not origin
|
329
|
+
"""
|
330
|
+
remote_name = remote_name or 'origin'
|
331
|
+
try:
|
332
|
+
self('rebase', '%s/master' % remote_name,
|
333
|
+
name="%s rebase" % name_prefix, cwd=dir_path, **kwargs)
|
334
|
+
except self.m.step.StepFailure:
|
335
|
+
self('rebase', '--abort', name='%s rebase abort' % name_prefix,
|
336
|
+
cwd=dir_path, **kwargs)
|
337
|
+
raise
|
338
|
+
|
339
|
+
def config_get(self, prop_name, **kwargs):
|
340
|
+
"""Returns: (str) The Git config output, or None if no output was generated.
|
341
|
+
|
342
|
+
Args:
|
343
|
+
prop_name: (str) The name of the config property to query.
|
344
|
+
kwargs: Forwarded to '__call__'.
|
345
|
+
"""
|
346
|
+
kwargs['name'] = kwargs.get('name', 'git config %s' % (prop_name,))
|
347
|
+
result = self('config', '--get', prop_name, stdout=self.m.raw_io.output(),
|
348
|
+
**kwargs)
|
349
|
+
|
350
|
+
value = result.stdout
|
351
|
+
if value:
|
352
|
+
value = value.strip()
|
353
|
+
result.presentation.step_text = value
|
354
|
+
return value
|
355
|
+
|
356
|
+
def get_remote_url(self, remote_name=None, **kwargs):
|
357
|
+
"""Returns: (str) The URL of the remote Git repository, or None.
|
358
|
+
|
359
|
+
Args:
|
360
|
+
remote_name: (str) The name of the remote to query, defaults to 'origin'.
|
361
|
+
kwargs: Forwarded to '__call__'.
|
362
|
+
"""
|
363
|
+
remote_name = remote_name or 'origin'
|
364
|
+
return self.config_get('remote.%s.url' % (remote_name,), **kwargs)
|
365
|
+
|
366
|
+
def bundle_create(self, bundle_path, rev_list_args=None, **kwargs):
|
367
|
+
"""Run 'git bundle create' on a Git repository.
|
368
|
+
|
369
|
+
Args:
|
370
|
+
bundle_path (Path): The path of the output bundle.
|
371
|
+
refs (list): The list of refs to include in the bundle. If None, all
|
372
|
+
refs in the Git checkout will be bundled.
|
373
|
+
kwargs: Forwarded to '__call__'.
|
374
|
+
"""
|
375
|
+
if not rev_list_args:
|
376
|
+
rev_list_args = ['--all']
|
377
|
+
self('bundle', 'create', bundle_path, *rev_list_args, **kwargs)
|