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
@@ -25,7 +25,8 @@ class OwnersFinder(object):
|
|
25
25
|
def __init__(self, files, local_root, author,
|
26
26
|
fopen, os_path,
|
27
27
|
email_postfix='@chromium.org',
|
28
|
-
disable_color=False
|
28
|
+
disable_color=False,
|
29
|
+
override_files=None):
|
29
30
|
self.email_postfix = email_postfix
|
30
31
|
|
31
32
|
if os.name == 'nt' or disable_color:
|
@@ -35,6 +36,7 @@ class OwnersFinder(object):
|
|
35
36
|
self.COLOR_RESET = ''
|
36
37
|
|
37
38
|
self.db = owners_module.Database(local_root, fopen, os_path)
|
39
|
+
self.db.override_files = override_files or {}
|
38
40
|
self.db.load_data_needed_for(files)
|
39
41
|
|
40
42
|
self.os_path = os_path
|
@@ -52,6 +54,7 @@ class OwnersFinder(object):
|
|
52
54
|
files = filtered_files
|
53
55
|
# Reload the database.
|
54
56
|
self.db = owners_module.Database(local_root, fopen, os_path)
|
57
|
+
self.db.override_files = override_files or {}
|
55
58
|
self.db.load_data_needed_for(files)
|
56
59
|
|
57
60
|
self.all_possible_owners = self.db.all_possible_owners(files, None)
|
@@ -207,8 +210,17 @@ class OwnersFinder(object):
|
|
207
210
|
else:
|
208
211
|
self.writeln(self.bold_name(owner) + ' is commented as:')
|
209
212
|
self.indent()
|
213
|
+
if owners_module.GLOBAL_STATUS in self.comments[owner]:
|
214
|
+
self.writeln(
|
215
|
+
self.greyed(self.comments[owner][owners_module.GLOBAL_STATUS]) +
|
216
|
+
' (global status)')
|
217
|
+
if len(self.comments[owner]) == 1:
|
218
|
+
self.unindent()
|
219
|
+
return
|
210
220
|
for path in self.comments[owner]:
|
211
|
-
if
|
221
|
+
if path == owners_module.GLOBAL_STATUS:
|
222
|
+
continue
|
223
|
+
elif len(self.comments[owner][path]) > 0:
|
212
224
|
self.writeln(self.greyed(self.comments[owner][path]) +
|
213
225
|
' (at ' + self.bold(path or '<root>') + ')')
|
214
226
|
else:
|
@@ -39,39 +39,13 @@ BLACKLIST_LINT_FILTERS = [
|
|
39
39
|
|
40
40
|
### Description checks
|
41
41
|
|
42
|
-
def CheckChangeHasTestField(input_api, output_api):
|
43
|
-
"""Requires that the changelist have a TEST= field."""
|
44
|
-
if input_api.change.TEST:
|
45
|
-
return []
|
46
|
-
else:
|
47
|
-
return [output_api.PresubmitNotifyResult(
|
48
|
-
'If this change requires manual test instructions to QA team, add '
|
49
|
-
'TEST=[instructions].')]
|
50
|
-
|
51
|
-
|
52
42
|
def CheckChangeHasBugField(input_api, output_api):
|
53
|
-
"""Requires that the changelist have a
|
54
|
-
if input_api.change.
|
43
|
+
"""Requires that the changelist have a Bug: field."""
|
44
|
+
if input_api.change.BugsFromDescription():
|
55
45
|
return []
|
56
46
|
else:
|
57
47
|
return [output_api.PresubmitNotifyResult(
|
58
|
-
'If this change has an associated bug, add
|
59
|
-
|
60
|
-
|
61
|
-
def CheckChangeHasTestedField(input_api, output_api):
|
62
|
-
"""Requires that the changelist have a TESTED= field."""
|
63
|
-
if input_api.change.TESTED:
|
64
|
-
return []
|
65
|
-
else:
|
66
|
-
return [output_api.PresubmitError('Changelist must have a TESTED= field.')]
|
67
|
-
|
68
|
-
|
69
|
-
def CheckChangeHasQaField(input_api, output_api):
|
70
|
-
"""Requires that the changelist have a QA= field."""
|
71
|
-
if input_api.change.QA:
|
72
|
-
return []
|
73
|
-
else:
|
74
|
-
return [output_api.PresubmitError('Changelist must have a QA= field.')]
|
48
|
+
'If this change has an associated bug, add Bug: [bug number].')]
|
75
49
|
|
76
50
|
|
77
51
|
def CheckDoNotSubmitInDescription(input_api, output_api):
|
@@ -361,7 +335,7 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
|
|
361
335
|
CPP_FILE_EXTS = ('c', 'cc')
|
362
336
|
CPP_EXCEPTIONS = ('#define', '#endif', '#if', '#include', '#pragma')
|
363
337
|
HTML_FILE_EXTS = ('html',)
|
364
|
-
HTML_EXCEPTIONS = ('<link',)
|
338
|
+
HTML_EXCEPTIONS = ('<g ', '<link ', '<path ',)
|
365
339
|
JAVA_FILE_EXTS = ('java',)
|
366
340
|
JAVA_EXCEPTIONS = ('import ', 'package ')
|
367
341
|
JS_FILE_EXTS = ('js',)
|
@@ -383,7 +357,7 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
|
|
383
357
|
|
384
358
|
def no_long_lines(file_extension, line):
|
385
359
|
# Check for language specific exceptions.
|
386
|
-
if any(file_extension in exts and line.startswith(exceptions)
|
360
|
+
if any(file_extension in exts and line.lstrip().startswith(exceptions)
|
387
361
|
for exts, exceptions in LANGUAGE_EXCEPTIONS):
|
388
362
|
return True
|
389
363
|
|
@@ -525,7 +499,8 @@ def GetUnitTestsInDirectory(
|
|
525
499
|
continue
|
526
500
|
unit_tests.append(input_api.os_path.join(directory, filename))
|
527
501
|
to_run += 1
|
528
|
-
input_api.logging.debug('Found %d files, running %d
|
502
|
+
input_api.logging.debug('Found %d files, running %d unit tests'
|
503
|
+
% (found, to_run))
|
529
504
|
if not to_run:
|
530
505
|
return [
|
531
506
|
output_api.PresubmitPromptWarning(
|
@@ -675,6 +650,9 @@ def _FetchAllFiles(input_api, white_list, black_list):
|
|
675
650
|
# can break another unmodified file.
|
676
651
|
# Use code similar to InputApi.FilterSourceFile()
|
677
652
|
def Find(filepath, filters):
|
653
|
+
if input_api.platform == 'win32':
|
654
|
+
filepath = filepath.replace('\\', '/')
|
655
|
+
|
678
656
|
for item in filters:
|
679
657
|
if input_api.re.match(item, filepath):
|
680
658
|
return True
|
@@ -879,6 +857,7 @@ def CheckOwners(input_api, output_api, source_file_filter=None):
|
|
879
857
|
input_api.change.AffectedFiles(file_filter=source_file_filter)])
|
880
858
|
|
881
859
|
owners_db = input_api.owners_db
|
860
|
+
owners_db.override_files = input_api.change.OriginalOwnersFiles()
|
882
861
|
owner_email, reviewers = GetCodereviewOwnerAndReviewers(
|
883
862
|
input_api,
|
884
863
|
owners_db.email_regexp,
|
@@ -899,9 +878,20 @@ def CheckOwners(input_api, output_api, source_file_filter=None):
|
|
899
878
|
(needed, '\n '.join(sorted(missing_files))))]
|
900
879
|
if not input_api.is_committing:
|
901
880
|
suggested_owners = owners_db.reviewers_for(missing_files, owner_email)
|
881
|
+
finder = input_api.owners_finder(
|
882
|
+
missing_files, input_api.change.RepositoryRoot(),
|
883
|
+
owner_email, fopen=file, os_path=input_api.os_path,
|
884
|
+
email_postfix='', disable_color=True,
|
885
|
+
override_files=input_api.change.OriginalOwnersFiles())
|
886
|
+
owners_with_comments = []
|
887
|
+
def RecordComments(text):
|
888
|
+
owners_with_comments.append(finder.print_indent() + text)
|
889
|
+
finder.writeln = RecordComments
|
890
|
+
for owner in suggested_owners:
|
891
|
+
finder.print_comments(owner)
|
902
892
|
output_list.append(output_fn('Suggested OWNERS: ' +
|
903
893
|
'(Use "git-cl owners" to interactively select owners.)\n %s' %
|
904
|
-
('\n '.join(
|
894
|
+
('\n '.join(owners_with_comments))))
|
905
895
|
return output_list
|
906
896
|
|
907
897
|
if input_api.is_committing and not reviewers:
|
@@ -932,10 +922,8 @@ def _GetRietveldIssueProps(input_api, messages):
|
|
932
922
|
def _ReviewersFromChange(change):
|
933
923
|
"""Return the reviewers specified in the |change|, if any."""
|
934
924
|
reviewers = set()
|
935
|
-
|
936
|
-
|
937
|
-
if change.TBR:
|
938
|
-
reviewers.update(set([r.strip() for r in change.TBR.split(',')]))
|
925
|
+
reviewers.update(change.ReviewersFromDescription())
|
926
|
+
reviewers.update(change.TBRsFromDescription())
|
939
927
|
|
940
928
|
# Drop reviewers that aren't specified in email address format.
|
941
929
|
return set(reviewer for reviewer in reviewers if '@' in reviewer)
|
@@ -988,33 +976,6 @@ def _GerritOwnerAndReviewers(input_api, email_regexp, approval_needed=False):
|
|
988
976
|
return owner_email, reviewers
|
989
977
|
|
990
978
|
|
991
|
-
def _CheckConstNSObject(input_api, output_api, source_file_filter):
|
992
|
-
"""Checks to make sure no objective-c files have |const NSSomeClass*|."""
|
993
|
-
pattern = input_api.re.compile(
|
994
|
-
r'(?<!reinterpret_cast<)'
|
995
|
-
r'const\s+NS(?!(Point|Range|Rect|Size)\s*\*)\w*\s*\*')
|
996
|
-
|
997
|
-
def objective_c_filter(f):
|
998
|
-
return (source_file_filter(f) and
|
999
|
-
input_api.os_path.splitext(f.LocalPath())[1] in ('.h', '.m', '.mm'))
|
1000
|
-
|
1001
|
-
files = []
|
1002
|
-
for f in input_api.AffectedSourceFiles(objective_c_filter):
|
1003
|
-
contents = input_api.ReadFile(f)
|
1004
|
-
if pattern.search(contents):
|
1005
|
-
files.append(f)
|
1006
|
-
|
1007
|
-
if files:
|
1008
|
-
if input_api.is_committing:
|
1009
|
-
res_type = output_api.PresubmitPromptWarning
|
1010
|
-
else:
|
1011
|
-
res_type = output_api.PresubmitNotifyResult
|
1012
|
-
return [ res_type('|const NSClass*| is wrong, see ' +
|
1013
|
-
'http://dev.chromium.org/developers/clang-mac',
|
1014
|
-
files) ]
|
1015
|
-
return []
|
1016
|
-
|
1017
|
-
|
1018
979
|
def CheckSingletonInHeaders(input_api, output_api, source_file_filter=None):
|
1019
980
|
"""Deprecated, must be removed."""
|
1020
981
|
return [
|
@@ -1105,9 +1066,6 @@ def PanProjectChecks(input_api, output_api,
|
|
1105
1066
|
snapshot( "checking stray whitespace")
|
1106
1067
|
results.extend(input_api.canned_checks.CheckChangeHasNoStrayWhitespace(
|
1107
1068
|
input_api, output_api, source_file_filter=sources))
|
1108
|
-
snapshot("checking nsobjects")
|
1109
|
-
results.extend(_CheckConstNSObject(
|
1110
|
-
input_api, output_api, source_file_filter=sources))
|
1111
1069
|
snapshot("checking license")
|
1112
1070
|
results.extend(input_api.canned_checks.CheckLicense(
|
1113
1071
|
input_api, output_api, license_header, source_file_filter=sources))
|
@@ -43,8 +43,10 @@ from warnings import warn
|
|
43
43
|
import auth
|
44
44
|
import fix_encoding
|
45
45
|
import gclient_utils
|
46
|
+
import git_footers
|
46
47
|
import gerrit_util
|
47
48
|
import owners
|
49
|
+
import owners_finder
|
48
50
|
import presubmit_canned_checks
|
49
51
|
import rietveld
|
50
52
|
import scm
|
@@ -200,8 +202,7 @@ class GerritAccessor(object):
|
|
200
202
|
try:
|
201
203
|
return gerrit_util.GetChangeDetail(
|
202
204
|
self.host, str(issue),
|
203
|
-
['ALL_REVISIONS', 'DETAILED_LABELS', 'ALL_COMMITS']
|
204
|
-
ignore_404=False)
|
205
|
+
['ALL_REVISIONS', 'DETAILED_LABELS', 'ALL_COMMITS'])
|
205
206
|
except gerrit_util.GerritError as e:
|
206
207
|
if e.http_status == 404:
|
207
208
|
raise Exception('Either Gerrit issue %s doesn\'t exist, or '
|
@@ -286,21 +287,38 @@ class OutputApi(object):
|
|
286
287
|
CQ_INCLUDE_TRYBOTS was updated.
|
287
288
|
"""
|
288
289
|
description = cl.GetDescription(force=True)
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
if
|
293
|
-
|
294
|
-
|
290
|
+
include_re = re.compile(r'^CQ_INCLUDE_TRYBOTS=(.*)$', re.M | re.I)
|
291
|
+
|
292
|
+
prior_bots = []
|
293
|
+
if cl.IsGerrit():
|
294
|
+
trybot_footers = git_footers.parse_footers(description).get(
|
295
|
+
git_footers.normalize_name('Cq-Include-Trybots'), [])
|
296
|
+
for f in trybot_footers:
|
297
|
+
prior_bots += [b.strip() for b in f.split(';') if b.strip()]
|
298
|
+
else:
|
299
|
+
trybot_tags = include_re.finditer(description)
|
300
|
+
for t in trybot_tags:
|
301
|
+
prior_bots += [b.strip() for b in t.group(1).split(';') if b.strip()]
|
302
|
+
|
303
|
+
if set(prior_bots) >= set(bots_to_include):
|
295
304
|
return []
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
305
|
+
all_bots = ';'.join(sorted(set(prior_bots) | set(bots_to_include)))
|
306
|
+
|
307
|
+
if cl.IsGerrit():
|
308
|
+
description = git_footers.remove_footer(
|
309
|
+
description, 'Cq-Include-Trybots')
|
310
|
+
description = git_footers.add_footer(
|
311
|
+
description, 'Cq-Include-Trybots', all_bots,
|
312
|
+
before_keys=['Change-Id'])
|
301
313
|
else:
|
302
|
-
|
303
|
-
|
314
|
+
new_include_trybots = 'CQ_INCLUDE_TRYBOTS=%s' % all_bots
|
315
|
+
m = include_re.search(description)
|
316
|
+
if m:
|
317
|
+
description = include_re.sub(new_include_trybots, description)
|
318
|
+
else:
|
319
|
+
description = '%s\n%s\n' % (description, new_include_trybots)
|
320
|
+
|
321
|
+
cl.UpdateDescription(description, force=True)
|
304
322
|
return [self.PresubmitNotifyResult(message)]
|
305
323
|
|
306
324
|
|
@@ -418,10 +436,12 @@ class InputApi(object):
|
|
418
436
|
# We carry the canned checks so presubmit scripts can easily use them.
|
419
437
|
self.canned_checks = presubmit_canned_checks
|
420
438
|
|
439
|
+
|
421
440
|
# TODO(dpranke): figure out a list of all approved owners for a repo
|
422
441
|
# in order to be able to handle wildcard OWNERS files?
|
423
442
|
self.owners_db = owners.Database(change.RepositoryRoot(),
|
424
|
-
|
443
|
+
fopen=file, os_path=self.os_path)
|
444
|
+
self.owners_finder = owners_finder.OwnersFinder
|
425
445
|
self.verbose = verbose
|
426
446
|
self.Command = CommandData
|
427
447
|
|
@@ -548,7 +568,7 @@ class InputApi(object):
|
|
548
568
|
@property
|
549
569
|
def tbr(self):
|
550
570
|
"""Returns if a change is TBR'ed."""
|
551
|
-
return 'TBR' in self.change.tags
|
571
|
+
return 'TBR' in self.change.tags or self.change.TBRsFromDescription()
|
552
572
|
|
553
573
|
def RunTests(self, tests_mix, parallel=True):
|
554
574
|
tests = []
|
@@ -663,8 +683,6 @@ class AffectedFile(object):
|
|
663
683
|
|
664
684
|
def Action(self):
|
665
685
|
"""Returns the action on this opened file, e.g. A, M, D, etc."""
|
666
|
-
# TODO(maruel): Somewhat crappy, Could be "A" or "A +" for svn but
|
667
|
-
# different for other SCM.
|
668
686
|
return self._action
|
669
687
|
|
670
688
|
def IsTestableFile(self):
|
@@ -855,6 +873,37 @@ class Change(object):
|
|
855
873
|
raise AttributeError(self, attr)
|
856
874
|
return self.tags.get(attr)
|
857
875
|
|
876
|
+
def BugsFromDescription(self):
|
877
|
+
"""Returns all bugs referenced in the commit description."""
|
878
|
+
tags = [b.strip() for b in self.tags.get('BUG', '').split(',') if b.strip()]
|
879
|
+
footers = git_footers.parse_footers(self._full_description).get('Bug', [])
|
880
|
+
return sorted(set(tags + footers))
|
881
|
+
|
882
|
+
def ReviewersFromDescription(self):
|
883
|
+
"""Returns all reviewers listed in the commit description."""
|
884
|
+
# We don't support a "R:" git-footer for reviewers; that is in metadata.
|
885
|
+
tags = [r.strip() for r in self.tags.get('R', '').split(',') if r.strip()]
|
886
|
+
return sorted(set(tags))
|
887
|
+
|
888
|
+
def TBRsFromDescription(self):
|
889
|
+
"""Returns all TBR reviewers listed in the commit description."""
|
890
|
+
tags = [r.strip() for r in self.tags.get('TBR', '').split(',') if r.strip()]
|
891
|
+
# TODO(agable): Remove support for 'Tbr:' when TBRs are programmatically
|
892
|
+
# determined by self-CR+1s.
|
893
|
+
footers = git_footers.parse_footers(self._full_description).get('Tbr', [])
|
894
|
+
return sorted(set(tags + footers))
|
895
|
+
|
896
|
+
# TODO(agable): Delete these once we're sure they're unused.
|
897
|
+
@property
|
898
|
+
def BUG(self):
|
899
|
+
return ','.join(self.BugsFromDescription())
|
900
|
+
@property
|
901
|
+
def R(self):
|
902
|
+
return ','.join(self.ReviewersFromDescription())
|
903
|
+
@property
|
904
|
+
def TBR(self):
|
905
|
+
return ','.join(self.TBRsFromDescription())
|
906
|
+
|
858
907
|
def AllFiles(self, root=None):
|
859
908
|
"""List all files under source control in the repo."""
|
860
909
|
raise NotImplementedError()
|
@@ -873,8 +922,7 @@ class Change(object):
|
|
873
922
|
|
874
923
|
if include_deletes:
|
875
924
|
return affected
|
876
|
-
|
877
|
-
return filter(lambda x: x.Action() != 'D', affected)
|
925
|
+
return filter(lambda x: x.Action() != 'D', affected)
|
878
926
|
|
879
927
|
def AffectedTestableFiles(self, include_deletes=None):
|
880
928
|
"""Return a list of the existing text files in a change."""
|
@@ -916,6 +964,13 @@ class Change(object):
|
|
916
964
|
x for x in self.AffectedFiles(include_deletes=False)
|
917
965
|
if x.IsTestableFile())
|
918
966
|
|
967
|
+
def OriginalOwnersFiles(self):
|
968
|
+
"""A map from path names of affected OWNERS files to their old content."""
|
969
|
+
def owners_file_filter(f):
|
970
|
+
return 'OWNERS' in os.path.split(f.LocalPath())[1]
|
971
|
+
files = self.AffectedFiles(file_filter=owners_file_filter)
|
972
|
+
return dict([(f.LocalPath(), f.OldContents()) for f in files])
|
973
|
+
|
919
974
|
|
920
975
|
class GitChange(Change):
|
921
976
|
_AFFECTED_FILES = GitAffectedFile
|
@@ -1342,17 +1397,17 @@ def DoPresubmitChecks(change,
|
|
1342
1397
|
def ScanSubDirs(mask, recursive):
|
1343
1398
|
if not recursive:
|
1344
1399
|
return [x for x in glob.glob(mask) if x not in ('.svn', '.git')]
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1400
|
+
|
1401
|
+
results = []
|
1402
|
+
for root, dirs, files in os.walk('.'):
|
1403
|
+
if '.svn' in dirs:
|
1404
|
+
dirs.remove('.svn')
|
1405
|
+
if '.git' in dirs:
|
1406
|
+
dirs.remove('.git')
|
1407
|
+
for name in files:
|
1408
|
+
if fnmatch.fnmatch(name, mask):
|
1409
|
+
results.append(os.path.join(root, name))
|
1410
|
+
return results
|
1356
1411
|
|
1357
1412
|
|
1358
1413
|
def ParseFiles(args, recursive):
|
@@ -1467,9 +1522,6 @@ def main(argv=None):
|
|
1467
1522
|
parser.add_option("--rietveld_email_file", help=optparse.SUPPRESS_HELP)
|
1468
1523
|
parser.add_option("--rietveld_private_key_file", help=optparse.SUPPRESS_HELP)
|
1469
1524
|
|
1470
|
-
# TODO(phajdan.jr): Update callers and remove obsolete --trybot-json .
|
1471
|
-
parser.add_option("--trybot-json",
|
1472
|
-
help="Output trybot information to the file specified.")
|
1473
1525
|
auth.add_auth_options(parser)
|
1474
1526
|
options, args = parser.parse_args(argv)
|
1475
1527
|
auth_config = auth.extract_auth_config_from_options(options)
|
@@ -0,0 +1,842 @@
|
|
1
|
+
<!--- AUTOGENERATED BY `./recipes.py test train` -->
|
2
|
+
# Package documentation for [depot\_tools](https://chromium.googlesource.com/chromium/tools/depot_tools.git)
|
3
|
+
## Table of Contents
|
4
|
+
|
5
|
+
**[Recipe Modules](#Recipe-Modules)**
|
6
|
+
* [bot_update](#recipe_modules-bot_update) — Recipe module to ensure a checkout is consistent on a bot.
|
7
|
+
* [cipd](#recipe_modules-cipd)
|
8
|
+
* [depot_tools](#recipe_modules-depot_tools)
|
9
|
+
* [gclient](#recipe_modules-gclient)
|
10
|
+
* [gerrit](#recipe_modules-gerrit)
|
11
|
+
* [git](#recipe_modules-git)
|
12
|
+
* [git_cl](#recipe_modules-git_cl)
|
13
|
+
* [gitiles](#recipe_modules-gitiles)
|
14
|
+
* [gsutil](#recipe_modules-gsutil)
|
15
|
+
* [infra_paths](#recipe_modules-infra_paths)
|
16
|
+
* [presubmit](#recipe_modules-presubmit)
|
17
|
+
* [rietveld](#recipe_modules-rietveld)
|
18
|
+
* [tryserver](#recipe_modules-tryserver)
|
19
|
+
|
20
|
+
**[Recipes](#Recipes)**
|
21
|
+
* [bot_update:examples/full](#recipes-bot_update_examples_full)
|
22
|
+
* [cipd:examples/full](#recipes-cipd_examples_full)
|
23
|
+
* [cipd:examples/platform_suffix](#recipes-cipd_examples_platform_suffix)
|
24
|
+
* [depot_tools:examples/full](#recipes-depot_tools_examples_full)
|
25
|
+
* [gclient:examples/full](#recipes-gclient_examples_full)
|
26
|
+
* [gclient:tests/patch_project](#recipes-gclient_tests_patch_project)
|
27
|
+
* [gerrit:examples/full](#recipes-gerrit_examples_full)
|
28
|
+
* [git:examples/full](#recipes-git_examples_full)
|
29
|
+
* [git_cl:examples/full](#recipes-git_cl_examples_full)
|
30
|
+
* [gitiles:examples/full](#recipes-gitiles_examples_full)
|
31
|
+
* [gsutil:examples/full](#recipes-gsutil_examples_full)
|
32
|
+
* [infra_paths:examples/full](#recipes-infra_paths_examples_full)
|
33
|
+
* [presubmit:examples/full](#recipes-presubmit_examples_full)
|
34
|
+
* [rietveld:examples/full](#recipes-rietveld_examples_full)
|
35
|
+
* [tryserver:examples/full](#recipes-tryserver_examples_full)
|
36
|
+
## Recipe Modules
|
37
|
+
|
38
|
+
### *recipe_modules* / [bot\_update](/recipes/recipe_modules/bot_update)
|
39
|
+
|
40
|
+
[DEPS](/recipes/recipe_modules/bot_update/__init__.py#1): [depot\_tools](#recipe_modules-depot_tools), [gclient](#recipe_modules-gclient), [gerrit](#recipe_modules-gerrit), [rietveld](#recipe_modules-rietveld), [tryserver](#recipe_modules-tryserver), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
41
|
+
|
42
|
+
Recipe module to ensure a checkout is consistent on a bot.
|
43
|
+
|
44
|
+
#### **class [BotUpdateApi](/recipes/recipe_modules/bot_update/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
45
|
+
|
46
|
+
— **def [\_\_call\_\_](/recipes/recipe_modules/bot_update/api.py#31)(self, name, cmd, \*\*kwargs):**
|
47
|
+
|
48
|
+
Wrapper for easy calling of bot_update.
|
49
|
+
|
50
|
+
— **def [\_\_init\_\_](/recipes/recipe_modules/bot_update/api.py#13)(self, issue, patch_issue, patchset, patch_set, patch_project, repository, patch_repository_url, gerrit_ref, patch_ref, patch_gerrit_url, rietveld, revision, parent_got_revision, deps_revision_overrides, fail_patch, \*args, \*\*kwargs):**
|
51
|
+
|
52
|
+
— **def [apply\_gerrit\_ref](/recipes/recipe_modules/bot_update/api.py#49)(self, root, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, \*\*kwargs):**
|
53
|
+
|
54
|
+
— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#427)(self, bot_update_step):**
|
55
|
+
|
56
|
+
Deapplies a patch, taking care of DEPS and solution revisions properly.
|
57
|
+
|
58
|
+
|
59
|
+
— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#69)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, no_shallow=False, with_branch_heads=False, with_tags=False, refs=None, patch_oauth2=False, oauth2_json=False, use_site_config_creds=True, clobber=False, root_solution_revision=None, rietveld=None, issue=None, patchset=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, disable_syntax_validation=False, \*\*kwargs):**
|
60
|
+
|
61
|
+
Args:
|
62
|
+
use_site_config_creds: If the oauth2 credentials are in the buildbot
|
63
|
+
site_config. See crbug.com/624212 for more information.
|
64
|
+
gclient_config: The gclient configuration to use when running bot_update.
|
65
|
+
If omitted, the current gclient configuration is used.
|
66
|
+
rietveld: The rietveld server to use. If omitted, will infer from
|
67
|
+
the 'rietveld' property.
|
68
|
+
issue: The rietveld issue number to use. If omitted, will infer from
|
69
|
+
the 'issue' property.
|
70
|
+
patchset: The rietveld issue patchset to use. If omitted, will infer from
|
71
|
+
the 'patchset' property.
|
72
|
+
disable_syntax_validation: (legacy) Disables syntax validation for DEPS.
|
73
|
+
Needed as migration paths for recipes dealing with older revisions,
|
74
|
+
such as bisect.
|
75
|
+
|
76
|
+
— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#404)(self, project_name, gclient_config=None):**
|
77
|
+
|
78
|
+
Returns all property names used for storing the checked-out revision of
|
79
|
+
a given project.
|
80
|
+
|
81
|
+
Args:
|
82
|
+
project_name (str): The name of a checked-out project as deps path, e.g.
|
83
|
+
src or src/v8.
|
84
|
+
gclient_config: The gclient configuration to use. If omitted, the current
|
85
|
+
gclient configuration is used.
|
86
|
+
|
87
|
+
Returns (list of str): All properties that'll hold the checked-out revision
|
88
|
+
of the given project. An empty list if no such properties exist.
|
89
|
+
|
90
|
+
  **@property**<br>— **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#43)(self):**
|
91
|
+
### *recipe_modules* / [cipd](/recipes/recipe_modules/cipd)
|
92
|
+
|
93
|
+
[DEPS](/recipes/recipe_modules/cipd/__init__.py#1): [infra\_paths](#recipe_modules-infra_paths), [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
94
|
+
|
95
|
+
#### **class [CIPDApi](/recipes/recipe_modules/cipd/api.py#148)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
96
|
+
|
97
|
+
CIPDApi provides basic support for CIPD.
|
98
|
+
|
99
|
+
This assumes that `cipd` (or `cipd.exe` or `cipd.bat` on windows) has been
|
100
|
+
installed somewhere in $PATH. This will be true if you use depot_tools, or if
|
101
|
+
your recipe is running inside of chrome-infrastructure's systems (buildbot,
|
102
|
+
swarming).
|
103
|
+
|
104
|
+
— **def [build](/recipes/recipe_modules/cipd/api.py#221)(self, input_dir, output_package, package_name, install_mode=None):**
|
105
|
+
|
106
|
+
Builds, but does not upload, a cipd package from a directory.
|
107
|
+
|
108
|
+
Args:
|
109
|
+
input_dir (Path) - the directory to build the package from.
|
110
|
+
output_package (Path) - the file to write the package to.
|
111
|
+
package_name (str) - the name of the cipd package as it would appear when
|
112
|
+
uploaded to the cipd package server.
|
113
|
+
install_mode (None|'copy'|'symlink') - the mechanism that the cipd client
|
114
|
+
should use when installing this package. If None, defaults to the
|
115
|
+
platform default ('copy' on windows, 'symlink' on everything else).
|
116
|
+
|
117
|
+
— **def [create\_from\_pkg](/recipes/recipe_modules/cipd/api.py#317)(self, pkg_def, refs=None, tags=None):**
|
118
|
+
|
119
|
+
Builds and uploads a package based on a PackageDefinition object.
|
120
|
+
|
121
|
+
This builds and uploads the package in one step.
|
122
|
+
|
123
|
+
Args:
|
124
|
+
pkg_def (PackageDefinition) - The description of the package we want to
|
125
|
+
create.
|
126
|
+
refs (list(str)) - A list of ref names to set for the package instance.
|
127
|
+
tags (dict(str, str)) - A map of tag name -> value to set for the package
|
128
|
+
instance.
|
129
|
+
|
130
|
+
Returns the JSON 'result' section, e.g.: {
|
131
|
+
"package": "infra/tools/cipd/android-amd64",
|
132
|
+
"instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4"
|
133
|
+
}
|
134
|
+
|
135
|
+
— **def [create\_from\_yaml](/recipes/recipe_modules/cipd/api.py#297)(self, pkg_def, refs=None, tags=None):**
|
136
|
+
|
137
|
+
Builds and uploads a package based on on-disk YAML package definition
|
138
|
+
file.
|
139
|
+
|
140
|
+
This builds and uploads the package in one step.
|
141
|
+
|
142
|
+
Args:
|
143
|
+
pkg_def (Path) - The path to the yaml file.
|
144
|
+
refs (list(str)) - A list of ref names to set for the package instance.
|
145
|
+
tags (dict(str, str)) - A map of tag name -> value to set for the package
|
146
|
+
instance.
|
147
|
+
|
148
|
+
Returns the JSON 'result' section, e.g.: {
|
149
|
+
"package": "infra/tools/cipd/android-amd64",
|
150
|
+
"instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4"
|
151
|
+
}
|
152
|
+
|
153
|
+
  **@property**<br>— **def [default\_bot\_service\_account\_credentials](/recipes/recipe_modules/cipd/api.py#185)(self):**
|
154
|
+
|
155
|
+
— **def [describe](/recipes/recipe_modules/cipd/api.py#424)(self, package_name, version, test_data_refs=None, test_data_tags=None):**
|
156
|
+
|
157
|
+
— **def [ensure](/recipes/recipe_modules/cipd/api.py#339)(self, root, packages):**
|
158
|
+
|
159
|
+
Ensures that packages are installed in a given root dir.
|
160
|
+
|
161
|
+
packages must be a mapping from package name to its version, where
|
162
|
+
* name must be for right platform (see also ``platform_suffix``),
|
163
|
+
* version could be either instance_id, or ref, or unique tag.
|
164
|
+
|
165
|
+
If installing a package requires credentials, call
|
166
|
+
``set_service_account_credentials`` before calling this function.
|
167
|
+
|
168
|
+
  **@property**<br>— **def [executable](/recipes/recipe_modules/cipd/api.py#181)(self):**
|
169
|
+
|
170
|
+
— **def [initialize](/recipes/recipe_modules/cipd/api.py#175)(self):**
|
171
|
+
|
172
|
+
— **def [platform\_suffix](/recipes/recipe_modules/cipd/api.py#194)(self, name=None, arch=None, bits=None):**
|
173
|
+
|
174
|
+
Use to get full package name that is platform indepdent.
|
175
|
+
|
176
|
+
Example:
|
177
|
+
>>> 'my/package/%s' % api.cipd.platform_suffix()
|
178
|
+
'my/package/linux-amd64'
|
179
|
+
|
180
|
+
Optional platform bits and architecture may be supplied to generate CIPD
|
181
|
+
suffixes for other platforms. If any are omitted, the current platform
|
182
|
+
parameters will be used.
|
183
|
+
|
184
|
+
— **def [register](/recipes/recipe_modules/cipd/api.py#249)(self, package_name, package_path, refs=None, tags=None):**
|
185
|
+
|
186
|
+
— **def [search](/recipes/recipe_modules/cipd/api.py#406)(self, package_name, tag):**
|
187
|
+
|
188
|
+
— **def [set\_ref](/recipes/recipe_modules/cipd/api.py#386)(self, package_name, version, refs):**
|
189
|
+
|
190
|
+
— **def [set\_service\_account\_credentials](/recipes/recipe_modules/cipd/api.py#178)(self, path):**
|
191
|
+
|
192
|
+
— **def [set\_tag](/recipes/recipe_modules/cipd/api.py#366)(self, package_name, version, tags):**
|
193
|
+
### *recipe_modules* / [depot\_tools](/recipes/recipe_modules/depot_tools)
|
194
|
+
|
195
|
+
[DEPS](/recipes/recipe_modules/depot_tools/__init__.py#1): [recipe\_engine/platform][recipe_engine/recipe_modules/platform]
|
196
|
+
|
197
|
+
#### **class [DepotToolsApi](/recipes/recipe_modules/depot_tools/api.py#7)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
198
|
+
|
199
|
+
  **@property**<br>— **def [cros\_path](/recipes/recipe_modules/depot_tools/api.py#21)(self):**
|
200
|
+
|
201
|
+
  **@property**<br>— **def [download\_from\_google\_storage\_path](/recipes/recipe_modules/depot_tools/api.py#8)(self):**
|
202
|
+
|
203
|
+
  **@property**<br>— **def [gn\_py\_path](/recipes/recipe_modules/depot_tools/api.py#25)(self):**
|
204
|
+
|
205
|
+
  **@property**<br>— **def [gsutil\_py\_path](/recipes/recipe_modules/depot_tools/api.py#31)(self):**
|
206
|
+
|
207
|
+
  **@property**<br>— **def [ninja\_path](/recipes/recipe_modules/depot_tools/api.py#35)(self):**
|
208
|
+
|
209
|
+
  **@property**<br>— **def [presubmit\_support\_py\_path](/recipes/recipe_modules/depot_tools/api.py#40)(self):**
|
210
|
+
|
211
|
+
  **@property**<br>— **def [root](/recipes/recipe_modules/depot_tools/api.py#16)(self):**
|
212
|
+
|
213
|
+
Returns (Path): The "depot_tools" root directory.
|
214
|
+
|
215
|
+
  **@property**<br>— **def [upload\_to\_google\_storage\_path](/recipes/recipe_modules/depot_tools/api.py#12)(self):**
|
216
|
+
### *recipe_modules* / [gclient](/recipes/recipe_modules/gclient)
|
217
|
+
|
218
|
+
[DEPS](/recipes/recipe_modules/gclient/__init__.py#1): [infra\_paths](#recipe_modules-infra_paths), [tryserver](#recipe_modules-tryserver), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
219
|
+
|
220
|
+
#### **class [GclientApi](/recipes/recipe_modules/gclient/api.py#65)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
221
|
+
|
222
|
+
— **def [\_\_call\_\_](/recipes/recipe_modules/gclient/api.py#75)(self, name, cmd, infra_step=True, \*\*kwargs):**
|
223
|
+
|
224
|
+
Wrapper for easy calling of gclient steps.
|
225
|
+
|
226
|
+
— **def [\_\_init\_\_](/recipes/recipe_modules/gclient/api.py#70)(self, \*\*kwargs):**
|
227
|
+
|
228
|
+
— **def [break\_locks](/recipes/recipe_modules/gclient/api.py#287)(self):**
|
229
|
+
|
230
|
+
Remove all index.lock files. If a previous run of git crashed, bot was
|
231
|
+
reset, etc... we might end up with leftover index.lock files.
|
232
|
+
|
233
|
+
— **def [calculate\_patch\_root](/recipes/recipe_modules/gclient/api.py#309)(self, patch_project, gclient_config=None):**
|
234
|
+
|
235
|
+
Returns path where a patch should be applied to based patch_project.
|
236
|
+
|
237
|
+
Maps "patch_project" to a path of directories relative to checkout's root,
|
238
|
+
which describe where to place the patch.
|
239
|
+
|
240
|
+
For now, considers only first solution (c.solutions[0]), but in theory can
|
241
|
+
be extended to all of them.
|
242
|
+
|
243
|
+
See patch_projects solution config property.
|
244
|
+
|
245
|
+
Returns:
|
246
|
+
Relative path, including solution's root.
|
247
|
+
If patch_project is not given or not recognized, it'll be just first
|
248
|
+
solution root.
|
249
|
+
|
250
|
+
— **def [checkout](/recipes/recipe_modules/gclient/api.py#233)(self, gclient_config=None, revert=RevertOnTryserver, inject_parent_got_revision=True, with_branch_heads=False, \*\*kwargs):**
|
251
|
+
|
252
|
+
Return a step generator function for gclient checkouts.
|
253
|
+
|
254
|
+
  **@staticmethod**<br>— **def [config\_to\_pythonish](/recipes/recipe_modules/gclient/api.py#125)(cfg):**
|
255
|
+
|
256
|
+
— **def [get\_config\_defaults](/recipes/recipe_modules/gclient/api.py#119)(self):**
|
257
|
+
|
258
|
+
  **@staticmethod**<br>— **def [got\_revision\_reverse\_mapping](/recipes/recipe_modules/gclient/api.py#130)(cfg):**
|
259
|
+
|
260
|
+
Returns the merged got_revision_reverse_mapping.
|
261
|
+
|
262
|
+
Returns (dict): A mapping from property name -> project name. It merges the
|
263
|
+
values of the deprecated got_revision_mapping and the new
|
264
|
+
got_revision_reverse_mapping.
|
265
|
+
|
266
|
+
— **def [inject\_parent\_got\_revision](/recipes/recipe_modules/gclient/api.py#208)(self, gclient_config=None, override=False):**
|
267
|
+
|
268
|
+
Match gclient config to build revisions obtained from build_properties.
|
269
|
+
|
270
|
+
Args:
|
271
|
+
gclient_config (gclient config object) - The config to manipulate. A value
|
272
|
+
of None manipulates the module's built-in config (self.c).
|
273
|
+
override (bool) - If True, will forcibly set revision and custom_vars
|
274
|
+
even if the config already contains values for them.
|
275
|
+
|
276
|
+
  **@property**<br>— **def [is\_blink\_mode](/recipes/recipe_modules/gclient/api.py#274)(self):**
|
277
|
+
|
278
|
+
Indicates wether the caller is to use the Blink config rather than the
|
279
|
+
Chromium config. This may happen for one of two reasons:
|
280
|
+
1. The builder is configured to always use TOT Blink. (factory property
|
281
|
+
top_of_tree_blink=True)
|
282
|
+
2. A try job comes in that applies to the Blink tree. (patch_project is
|
283
|
+
blink)
|
284
|
+
|
285
|
+
— **def [resolve\_revision](/recipes/recipe_modules/gclient/api.py#147)(self, revision):**
|
286
|
+
|
287
|
+
— **def [runhooks](/recipes/recipe_modules/gclient/api.py#268)(self, args=None, name='runhooks', \*\*kwargs):**
|
288
|
+
|
289
|
+
— **def [set\_patch\_project\_revision](/recipes/recipe_modules/gclient/api.py#336)(self, patch_project, gclient_config=None):**
|
290
|
+
|
291
|
+
Updates config revision corresponding to patch_project.
|
292
|
+
|
293
|
+
Useful for bot_update only, as this is the only consumer of gclient's config
|
294
|
+
revision map. This doesn't overwrite the revision if it was already set.
|
295
|
+
|
296
|
+
  **@spec_alias.deleter**<br>— **def [spec\_alias](/recipes/recipe_modules/gclient/api.py#115)(self):**
|
297
|
+
|
298
|
+
— **def [sync](/recipes/recipe_modules/gclient/api.py#152)(self, cfg, with_branch_heads=False, \*\*kwargs):**
|
299
|
+
|
300
|
+
  **@use_mirror.setter**<br>— **def [use\_mirror](/recipes/recipe_modules/gclient/api.py#102)(self, val):**
|
301
|
+
### *recipe_modules* / [gerrit](/recipes/recipe_modules/gerrit)
|
302
|
+
|
303
|
+
[DEPS](/recipes/recipe_modules/gerrit/__init__.py#1): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
304
|
+
|
305
|
+
#### **class [GerritApi](/recipes/recipe_modules/gerrit/api.py#7)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
306
|
+
|
307
|
+
Module for interact with gerrit endpoints
|
308
|
+
|
309
|
+
— **def [\_\_call\_\_](/recipes/recipe_modules/gerrit/api.py#10)(self, name, cmd, infra_step=True, \*\*kwargs):**
|
310
|
+
|
311
|
+
Wrapper for easy calling of gerrit_utils steps.
|
312
|
+
|
313
|
+
— **def [create\_gerrit\_branch](/recipes/recipe_modules/gerrit/api.py#27)(self, host, project, branch, commit, \*\*kwargs):**
|
314
|
+
|
315
|
+
Create a new branch from given project and commit
|
316
|
+
|
317
|
+
Returns:
|
318
|
+
the ref of the branch created
|
319
|
+
|
320
|
+
— **def [get\_change\_description](/recipes/recipe_modules/gerrit/api.py#93)(self, host, change, patchset):**
|
321
|
+
|
322
|
+
Get the description for a given CL and patchset.
|
323
|
+
|
324
|
+
Args:
|
325
|
+
host: Gerrit host to query.
|
326
|
+
change: The change number.
|
327
|
+
patchset: The patchset number.
|
328
|
+
|
329
|
+
Returns:
|
330
|
+
The description corresponding to given CL and patchset.
|
331
|
+
|
332
|
+
— **def [get\_change\_destination\_branch](/recipes/recipe_modules/gerrit/api.py#68)(self, host, change, \*\*kwargs):**
|
333
|
+
|
334
|
+
Get the upstream branch for a given CL.
|
335
|
+
|
336
|
+
Args:
|
337
|
+
host: Gerrit host to query.
|
338
|
+
change: The change number.
|
339
|
+
|
340
|
+
Returns:
|
341
|
+
the name of the branch
|
342
|
+
|
343
|
+
— **def [get\_changes](/recipes/recipe_modules/gerrit/api.py#122)(self, host, query_params, start=None, limit=None, o_params=None, \*\*kwargs):**
|
344
|
+
|
345
|
+
Query changes for the given host.
|
346
|
+
|
347
|
+
Args:
|
348
|
+
host: Gerrit host to query.
|
349
|
+
query_params: Query parameters as list of (key, value) tuples to form a
|
350
|
+
query as documented here:
|
351
|
+
https://gerrit-review.googlesource.com/Documentation/user-search.html#search-operators
|
352
|
+
start: How many changes to skip (starting with the most recent).
|
353
|
+
limit: Maximum number of results to return.
|
354
|
+
o_params: A list of additional output specifiers, as documented here:
|
355
|
+
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
|
356
|
+
Returns:
|
357
|
+
A list of change dicts as documented here:
|
358
|
+
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
|
359
|
+
|
360
|
+
— **def [get\_gerrit\_branch](/recipes/recipe_modules/gerrit/api.py#49)(self, host, project, branch, \*\*kwargs):**
|
361
|
+
|
362
|
+
Get a branch from given project and commit
|
363
|
+
|
364
|
+
Returns:
|
365
|
+
the revision of the branch
|
366
|
+
### *recipe_modules* / [git](/recipes/recipe_modules/git)
|
367
|
+
|
368
|
+
[DEPS](/recipes/recipe_modules/git/__init__.py#1): [infra\_paths](#recipe_modules-infra_paths), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
369
|
+
|
370
|
+
#### **class [GitApi](/recipes/recipe_modules/git/api.py#10)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
371
|
+
|
372
|
+
— **def [\_\_call\_\_](/recipes/recipe_modules/git/api.py#13)(self, \*args, \*\*kwargs):**
|
373
|
+
|
374
|
+
Return a git command step.
|
375
|
+
|
376
|
+
— **def [bundle\_create](/recipes/recipe_modules/git/api.py#366)(self, bundle_path, rev_list_args=None, \*\*kwargs):**
|
377
|
+
|
378
|
+
Run 'git bundle create' on a Git repository.
|
379
|
+
|
380
|
+
Args:
|
381
|
+
bundle_path (Path): The path of the output bundle.
|
382
|
+
refs (list): The list of refs to include in the bundle. If None, all
|
383
|
+
refs in the Git checkout will be bundled.
|
384
|
+
kwargs: Forwarded to '__call__'.
|
385
|
+
|
386
|
+
— **def [cat\_file\_at\_commit](/recipes/recipe_modules/git/api.py#38)(self, file_path, commit_hash, remote_name=None, \*\*kwargs):**
|
387
|
+
|
388
|
+
Outputs the contents of a file at a given revision.
|
389
|
+
|
390
|
+
— **def [checkout](/recipes/recipe_modules/git/api.py#110)(self, url, ref=None, dir_path=None, recursive=False, submodules=True, submodule_update_force=False, keep_paths=None, step_suffix=None, curl_trace_file=None, can_fail_build=True, set_got_revision=False, remote_name=None, display_fetch_size=None, file_name=None, submodule_update_recursive=True, use_git_cache=False):**
|
391
|
+
|
392
|
+
Performs a full git checkout and returns sha1 of checked out revision.
|
393
|
+
|
394
|
+
Args:
|
395
|
+
url (str): url of remote repo to use as upstream
|
396
|
+
ref (str): ref to fetch and check out
|
397
|
+
dir_path (Path): optional directory to clone into
|
398
|
+
recursive (bool): whether to recursively fetch submodules or not
|
399
|
+
submodules (bool): whether to sync and update submodules or not
|
400
|
+
submodule_update_force (bool): whether to update submodules with --force
|
401
|
+
keep_paths (iterable of strings): paths to ignore during git-clean;
|
402
|
+
paths are gitignore-style patterns relative to checkout_path.
|
403
|
+
step_suffix (str): suffix to add to a each step name
|
404
|
+
curl_trace_file (Path): if not None, dump GIT_CURL_VERBOSE=1 trace to that
|
405
|
+
file. Useful for debugging git issue reproducible only on bots. It has
|
406
|
+
a side effect of all stderr output of 'git fetch' going to that file.
|
407
|
+
can_fail_build (bool): if False, ignore errors during fetch or checkout.
|
408
|
+
set_got_revision (bool): if True, resolves HEAD and sets got_revision
|
409
|
+
property.
|
410
|
+
remote_name (str): name of the git remote to use
|
411
|
+
display_fetch_size (bool): if True, run `git count-objects` before and
|
412
|
+
after fetch and display delta. Adds two more steps. Defaults to False.
|
413
|
+
file_name (str): optional path to a single file to checkout.
|
414
|
+
submodule_update_recursive (bool): if True, updates submodules
|
415
|
+
recursively.
|
416
|
+
use_git_cache (bool): if True, git cache will be used for this checkout.
|
417
|
+
WARNING, this is EXPERIMENTAL!!! This wasn't tested with:
|
418
|
+
* submodules
|
419
|
+
* since origin url is modified
|
420
|
+
to a local path, may cause problem with scripts that do
|
421
|
+
"git fetch origin" or "git push origin".
|
422
|
+
* arbitrary refs such refs/whatever/not-fetched-by-default-to-cache
|
423
|
+
|
424
|
+
Returns: If the checkout was successful, this returns the commit hash of
|
425
|
+
the checked-out-repo. Otherwise this returns None.
|
426
|
+
|
427
|
+
— **def [config\_get](/recipes/recipe_modules/git/api.py#339)(self, prop_name, \*\*kwargs):**
|
428
|
+
|
429
|
+
Returns: (str) The Git config output, or None if no output was generated.
|
430
|
+
|
431
|
+
Args:
|
432
|
+
prop_name: (str) The name of the config property to query.
|
433
|
+
kwargs: Forwarded to '__call__'.
|
434
|
+
|
435
|
+
— **def [count\_objects](/recipes/recipe_modules/git/api.py#46)(self, previous_result=None, can_fail_build=False, \*\*kwargs):**
|
436
|
+
|
437
|
+
Returns `git count-objects` result as a dict.
|
438
|
+
|
439
|
+
Args:
|
440
|
+
previous_result (dict): the result of previous count_objects call.
|
441
|
+
If passed, delta is reported in the log and step text.
|
442
|
+
can_fail_build (bool): if True, may fail the build and/or raise an
|
443
|
+
exception. Defaults to False.
|
444
|
+
|
445
|
+
Returns:
|
446
|
+
A dict of count-object values, or None if count-object run failed.
|
447
|
+
|
448
|
+
— **def [fetch\_tags](/recipes/recipe_modules/git/api.py#32)(self, remote_name=None, \*\*kwargs):**
|
449
|
+
|
450
|
+
Fetches all tags from the remote.
|
451
|
+
|
452
|
+
— **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#356)(self, remote_name=None, \*\*kwargs):**
|
453
|
+
|
454
|
+
Returns: (str) The URL of the remote Git repository, or None.
|
455
|
+
|
456
|
+
Args:
|
457
|
+
remote_name: (str) The name of the remote to query, defaults to 'origin'.
|
458
|
+
kwargs: Forwarded to '__call__'.
|
459
|
+
|
460
|
+
— **def [get\_timestamp](/recipes/recipe_modules/git/api.py#311)(self, commit='HEAD', test_data=None, \*\*kwargs):**
|
461
|
+
|
462
|
+
Find and return the timestamp of the given commit.
|
463
|
+
|
464
|
+
— **def [new\_branch](/recipes/recipe_modules/git/api.py#379)(self, branch, name=None, upstream=None, \*\*kwargs):**
|
465
|
+
|
466
|
+
Runs git new-branch on a Git repository, to be used before git cl upload.
|
467
|
+
|
468
|
+
Args:
|
469
|
+
branch (str): new branch name, which must not yet exist.
|
470
|
+
name (str): step name.
|
471
|
+
upstream (str): to origin/master.
|
472
|
+
kwargs: Forwarded to '__call__'.
|
473
|
+
|
474
|
+
— **def [rebase](/recipes/recipe_modules/git/api.py#320)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
|
475
|
+
|
476
|
+
Run rebase HEAD onto branch
|
477
|
+
Args:
|
478
|
+
name_prefix (str): a prefix used for the step names
|
479
|
+
branch (str): a branch name or a hash to rebase onto
|
480
|
+
dir_path (Path): directory to clone into
|
481
|
+
remote_name (str): the remote name to rebase from if not origin
|
482
|
+
### *recipe_modules* / [git\_cl](/recipes/recipe_modules/git_cl)
|
483
|
+
|
484
|
+
[DEPS](/recipes/recipe_modules/git_cl/__init__.py#1): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
485
|
+
|
486
|
+
#### **class [GitClApi](/recipes/recipe_modules/git_cl/api.py#9)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
487
|
+
|
488
|
+
— **def [\_\_call\_\_](/recipes/recipe_modules/git_cl/api.py#10)(self, subcmd, args, name=None, \*\*kwargs):**
|
489
|
+
|
490
|
+
— **def [get\_description](/recipes/recipe_modules/git_cl/api.py#23)(self, patch_url=None, codereview=None, \*\*kwargs):**
|
491
|
+
|
492
|
+
DEPRECATED. Consider using gerrit.get_change_description instead.
|
493
|
+
|
494
|
+
— **def [issue](/recipes/recipe_modules/git_cl/api.py#54)(self, \*\*kwargs):**
|
495
|
+
|
496
|
+
— **def [set\_description](/recipes/recipe_modules/git_cl/api.py#34)(self, description, patch_url=None, codereview=None, \*\*kwargs):**
|
497
|
+
|
498
|
+
— **def [upload](/recipes/recipe_modules/git_cl/api.py#47)(self, message, upload_args=None, \*\*kwargs):**
|
499
|
+
### *recipe_modules* / [gitiles](/recipes/recipe_modules/gitiles)
|
500
|
+
|
501
|
+
[DEPS](/recipes/recipe_modules/gitiles/__init__.py#1): [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/url][recipe_engine/recipe_modules/url]
|
502
|
+
|
503
|
+
#### **class [Gitiles](/recipes/recipe_modules/gitiles/api.py#10)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
504
|
+
|
505
|
+
Module for polling a git repository using the Gitiles web interface.
|
506
|
+
|
507
|
+
— **def [commit\_log](/recipes/recipe_modules/gitiles/api.py#97)(self, url, commit, step_name=None, attempts=None):**
|
508
|
+
|
509
|
+
Returns: (dict) the Gitiles commit log structure for a given commit.
|
510
|
+
|
511
|
+
Args:
|
512
|
+
url (str): The base repository URL.
|
513
|
+
commit (str): The commit hash.
|
514
|
+
step_name (str): If not None, override the step name.
|
515
|
+
attempts (int): Number of times to try the request before failing.
|
516
|
+
|
517
|
+
— **def [download\_file](/recipes/recipe_modules/gitiles/api.py#113)(self, repository_url, file_path, branch='master', step_name=None, attempts=None, \*\*kwargs):**
|
518
|
+
|
519
|
+
Downloads raw file content from a Gitiles repository.
|
520
|
+
|
521
|
+
Args:
|
522
|
+
repository_url (str): Full URL to the repository.
|
523
|
+
branch (str): Branch of the repository.
|
524
|
+
file_path (str): Relative path to the file from the repository root.
|
525
|
+
step_name (str): Custom name for this step (optional).
|
526
|
+
attempts (int): Number of times to try the request before failing.
|
527
|
+
|
528
|
+
Returns:
|
529
|
+
Raw file content.
|
530
|
+
|
531
|
+
— **def [log](/recipes/recipe_modules/gitiles/api.py#51)(self, url, ref, limit=0, cursor=None, step_name=None, attempts=None, \*\*kwargs):**
|
532
|
+
|
533
|
+
Returns the most recent commits under the given ref with properties.
|
534
|
+
|
535
|
+
Args:
|
536
|
+
url (str): URL of the remote repository.
|
537
|
+
ref (str): Name of the desired ref (see Gitiles.refs).
|
538
|
+
limit (int): Number of commits to limit the fetching to.
|
539
|
+
Gitiles does not return all commits in one call; instead paging is
|
540
|
+
used. 0 implies to return whatever first gerrit responds with.
|
541
|
+
Otherwise, paging will be used to fetch at least this many
|
542
|
+
commits, but all fetched commits will be returned.
|
543
|
+
cursor (str or None): The paging cursor used to fetch the next page.
|
544
|
+
step_name (str): Custom name for this step (optional).
|
545
|
+
|
546
|
+
Returns:
|
547
|
+
A tuple of (commits, cursor).
|
548
|
+
Commits are a list of commits (as Gitiles dict structure) in reverse
|
549
|
+
chronological order. The number of commits may be higher than limit
|
550
|
+
argument.
|
551
|
+
Cursor can be used for subsequent calls to log for paging. If None,
|
552
|
+
signals that there are no more commits to fetch.
|
553
|
+
|
554
|
+
— **def [refs](/recipes/recipe_modules/gitiles/api.py#39)(self, url, step_name='refs', attempts=None):**
|
555
|
+
|
556
|
+
Returns a list of refs in the remote repository.
|
557
|
+
### *recipe_modules* / [gsutil](/recipes/recipe_modules/gsutil)
|
558
|
+
|
559
|
+
[DEPS](/recipes/recipe_modules/gsutil/__init__.py#1): [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python]
|
560
|
+
|
561
|
+
#### **class [GSUtilApi](/recipes/recipe_modules/gsutil/api.py#9)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
562
|
+
|
563
|
+
— **def [\_\_call\_\_](/recipes/recipe_modules/gsutil/api.py#14)(self, cmd, name=None, use_retry_wrapper=True, version=None, parallel_upload=False, multithreaded=False, \*\*kwargs):**
|
564
|
+
|
565
|
+
A step to run arbitrary gsutil commands.
|
566
|
+
|
567
|
+
Note that this assumes that gsutil authentication environment variables
|
568
|
+
(AWS_CREDENTIAL_FILE and BOTO_CONFIG) are already set, though if you want to
|
569
|
+
set them to something else you can always do so using the env={} kwarg.
|
570
|
+
|
571
|
+
Note also that gsutil does its own wildcard processing, so wildcards are
|
572
|
+
valid in file-like portions of the cmd. See 'gsutil help wildcards'.
|
573
|
+
|
574
|
+
Arguments:
|
575
|
+
cmd: list of (string) arguments to pass to gsutil.
|
576
|
+
Include gsutil-level options first (see 'gsutil help options').
|
577
|
+
name: the (string) name of the step to use.
|
578
|
+
Defaults to the first non-flag token in the cmd.
|
579
|
+
|
580
|
+
— **def [cat](/recipes/recipe_modules/gsutil/api.py#98)(self, url, args=None, \*\*kwargs):**
|
581
|
+
|
582
|
+
— **def [copy](/recipes/recipe_modules/gsutil/api.py#105)(self, source_bucket, source, dest_bucket, dest, args=None, link_name='gsutil.copy', metadata=None, unauthenticated_url=False, \*\*kwargs):**
|
583
|
+
|
584
|
+
— **def [download](/recipes/recipe_modules/gsutil/api.py#84)(self, bucket, source, dest, args=None, \*\*kwargs):**
|
585
|
+
|
586
|
+
— **def [download\_url](/recipes/recipe_modules/gsutil/api.py#91)(self, url, dest, args=None, \*\*kwargs):**
|
587
|
+
|
588
|
+
  **@property**<br>— **def [gsutil\_py\_path](/recipes/recipe_modules/gsutil/api.py#10)(self):**
|
589
|
+
|
590
|
+
— **def [list](/recipes/recipe_modules/gsutil/api.py#121)(self, url, args=None, \*\*kwargs):**
|
591
|
+
|
592
|
+
— **def [remove\_url](/recipes/recipe_modules/gsutil/api.py#135)(self, url, args=None, \*\*kwargs):**
|
593
|
+
|
594
|
+
— **def [signurl](/recipes/recipe_modules/gsutil/api.py#128)(self, private_key_file, bucket, dest, args=None, \*\*kwargs):**
|
595
|
+
|
596
|
+
— **def [upload](/recipes/recipe_modules/gsutil/api.py#68)(self, source, bucket, dest, args=None, link_name='gsutil.upload', metadata=None, unauthenticated_url=False, \*\*kwargs):**
|
597
|
+
### *recipe_modules* / [infra\_paths](/recipes/recipe_modules/infra_paths)
|
598
|
+
|
599
|
+
[DEPS](/recipes/recipe_modules/infra_paths/__init__.py#1): [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties]
|
600
|
+
|
601
|
+
#### **class [InfraPathsApi](/recipes/recipe_modules/infra_paths/api.py#8)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
602
|
+
|
603
|
+
infra_paths module is glue for design mistakes. It will be removed.
|
604
|
+
|
605
|
+
  **@property**<br>— **def [default\_git\_cache\_dir](/recipes/recipe_modules/infra_paths/api.py#17)(self):**
|
606
|
+
|
607
|
+
Returns the location of the default git cache directory.
|
608
|
+
|
609
|
+
This property should be used instead of using path['git_cache'] directly.
|
610
|
+
|
611
|
+
It returns git_cache path if it is defined (Buildbot world), otherwise
|
612
|
+
uses the more generic [CACHE]/git path (LUCI world).
|
613
|
+
|
614
|
+
— **def [initialize](/recipes/recipe_modules/infra_paths/api.py#11)(self):**
|
615
|
+
### *recipe_modules* / [presubmit](/recipes/recipe_modules/presubmit)
|
616
|
+
|
617
|
+
[DEPS](/recipes/recipe_modules/presubmit/__init__.py#1): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
618
|
+
|
619
|
+
#### **class [PresubmitApi](/recipes/recipe_modules/presubmit/api.py#7)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
620
|
+
|
621
|
+
— **def [\_\_call\_\_](/recipes/recipe_modules/presubmit/api.py#12)(self, \*args, \*\*kwargs):**
|
622
|
+
|
623
|
+
Return a presubmit step.
|
624
|
+
|
625
|
+
  **@property**<br>— **def [presubmit\_support\_path](/recipes/recipe_modules/presubmit/api.py#8)(self):**
|
626
|
+
### *recipe_modules* / [rietveld](/recipes/recipe_modules/rietveld)
|
627
|
+
|
628
|
+
[DEPS](/recipes/recipe_modules/rietveld/__init__.py#1): [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
629
|
+
|
630
|
+
#### **class [RietveldApi](/recipes/recipe_modules/rietveld/api.py#10)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
631
|
+
|
632
|
+
— **def [apply\_issue](/recipes/recipe_modules/rietveld/api.py#53)(self, \*root_pieces, \*\*kwargs):**
|
633
|
+
|
634
|
+
Call apply_issue from depot_tools.
|
635
|
+
|
636
|
+
Args:
|
637
|
+
root_pieces (strings): location where to run apply_issue, relative to the
|
638
|
+
checkout root.
|
639
|
+
authentication (string or None): authentication scheme to use. Can be None
|
640
|
+
or 'oauth2'. See also apply_issue.py --help (-E and --no-auth options.)
|
641
|
+
|
642
|
+
— **def [calculate\_issue\_root](/recipes/recipe_modules/rietveld/api.py#11)(self, extra_patch_project_roots=None):**
|
643
|
+
|
644
|
+
Returns path where a patch should be applied to based on "patch_project".
|
645
|
+
|
646
|
+
YOU SHOULD NOT USE THIS METHOD. Put this into gclient's config as
|
647
|
+
patch_projects instead, and with luck you won't need to use
|
648
|
+
calculate_patch_root from gclient api.
|
649
|
+
TODO(tandrii): remove this method completely. See http://crbug.com/605563.
|
650
|
+
|
651
|
+
Maps Rietveld's "patch_project" to a path of directories relative to
|
652
|
+
api.gclient.c.solutions[0].name which describe where to place the patch.
|
653
|
+
|
654
|
+
Args:
|
655
|
+
extra_patch_project_roots: Dict mapping project names to relative roots.
|
656
|
+
|
657
|
+
Returns:
|
658
|
+
Relative path or empty string if patch_project is not set or path for a
|
659
|
+
given is unknown.
|
660
|
+
### *recipe_modules* / [tryserver](/recipes/recipe_modules/tryserver)
|
661
|
+
|
662
|
+
[DEPS](/recipes/recipe_modules/tryserver/__init__.py#5): [gerrit](#recipe_modules-gerrit), [git](#recipe_modules-git), [git\_cl](#recipe_modules-git_cl), [rietveld](#recipe_modules-rietveld), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
663
|
+
|
664
|
+
#### **class [TryserverApi](/recipes/recipe_modules/tryserver/api.py#12)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
665
|
+
|
666
|
+
— **def [\_\_init\_\_](/recipes/recipe_modules/tryserver/api.py#13)(self, \*args, \*\*kwargs):**
|
667
|
+
|
668
|
+
— **def [add\_failure\_reason](/recipes/recipe_modules/tryserver/api.py#146)(self, reason):**
|
669
|
+
|
670
|
+
Records a more detailed reason why build is failing.
|
671
|
+
|
672
|
+
The reason can be any JSON-serializable object.
|
673
|
+
|
674
|
+
  **@property**<br>— **def [can\_apply\_issue](/recipes/recipe_modules/tryserver/api.py#23)(self):**
|
675
|
+
|
676
|
+
Returns true iff the properties exist to apply_issue from rietveld.
|
677
|
+
|
678
|
+
— **def [get\_files\_affected\_by\_patch](/recipes/recipe_modules/tryserver/api.py#46)(self, patch_root=None, \*\*kwargs):**
|
679
|
+
|
680
|
+
Returns list of paths to files affected by the patch.
|
681
|
+
|
682
|
+
Argument:
|
683
|
+
patch_root: path relative to api.path['root'], usually obtained from
|
684
|
+
api.gclient.calculate_patch_root(patch_project)
|
685
|
+
|
686
|
+
Returned paths will be relative to to patch_root.
|
687
|
+
|
688
|
+
TODO(tandrii): remove this doc.
|
689
|
+
Unless you use patch_root=None, in which case old behavior is used
|
690
|
+
which returns paths relative to checkout aka solution[0].name.
|
691
|
+
|
692
|
+
— **def [get\_footer](/recipes/recipe_modules/tryserver/api.py#209)(self, tag, patch_text=None):**
|
693
|
+
|
694
|
+
Gets a specific tag from a CL description
|
695
|
+
|
696
|
+
— **def [get\_footers](/recipes/recipe_modules/tryserver/api.py#182)(self, patch_text=None):**
|
697
|
+
|
698
|
+
Retrieves footers from the patch description.
|
699
|
+
|
700
|
+
footers are machine readable tags embedded in commit messages. See
|
701
|
+
git-footers documentation for more information.
|
702
|
+
|
703
|
+
  **@property**<br>— **def [is\_gerrit\_issue](/recipes/recipe_modules/tryserver/api.py#30)(self):**
|
704
|
+
|
705
|
+
Returns true iff the properties exist to match a Gerrit issue.
|
706
|
+
|
707
|
+
  **@property**<br>— **def [is\_patch\_in\_git](/recipes/recipe_modules/tryserver/api.py#40)(self):**
|
708
|
+
|
709
|
+
  **@property**<br>— **def [is\_tryserver](/recipes/recipe_modules/tryserver/api.py#17)(self):**
|
710
|
+
|
711
|
+
Returns true iff we can apply_issue or patch.
|
712
|
+
|
713
|
+
— **def [normalize\_footer\_name](/recipes/recipe_modules/tryserver/api.py#213)(self, footer):**
|
714
|
+
|
715
|
+
— **def [set\_compile\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#125)(self):**
|
716
|
+
|
717
|
+
Mark the tryjob result as a compile failure.
|
718
|
+
|
719
|
+
  **@contextlib.contextmanager**<br>— **def [set\_failure\_hash](/recipes/recipe_modules/tryserver/api.py#155)(self):**
|
720
|
+
|
721
|
+
Context manager that sets a failure_hash build property on StepFailure.
|
722
|
+
|
723
|
+
This can be used to easily compare whether two builds have failed
|
724
|
+
for the same reason. For example, if a patch is bad (breaks something),
|
725
|
+
we'd expect it to always break in the same way. Different failures
|
726
|
+
for the same patch are usually a sign of flakiness.
|
727
|
+
|
728
|
+
— **def [set\_invalid\_test\_results\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#137)(self):**
|
729
|
+
|
730
|
+
Mark the tryjob result as having invalid test results.
|
731
|
+
|
732
|
+
This means we run some tests, but the results were not valid
|
733
|
+
(e.g. no list of specific test cases that failed, or too many
|
734
|
+
tests failing, etc).
|
735
|
+
|
736
|
+
— **def [set\_patch\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#121)(self):**
|
737
|
+
|
738
|
+
Mark the tryjob result as failure to apply the patch.
|
739
|
+
|
740
|
+
— **def [set\_subproject\_tag](/recipes/recipe_modules/tryserver/api.py#103)(self, subproject_tag):**
|
741
|
+
|
742
|
+
Adds a subproject tag to the build.
|
743
|
+
|
744
|
+
This can be used to distinguish between builds that execute different steps
|
745
|
+
depending on what was patched, e.g. blink vs. pure chromium patches.
|
746
|
+
|
747
|
+
— **def [set\_test\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#129)(self):**
|
748
|
+
|
749
|
+
Mark the tryjob result as a test failure.
|
750
|
+
|
751
|
+
This means we started running actual tests (not prerequisite steps
|
752
|
+
like checkout or compile), and some of these tests have failed.
|
753
|
+
## Recipes
|
754
|
+
|
755
|
+
### *recipes* / [bot\_update:examples/full](/recipes/recipe_modules/bot_update/examples/full.py)
|
756
|
+
|
757
|
+
[DEPS](/recipes/recipe_modules/bot_update/examples/full.py#5): [bot\_update](#recipe_modules-bot_update), [gclient](#recipe_modules-gclient), [gerrit](#recipe_modules-gerrit), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties]
|
758
|
+
|
759
|
+
— **def [RunSteps](/recipes/recipe_modules/bot_update/examples/full.py#14)(api):**
|
760
|
+
### *recipes* / [cipd:examples/full](/recipes/recipe_modules/cipd/examples/full.py)
|
761
|
+
|
762
|
+
[DEPS](/recipes/recipe_modules/cipd/examples/full.py#8): [cipd](#recipe_modules-cipd), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
763
|
+
|
764
|
+
— **def [RunSteps](/recipes/recipe_modules/cipd/examples/full.py#27)(api, use_pkg, pkg_files, pkg_dirs, ver_files, install_mode):**
|
765
|
+
### *recipes* / [cipd:examples/platform\_suffix](/recipes/recipe_modules/cipd/examples/platform_suffix.py)
|
766
|
+
|
767
|
+
[DEPS](/recipes/recipe_modules/cipd/examples/platform_suffix.py#8): [cipd](#recipe_modules-cipd), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
768
|
+
|
769
|
+
— **def [RunSteps](/recipes/recipe_modules/cipd/examples/platform_suffix.py#22)(api, arch_override, bits_override, expect_error):**
|
770
|
+
### *recipes* / [depot\_tools:examples/full](/recipes/recipe_modules/depot_tools/examples/full.py)
|
771
|
+
|
772
|
+
[DEPS](/recipes/recipe_modules/depot_tools/examples/full.py#5): [depot\_tools](#recipe_modules-depot_tools), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
773
|
+
|
774
|
+
— **def [RunSteps](/recipes/recipe_modules/depot_tools/examples/full.py#13)(api):**
|
775
|
+
### *recipes* / [gclient:examples/full](/recipes/recipe_modules/gclient/examples/full.py)
|
776
|
+
|
777
|
+
[DEPS](/recipes/recipe_modules/gclient/examples/full.py#5): [gclient](#recipe_modules-gclient), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
778
|
+
|
779
|
+
— **def [RunSteps](/recipes/recipe_modules/gclient/examples/full.py#45)(api):**
|
780
|
+
### *recipes* / [gclient:tests/patch\_project](/recipes/recipe_modules/gclient/tests/patch_project.py)
|
781
|
+
|
782
|
+
[DEPS](/recipes/recipe_modules/gclient/tests/patch_project.py#9): [gclient](#recipe_modules-gclient), [recipe\_engine/properties][recipe_engine/recipe_modules/properties]
|
783
|
+
|
784
|
+
— **def [RunSteps](/recipes/recipe_modules/gclient/tests/patch_project.py#20)(api, patch_project):**
|
785
|
+
### *recipes* / [gerrit:examples/full](/recipes/recipe_modules/gerrit/examples/full.py)
|
786
|
+
|
787
|
+
[DEPS](/recipes/recipe_modules/gerrit/examples/full.py#5): [gerrit](#recipe_modules-gerrit), [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
788
|
+
|
789
|
+
— **def [RunSteps](/recipes/recipe_modules/gerrit/examples/full.py#11)(api):**
|
790
|
+
### *recipes* / [git:examples/full](/recipes/recipe_modules/git/examples/full.py)
|
791
|
+
|
792
|
+
[DEPS](/recipes/recipe_modules/git/examples/full.py#5): [git](#recipe_modules-git), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
793
|
+
|
794
|
+
— **def [RunSteps](/recipes/recipe_modules/git/examples/full.py#16)(api):**
|
795
|
+
### *recipes* / [git\_cl:examples/full](/recipes/recipe_modules/git_cl/examples/full.py)
|
796
|
+
|
797
|
+
[DEPS](/recipes/recipe_modules/git_cl/examples/full.py#9): [git\_cl](#recipe_modules-git_cl), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
798
|
+
|
799
|
+
— **def [RunSteps](/recipes/recipe_modules/git_cl/examples/full.py#17)(api):**
|
800
|
+
### *recipes* / [gitiles:examples/full](/recipes/recipe_modules/gitiles/examples/full.py)
|
801
|
+
|
802
|
+
[DEPS](/recipes/recipe_modules/gitiles/examples/full.py#5): [gitiles](#recipe_modules-gitiles), [recipe\_engine/properties][recipe_engine/recipe_modules/properties]
|
803
|
+
|
804
|
+
— **def [RunSteps](/recipes/recipe_modules/gitiles/examples/full.py#11)(api):**
|
805
|
+
### *recipes* / [gsutil:examples/full](/recipes/recipe_modules/gsutil/examples/full.py)
|
806
|
+
|
807
|
+
[DEPS](/recipes/recipe_modules/gsutil/examples/full.py#5): [gsutil](#recipe_modules-gsutil), [recipe\_engine/path][recipe_engine/recipe_modules/path]
|
808
|
+
|
809
|
+
— **def [RunSteps](/recipes/recipe_modules/gsutil/examples/full.py#11)(api):**
|
810
|
+
|
811
|
+
Move things around in a loop!
|
812
|
+
### *recipes* / [infra\_paths:examples/full](/recipes/recipe_modules/infra_paths/examples/full.py)
|
813
|
+
|
814
|
+
[DEPS](/recipes/recipe_modules/infra_paths/examples/full.py#7): [infra\_paths](#recipe_modules-infra_paths), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
815
|
+
|
816
|
+
— **def [RunSteps](/recipes/recipe_modules/infra_paths/examples/full.py#16)(api):**
|
817
|
+
### *recipes* / [presubmit:examples/full](/recipes/recipe_modules/presubmit/examples/full.py)
|
818
|
+
|
819
|
+
[DEPS](/recipes/recipe_modules/presubmit/examples/full.py#5): [presubmit](#recipe_modules-presubmit)
|
820
|
+
|
821
|
+
— **def [RunSteps](/recipes/recipe_modules/presubmit/examples/full.py#10)(api):**
|
822
|
+
### *recipes* / [rietveld:examples/full](/recipes/recipe_modules/rietveld/examples/full.py)
|
823
|
+
|
824
|
+
[DEPS](/recipes/recipe_modules/rietveld/examples/full.py#5): [infra\_paths](#recipe_modules-infra_paths), [rietveld](#recipe_modules-rietveld), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
825
|
+
|
826
|
+
— **def [RunSteps](/recipes/recipe_modules/rietveld/examples/full.py#13)(api):**
|
827
|
+
### *recipes* / [tryserver:examples/full](/recipes/recipe_modules/tryserver/examples/full.py)
|
828
|
+
|
829
|
+
[DEPS](/recipes/recipe_modules/tryserver/examples/full.py#5): [tryserver](#recipe_modules-tryserver), [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
830
|
+
|
831
|
+
— **def [RunSteps](/recipes/recipe_modules/tryserver/examples/full.py#17)(api):**
|
832
|
+
|
833
|
+
[recipe_engine/recipe_modules/context]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/README.recipes.md#recipe_modules--context
|
834
|
+
[recipe_engine/recipe_modules/json]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/README.recipes.md#recipe_modules--json
|
835
|
+
[recipe_engine/recipe_modules/path]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/README.recipes.md#recipe_modules--path
|
836
|
+
[recipe_engine/recipe_modules/platform]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/README.recipes.md#recipe_modules--platform
|
837
|
+
[recipe_engine/recipe_modules/properties]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/README.recipes.md#recipe_modules--properties
|
838
|
+
[recipe_engine/recipe_modules/python]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/README.recipes.md#recipe_modules--python
|
839
|
+
[recipe_engine/recipe_modules/raw_io]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/README.recipes.md#recipe_modules--raw_io
|
840
|
+
[recipe_engine/recipe_modules/step]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/README.recipes.md#recipe_modules--step
|
841
|
+
[recipe_engine/recipe_modules/url]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/README.recipes.md#recipe_modules--url
|
842
|
+
[recipe_engine/wkt/RecipeApi]: https://github.com/luci/recipes-py/blob/de3238ca6d8320585f5dbcf051cd96cbc72d4684/recipe_engine/recipe_api.py#L884
|