libv8 6.7.288.46.1 → 7.3.492.27.0beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/README.md +2 -0
- data/ext/libv8/builder.rb +6 -2
- data/lib/libv8/version.rb +1 -1
- data/vendor/depot_tools/.gitattributes +1 -0
- data/vendor/depot_tools/.gitignore +7 -0
- data/vendor/depot_tools/CROS_OWNERS +5 -0
- data/vendor/depot_tools/OWNERS +12 -1
- data/vendor/depot_tools/PRESUBMIT.py +16 -9
- data/vendor/depot_tools/README.md +9 -2
- data/vendor/depot_tools/autoninja +14 -6
- data/vendor/depot_tools/autoninja.bat +11 -1
- data/vendor/depot_tools/autoninja.py +40 -18
- data/vendor/depot_tools/bb +12 -0
- data/vendor/depot_tools/bb.bat +7 -0
- data/vendor/depot_tools/bootstrap/win/manifest.txt +1 -1
- data/vendor/depot_tools/bootstrap/win/manifest_bleeding_edge.txt +1 -1
- data/vendor/depot_tools/bootstrap/win/win_tools.py +2 -1
- data/vendor/depot_tools/buildbucket.py +57 -4
- data/vendor/depot_tools/cipd +157 -44
- data/vendor/depot_tools/cipd.bat +51 -14
- data/vendor/depot_tools/cipd.ps1 +104 -42
- data/vendor/depot_tools/cipd_client_version +1 -1
- data/vendor/depot_tools/cipd_client_version.digests +21 -0
- data/vendor/depot_tools/cipd_manifest.txt +19 -6
- data/vendor/depot_tools/cipd_manifest.versions +318 -0
- data/vendor/depot_tools/clang_format.py +4 -4
- data/vendor/depot_tools/cpplint.py +44 -199
- data/vendor/depot_tools/dart_format.py +2 -2
- data/vendor/depot_tools/detect_host_arch.py +8 -3
- data/vendor/depot_tools/download_from_google_storage.py +47 -39
- data/vendor/depot_tools/fetch.py +30 -18
- data/vendor/depot_tools/fetch_configs/android_internal.py +34 -0
- data/vendor/depot_tools/fetch_configs/chromium.py +18 -1
- data/vendor/depot_tools/fetch_configs/config_util.py +4 -2
- data/vendor/depot_tools/fetch_configs/inspector_protocol.py +40 -0
- data/vendor/depot_tools/fetch_configs/node-ci.py +41 -0
- data/vendor/depot_tools/fix_encoding.py +3 -3
- data/vendor/depot_tools/gclient +1 -1
- data/vendor/depot_tools/gclient.py +415 -198
- data/vendor/depot_tools/gclient_eval.py +220 -171
- data/vendor/depot_tools/gclient_paths.py +142 -0
- data/vendor/depot_tools/gclient_scm.py +200 -51
- data/vendor/depot_tools/gclient_utils.py +88 -191
- data/vendor/depot_tools/gerrit_client.py +13 -0
- data/vendor/depot_tools/gerrit_util.py +158 -23
- data/vendor/depot_tools/git-nav-upstream +1 -1
- data/vendor/depot_tools/git_cache.py +77 -24
- data/vendor/depot_tools/git_cl.py +705 -1099
- data/vendor/depot_tools/git_common.py +9 -6
- data/vendor/depot_tools/git_map_branches.py +19 -2
- data/vendor/depot_tools/git_nav_downstream.py +3 -4
- data/vendor/depot_tools/git_rebase_update.py +14 -0
- data/vendor/depot_tools/git_reparent_branch.py +8 -2
- data/vendor/depot_tools/gn.py +38 -3
- data/vendor/depot_tools/gsutil.py +8 -3
- data/vendor/depot_tools/gsutil.py.bat +15 -0
- data/vendor/depot_tools/gsutil.vpython +16 -0
- data/vendor/depot_tools/infra/config/OWNERS +0 -1
- data/vendor/depot_tools/infra/config/recipes.cfg +3 -2
- data/vendor/depot_tools/lucicfg +12 -0
- data/vendor/depot_tools/lucicfg.bat +7 -0
- data/vendor/depot_tools/man/html/git-map-branches.html +34 -2
- data/vendor/depot_tools/man/html/git-new-branch.html +40 -32
- data/vendor/depot_tools/man/man1/git-map-branches.1 +24 -5
- data/vendor/depot_tools/man/man1/git-new-branch.1 +35 -27
- data/vendor/depot_tools/man/src/git-map-branches.demo.1.sh +1 -0
- data/vendor/depot_tools/man/src/git-map-branches.txt +10 -0
- data/vendor/depot_tools/man/src/git-new-branch.demo.1.sh +9 -4
- data/vendor/depot_tools/man/src/git-new-branch.txt +1 -1
- data/vendor/depot_tools/metrics.README.md +98 -0
- data/vendor/depot_tools/metrics.py +296 -0
- data/vendor/depot_tools/metrics_utils.py +303 -0
- data/vendor/depot_tools/my_activity.py +91 -29
- data/vendor/depot_tools/ninja +1 -1
- data/vendor/depot_tools/ninjalog.README.md +64 -0
- data/vendor/depot_tools/ninjalog_uploader.py +232 -0
- data/vendor/depot_tools/ninjalog_uploader_wrapper.py +116 -0
- data/vendor/depot_tools/owners.py +30 -13
- data/vendor/depot_tools/owners_finder.py +5 -2
- data/vendor/depot_tools/presubmit_canned_checks.py +188 -29
- data/vendor/depot_tools/presubmit_support.py +18 -41
- data/vendor/depot_tools/pylintrc +23 -19
- data/vendor/depot_tools/recipes/OWNERS +2 -0
- data/vendor/depot_tools/recipes/README.recipes.md +344 -151
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/OWNERS +2 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +2 -16
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +141 -99
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic.json +5 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json +5 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json +6 -98
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json +4 -9
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +45 -5
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json +4 -9
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json +4 -9
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{tryjob.json → input_commit_with_id_without_repo.json} +6 -11
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{tryjob_empty_revision.json → multiple_patch_refs.json} +8 -9
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json +19 -29
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{trychange.json → refs.json} +4 -9
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json +4 -9
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +51 -6
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +50 -6
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +51 -6
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json +17 -25
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json +17 -25
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json +18 -26
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json +18 -26
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json +26 -28
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +45 -5
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +17 -25
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/unrecognized_commit_repo.json +13 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json +13 -152
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json +4 -9
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.py +185 -202
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/bot_update.py +52 -157
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/test_api.py +5 -14
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/tests/ensure_checkout.py +34 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/api.py +14 -2
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/basic.json +4 -5
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/basic_pkg.json +4 -5
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/describe-failed.json +7 -5
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/describe-many-instances.json +4 -5
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/mac64.json +4 -5
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_file.json +9 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_mode.json +9 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_verfile.json +9 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/win64.json +4 -5
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk arch.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk bits.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_32.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_64.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_32.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_64.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_mips_64.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/mac_intel_64.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_32.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_64.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/api.py +13 -8
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/examples/full.expected/basic.json +18 -12
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/examples/full.expected/basic_luci.json +18 -12
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/examples/full.expected/win.json +18 -12
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/examples/full.py +3 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/__init__.py +1 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/api.py +58 -46
- data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +65 -22
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/basic.json +20 -21
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/buildbot.json +20 -21
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/revision.json +20 -21
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/tryserver.json +20 -21
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.py +5 -2
- data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/patch_project.py +62 -14
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/api.py +24 -38
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +56 -50
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.py +15 -9
- data/vendor/depot_tools/recipes/recipe_modules/git/__init__.py +4 -1
- data/vendor/depot_tools/recipes/recipe_modules/git/api.py +34 -22
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_branch.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_hash.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_luci.json +222 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_ref.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_tags.json +224 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json +10 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json +5 -7
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/cat-file_test.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json +5 -7
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json +10 -5
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/curl_trace_file.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json +8 -9
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/platform_win.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json +12 -8
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json +5 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.py +27 -11
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/api.py +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/examples/full.expected/basic.json +12 -13
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/__init__.py +5 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/api.py +120 -5
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.expected/basic.json +45 -3
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py +25 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/resources/gerrit_client.py +56 -4
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/tests/parse_repo_url.expected/basic.json +6 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/tests/parse_repo_url.py +49 -0
- data/vendor/depot_tools/recipes/recipe_modules/gsutil/api.py +24 -13
- data/vendor/depot_tools/recipes/recipe_modules/gsutil/examples/full.expected/basic.json +13 -14
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/basic.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_buildbot_linux.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_buildbot_mac.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_buildbot_win.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_generic_linux.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_generic_mac.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_generic_win.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_kitchen_linux.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_kitchen_mac.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/examples/full.expected/paths_kitchen_win.json +2 -3
- data/vendor/depot_tools/recipes/recipe_modules/infra_paths/path_config.py +1 -2
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/__init__.py +35 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/api.py +116 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.expected/linux.json +22 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.expected/mac.json +82 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.expected/win.json +22 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.py +23 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/__init__.py +1 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/api.py +2 -7
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/examples/full.expected/basic.json +7 -6
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/__init__.py +1 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/api.py +117 -8
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/basic_tags.json +4 -5
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/set_failure_hash_with_no_steps.json +7 -4
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json +98 -7
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json +147 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_git_patch.json +8 -5
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_git_patch_luci.json +8 -5
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +9 -6
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch_new.json +9 -6
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.py +27 -2
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/test_api.py +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/windows_sdk/__init__.py +25 -0
- data/vendor/depot_tools/recipes/recipe_modules/windows_sdk/api.py +137 -0
- data/vendor/depot_tools/recipes/recipe_modules/windows_sdk/examples/full.expected/linux.json +22 -0
- data/vendor/depot_tools/recipes/recipe_modules/windows_sdk/examples/full.expected/mac.json +22 -0
- data/vendor/depot_tools/recipes/recipe_modules/windows_sdk/examples/full.expected/win.json +107 -0
- data/vendor/depot_tools/recipes/recipe_modules/windows_sdk/examples/full.py +26 -0
- data/vendor/depot_tools/recipes/recipes.py +37 -27
- data/vendor/depot_tools/recipes/recipes/fetch_end_to_end_test.expected/basic.json +7 -10
- data/vendor/depot_tools/repo +34 -8
- data/vendor/depot_tools/roll_dep.py +52 -49
- data/vendor/depot_tools/scm.py +38 -23
- data/vendor/depot_tools/setup_color.py +4 -2
- data/vendor/depot_tools/split_cl.py +32 -4
- data/vendor/depot_tools/subprocess2.py +22 -4
- data/vendor/depot_tools/third_party/httplib2/README.chromium +2 -2
- data/vendor/depot_tools/third_party/httplib2/__init__.py +242 -158
- data/vendor/depot_tools/third_party/httplib2/cacerts.txt +57 -44
- data/vendor/depot_tools/third_party/httplib2/socks.py +15 -5
- data/vendor/depot_tools/third_party/logilab/README.chromium +2 -4
- data/vendor/depot_tools/third_party/logilab/astroid/README.chromium +2 -1
- data/vendor/depot_tools/third_party/logilab/astroid/__init__.py +10 -5
- data/vendor/depot_tools/third_party/logilab/astroid/__pkginfo__.py +5 -5
- data/vendor/depot_tools/third_party/logilab/astroid/arguments.py +233 -0
- data/vendor/depot_tools/third_party/logilab/astroid/as_string.py +82 -33
- data/vendor/depot_tools/third_party/logilab/astroid/bases.py +137 -153
- data/vendor/depot_tools/third_party/logilab/astroid/brain/{builtin_inference.py → brain_builtin_inference.py} +117 -26
- data/vendor/depot_tools/third_party/logilab/astroid/brain/brain_dateutil.py +15 -0
- data/vendor/depot_tools/third_party/logilab/astroid/brain/{py2gi.py → brain_gi.py} +48 -8
- data/vendor/depot_tools/third_party/logilab/astroid/brain/{py2mechanize.py → brain_mechanize.py} +0 -0
- data/vendor/depot_tools/third_party/logilab/astroid/brain/{pynose.py → brain_nose.py} +4 -1
- data/vendor/depot_tools/third_party/logilab/astroid/brain/brain_numpy.py +62 -0
- data/vendor/depot_tools/third_party/logilab/astroid/brain/brain_pytest.py +76 -0
- data/vendor/depot_tools/third_party/logilab/astroid/brain/brain_qt.py +44 -0
- data/vendor/depot_tools/third_party/logilab/astroid/brain/{pysix_moves.py → brain_six.py} +28 -1
- data/vendor/depot_tools/third_party/logilab/astroid/brain/brain_ssl.py +65 -0
- data/vendor/depot_tools/third_party/logilab/astroid/brain/brain_stdlib.py +473 -0
- data/vendor/depot_tools/third_party/logilab/astroid/builder.py +104 -81
- data/vendor/depot_tools/third_party/logilab/astroid/context.py +81 -0
- data/vendor/depot_tools/third_party/logilab/astroid/decorators.py +75 -0
- data/vendor/depot_tools/third_party/logilab/astroid/exceptions.py +20 -0
- data/vendor/depot_tools/third_party/logilab/astroid/inference.py +137 -183
- data/vendor/depot_tools/third_party/logilab/astroid/manager.py +45 -169
- data/vendor/depot_tools/third_party/logilab/astroid/mixins.py +37 -14
- data/vendor/depot_tools/third_party/logilab/astroid/modutils.py +112 -41
- data/vendor/depot_tools/third_party/logilab/astroid/node_classes.py +243 -156
- data/vendor/depot_tools/third_party/logilab/astroid/nodes.py +35 -22
- data/vendor/depot_tools/third_party/logilab/astroid/objects.py +186 -0
- data/vendor/depot_tools/third_party/logilab/astroid/protocols.py +157 -102
- data/vendor/depot_tools/third_party/logilab/astroid/raw_building.py +32 -8
- data/vendor/depot_tools/third_party/logilab/astroid/rebuilder.py +372 -309
- data/vendor/depot_tools/third_party/logilab/astroid/scoped_nodes.py +652 -420
- data/vendor/depot_tools/third_party/logilab/astroid/test_utils.py +4 -21
- data/vendor/depot_tools/third_party/logilab/astroid/transforms.py +96 -0
- data/vendor/depot_tools/third_party/logilab/astroid/util.py +89 -0
- data/vendor/depot_tools/third_party/logilab/lazy_object_proxy/LICENSE +19 -0
- data/vendor/depot_tools/third_party/logilab/lazy_object_proxy/README.chromium +11 -0
- data/vendor/depot_tools/third_party/logilab/lazy_object_proxy/__init__.py +20 -0
- data/vendor/depot_tools/third_party/logilab/lazy_object_proxy/cext.c +1421 -0
- data/vendor/depot_tools/third_party/logilab/lazy_object_proxy/compat.py +9 -0
- data/vendor/depot_tools/third_party/logilab/lazy_object_proxy/simple.py +246 -0
- data/vendor/depot_tools/third_party/logilab/lazy_object_proxy/slots.py +414 -0
- data/vendor/depot_tools/third_party/logilab/lazy_object_proxy/utils.py +13 -0
- data/vendor/depot_tools/third_party/logilab/wrapt/LICENSE +24 -0
- data/vendor/depot_tools/third_party/logilab/wrapt/README.chromium +11 -0
- data/vendor/depot_tools/third_party/logilab/wrapt/__init__.py +19 -0
- data/vendor/depot_tools/third_party/logilab/wrapt/_wrappers.c +2729 -0
- data/vendor/depot_tools/third_party/logilab/wrapt/arguments.py +96 -0
- data/vendor/depot_tools/third_party/logilab/wrapt/decorators.py +512 -0
- data/vendor/depot_tools/third_party/logilab/wrapt/importer.py +228 -0
- data/vendor/depot_tools/third_party/logilab/wrapt/wrappers.py +901 -0
- data/vendor/depot_tools/third_party/pylint/README.chromium +2 -25
- data/vendor/depot_tools/third_party/pylint/__pkginfo__.py +13 -3
- data/vendor/depot_tools/third_party/pylint/checkers/__init__.py +1 -2
- data/vendor/depot_tools/third_party/pylint/checkers/async.py +82 -0
- data/vendor/depot_tools/third_party/pylint/checkers/base.py +893 -119
- data/vendor/depot_tools/third_party/pylint/checkers/classes.py +342 -204
- data/vendor/depot_tools/third_party/pylint/checkers/design_analysis.py +51 -34
- data/vendor/depot_tools/third_party/pylint/checkers/exceptions.py +84 -47
- data/vendor/depot_tools/third_party/pylint/checkers/format.py +55 -30
- data/vendor/depot_tools/third_party/pylint/checkers/imports.py +314 -73
- data/vendor/depot_tools/third_party/pylint/checkers/logging.py +10 -8
- data/vendor/depot_tools/third_party/pylint/checkers/misc.py +2 -1
- data/vendor/depot_tools/third_party/pylint/checkers/newstyle.py +45 -48
- data/vendor/depot_tools/third_party/pylint/checkers/python3.py +31 -21
- data/vendor/depot_tools/third_party/pylint/checkers/raw_metrics.py +3 -3
- data/vendor/depot_tools/third_party/pylint/checkers/similar.py +4 -5
- data/vendor/depot_tools/third_party/pylint/checkers/spelling.py +24 -10
- data/vendor/depot_tools/third_party/pylint/checkers/stdlib.py +120 -56
- data/vendor/depot_tools/third_party/pylint/checkers/strings.py +38 -35
- data/vendor/depot_tools/third_party/pylint/checkers/typecheck.py +485 -138
- data/vendor/depot_tools/third_party/pylint/checkers/utils.py +319 -142
- data/vendor/depot_tools/third_party/pylint/checkers/variables.py +329 -207
- data/vendor/depot_tools/third_party/pylint/config.py +739 -76
- data/vendor/depot_tools/third_party/pylint/epylint.py +9 -5
- data/vendor/depot_tools/third_party/pylint/extensions/__init__.py +0 -0
- data/vendor/depot_tools/third_party/pylint/extensions/check_docs.py +311 -0
- data/vendor/depot_tools/third_party/pylint/extensions/check_elif.py +62 -0
- data/vendor/depot_tools/third_party/{logilab/common → pylint}/graph.py +30 -133
- data/vendor/depot_tools/third_party/pylint/gui.py +2 -2
- data/vendor/depot_tools/third_party/pylint/interfaces.py +21 -3
- data/vendor/depot_tools/third_party/pylint/lint.py +123 -140
- data/vendor/depot_tools/third_party/pylint/pyreverse/diadefslib.py +10 -13
- data/vendor/depot_tools/third_party/pylint/pyreverse/diagrams.py +15 -4
- data/vendor/depot_tools/third_party/pylint/pyreverse/inspector.py +372 -0
- data/vendor/depot_tools/third_party/pylint/pyreverse/main.py +30 -7
- data/vendor/depot_tools/third_party/pylint/pyreverse/utils.py +80 -2
- data/vendor/depot_tools/third_party/{logilab/common → pylint/pyreverse}/vcgutils.py +19 -37
- data/vendor/depot_tools/third_party/pylint/pyreverse/writer.py +3 -4
- data/vendor/depot_tools/third_party/pylint/reporters/__init__.py +34 -18
- data/vendor/depot_tools/third_party/pylint/reporters/guireporter.py +1 -1
- data/vendor/depot_tools/third_party/pylint/reporters/html.py +10 -3
- data/vendor/depot_tools/third_party/pylint/reporters/json.py +10 -4
- data/vendor/depot_tools/third_party/pylint/reporters/text.py +94 -3
- data/vendor/depot_tools/third_party/pylint/reporters/ureports/__init__.py +106 -0
- data/vendor/depot_tools/third_party/{logilab/common → pylint/reporters}/ureports/html_writer.py +17 -57
- data/vendor/depot_tools/third_party/{logilab/common → pylint/reporters}/ureports/nodes.py +52 -74
- data/vendor/depot_tools/third_party/{logilab/common → pylint/reporters}/ureports/text_writer.py +14 -60
- data/vendor/depot_tools/third_party/pylint/testutils.py +22 -20
- data/vendor/depot_tools/third_party/pylint/utils.py +268 -44
- data/vendor/depot_tools/third_party/repo/progress.py +42 -0
- data/vendor/depot_tools/update_depot_tools +1 -1
- data/vendor/depot_tools/upload_metrics.py +25 -0
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +45 -15
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +71 -24
- data/vendor/depot_tools/yapf +1 -1
- data/vendor/depot_tools/yapf.bat +1 -1
- metadata +92 -77
- data/vendor/depot_tools/git-crsync +0 -3
- data/vendor/depot_tools/infra/config/cq.cfg +0 -32
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/apply_gerrit_ref.json +0 -29
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/apply_gerrit_ref_custom.json +0 -29
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/buildbot.json +0 -105
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/shallow.json +0 -195
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle_deprecated.json +0 -248
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8.json +0 -248
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name_no_patch.json +0 -105
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/apply_gerrit.py +0 -33
- data/vendor/depot_tools/third_party/logilab/astroid/brain/py2pytest.py +0 -31
- data/vendor/depot_tools/third_party/logilab/astroid/brain/py2qt4.py +0 -22
- data/vendor/depot_tools/third_party/logilab/astroid/brain/py2stdlib.py +0 -334
- data/vendor/depot_tools/third_party/logilab/astroid/inspector.py +0 -273
- data/vendor/depot_tools/third_party/logilab/astroid/utils.py +0 -239
- data/vendor/depot_tools/third_party/logilab/common/LICENSE.txt +0 -339
- data/vendor/depot_tools/third_party/logilab/common/README.chromium +0 -11
- data/vendor/depot_tools/third_party/logilab/common/__init__.py +0 -175
- data/vendor/depot_tools/third_party/logilab/common/__pkginfo__.py +0 -57
- data/vendor/depot_tools/third_party/logilab/common/cache.py +0 -114
- data/vendor/depot_tools/third_party/logilab/common/changelog.py +0 -238
- data/vendor/depot_tools/third_party/logilab/common/clcommands.py +0 -334
- data/vendor/depot_tools/third_party/logilab/common/cli.py +0 -211
- data/vendor/depot_tools/third_party/logilab/common/compat.py +0 -78
- data/vendor/depot_tools/third_party/logilab/common/configuration.py +0 -1105
- data/vendor/depot_tools/third_party/logilab/common/contexts.py +0 -5
- data/vendor/depot_tools/third_party/logilab/common/corbautils.py +0 -117
- data/vendor/depot_tools/third_party/logilab/common/daemon.py +0 -101
- data/vendor/depot_tools/third_party/logilab/common/date.py +0 -335
- data/vendor/depot_tools/third_party/logilab/common/dbf.py +0 -231
- data/vendor/depot_tools/third_party/logilab/common/debugger.py +0 -214
- data/vendor/depot_tools/third_party/logilab/common/decorators.py +0 -281
- data/vendor/depot_tools/third_party/logilab/common/deprecation.py +0 -189
- data/vendor/depot_tools/third_party/logilab/common/fileutils.py +0 -404
- data/vendor/depot_tools/third_party/logilab/common/interface.py +0 -71
- data/vendor/depot_tools/third_party/logilab/common/logging_ext.py +0 -195
- data/vendor/depot_tools/third_party/logilab/common/modutils.py +0 -702
- data/vendor/depot_tools/third_party/logilab/common/optik_ext.py +0 -392
- data/vendor/depot_tools/third_party/logilab/common/optparser.py +0 -92
- data/vendor/depot_tools/third_party/logilab/common/proc.py +0 -277
- data/vendor/depot_tools/third_party/logilab/common/pyro_ext.py +0 -180
- data/vendor/depot_tools/third_party/logilab/common/pytest.py +0 -1199
- data/vendor/depot_tools/third_party/logilab/common/registry.py +0 -1119
- data/vendor/depot_tools/third_party/logilab/common/shellutils.py +0 -462
- data/vendor/depot_tools/third_party/logilab/common/sphinx_ext.py +0 -87
- data/vendor/depot_tools/third_party/logilab/common/sphinxutils.py +0 -122
- data/vendor/depot_tools/third_party/logilab/common/table.py +0 -929
- data/vendor/depot_tools/third_party/logilab/common/tasksqueue.py +0 -101
- data/vendor/depot_tools/third_party/logilab/common/testlib.py +0 -1392
- data/vendor/depot_tools/third_party/logilab/common/textutils.py +0 -537
- data/vendor/depot_tools/third_party/logilab/common/tree.py +0 -369
- data/vendor/depot_tools/third_party/logilab/common/umessage.py +0 -194
- data/vendor/depot_tools/third_party/logilab/common/ureports/__init__.py +0 -172
- data/vendor/depot_tools/third_party/logilab/common/ureports/docbook_writer.py +0 -140
- data/vendor/depot_tools/third_party/logilab/common/urllib2ext.py +0 -89
- data/vendor/depot_tools/third_party/logilab/common/visitor.py +0 -109
- data/vendor/depot_tools/third_party/logilab/common/xmlrpcutils.py +0 -131
- data/vendor/depot_tools/third_party/logilab/common/xmlutils.py +0 -61
@@ -0,0 +1,142 @@
|
|
1
|
+
# Copyright 2019 The Chromium Authors. All rights reserved.
|
2
|
+
# Use of this source code is governed by a BSD-style license that can be
|
3
|
+
# found in the LICENSE file.
|
4
|
+
|
5
|
+
# This file is imported by various thin wrappers (around gn, clang-format, ...),
|
6
|
+
# so it's meant to import very quickly. To keep it that way don't add more
|
7
|
+
# code, and even more importantly don't add more toplevel import statements,
|
8
|
+
# particularly for modules that are not builtin (see sys.builtin_modules_names,
|
9
|
+
# os isn't built in, but it's essential to this file).
|
10
|
+
|
11
|
+
from __future__ import print_function
|
12
|
+
|
13
|
+
import os
|
14
|
+
import sys
|
15
|
+
|
16
|
+
|
17
|
+
def FindGclientRoot(from_dir, filename='.gclient'):
|
18
|
+
"""Tries to find the gclient root."""
|
19
|
+
real_from_dir = os.path.realpath(from_dir)
|
20
|
+
path = real_from_dir
|
21
|
+
while not os.path.exists(os.path.join(path, filename)):
|
22
|
+
split_path = os.path.split(path)
|
23
|
+
if not split_path[1]:
|
24
|
+
return None
|
25
|
+
path = split_path[0]
|
26
|
+
|
27
|
+
# If we did not find the file in the current directory, make sure we are in a
|
28
|
+
# sub directory that is controlled by this configuration.
|
29
|
+
if path != real_from_dir:
|
30
|
+
entries_filename = os.path.join(path, filename + '_entries')
|
31
|
+
if not os.path.exists(entries_filename):
|
32
|
+
# If .gclient_entries does not exist, a previous call to gclient sync
|
33
|
+
# might have failed. In that case, we cannot verify that the .gclient
|
34
|
+
# is the one we want to use. In order to not to cause too much trouble,
|
35
|
+
# just issue a warning and return the path anyway.
|
36
|
+
print(
|
37
|
+
"%s missing, %s file in parent directory %s might not be the file "
|
38
|
+
"you want to use." % (entries_filename, filename, path),
|
39
|
+
file=sys.stderr)
|
40
|
+
return path
|
41
|
+
scope = {}
|
42
|
+
try:
|
43
|
+
import io
|
44
|
+
with io.open(entries_filename, encoding='utf-8') as f:
|
45
|
+
exec(f.read(), scope)
|
46
|
+
except SyntaxError as e:
|
47
|
+
SyntaxErrorToError(filename, e)
|
48
|
+
all_directories = scope['entries'].keys()
|
49
|
+
path_to_check = real_from_dir[len(path)+1:]
|
50
|
+
while path_to_check:
|
51
|
+
if path_to_check in all_directories:
|
52
|
+
return path
|
53
|
+
path_to_check = os.path.dirname(path_to_check)
|
54
|
+
return None
|
55
|
+
|
56
|
+
import logging
|
57
|
+
logging.info('Found gclient root at ' + path)
|
58
|
+
return path
|
59
|
+
|
60
|
+
|
61
|
+
def GetPrimarySolutionPath():
|
62
|
+
"""Returns the full path to the primary solution. (gclient_root + src)"""
|
63
|
+
|
64
|
+
gclient_root = FindGclientRoot(os.getcwd())
|
65
|
+
if not gclient_root:
|
66
|
+
# Some projects might not use .gclient. Try to see whether we're in a git
|
67
|
+
# checkout.
|
68
|
+
top_dir = [os.getcwd()]
|
69
|
+
def filter_fn(line):
|
70
|
+
repo_root_path = os.path.normpath(line.rstrip('\n'))
|
71
|
+
if os.path.exists(repo_root_path):
|
72
|
+
top_dir[0] = repo_root_path
|
73
|
+
try:
|
74
|
+
CheckCallAndFilter(["git", "rev-parse", "--show-toplevel"],
|
75
|
+
print_stdout=False, filter_fn=filter_fn)
|
76
|
+
except Exception:
|
77
|
+
pass
|
78
|
+
top_dir = top_dir[0]
|
79
|
+
if os.path.exists(os.path.join(top_dir, 'buildtools')):
|
80
|
+
return top_dir
|
81
|
+
return None
|
82
|
+
|
83
|
+
# Some projects' top directory is not named 'src'.
|
84
|
+
source_dir_name = GetGClientPrimarySolutionName(gclient_root) or 'src'
|
85
|
+
return os.path.join(gclient_root, source_dir_name)
|
86
|
+
|
87
|
+
|
88
|
+
def GetBuildtoolsPath():
|
89
|
+
"""Returns the full path to the buildtools directory.
|
90
|
+
This is based on the root of the checkout containing the current directory."""
|
91
|
+
|
92
|
+
# Overriding the build tools path by environment is highly unsupported and may
|
93
|
+
# break without warning. Do not rely on this for anything important.
|
94
|
+
override = os.environ.get('CHROMIUM_BUILDTOOLS_PATH')
|
95
|
+
if override is not None:
|
96
|
+
return override
|
97
|
+
|
98
|
+
primary_solution = GetPrimarySolutionPath()
|
99
|
+
if not primary_solution:
|
100
|
+
return None
|
101
|
+
buildtools_path = os.path.join(primary_solution, 'buildtools')
|
102
|
+
if not os.path.exists(buildtools_path):
|
103
|
+
# Buildtools may be in the gclient root.
|
104
|
+
gclient_root = FindGclientRoot(os.getcwd())
|
105
|
+
buildtools_path = os.path.join(gclient_root, 'buildtools')
|
106
|
+
return buildtools_path
|
107
|
+
|
108
|
+
|
109
|
+
def GetBuildtoolsPlatformBinaryPath():
|
110
|
+
"""Returns the full path to the binary directory for the current platform."""
|
111
|
+
buildtools_path = GetBuildtoolsPath()
|
112
|
+
if not buildtools_path:
|
113
|
+
return None
|
114
|
+
|
115
|
+
if sys.platform.startswith(('cygwin', 'win')):
|
116
|
+
subdir = 'win'
|
117
|
+
elif sys.platform == 'darwin':
|
118
|
+
subdir = 'mac'
|
119
|
+
elif sys.platform.startswith('linux'):
|
120
|
+
subdir = 'linux64'
|
121
|
+
else:
|
122
|
+
raise Error('Unknown platform: ' + sys.platform)
|
123
|
+
return os.path.join(buildtools_path, subdir)
|
124
|
+
|
125
|
+
|
126
|
+
def GetExeSuffix():
|
127
|
+
"""Returns '' or '.exe' depending on how executables work on this platform."""
|
128
|
+
if sys.platform.startswith(('cygwin', 'win')):
|
129
|
+
return '.exe'
|
130
|
+
return ''
|
131
|
+
|
132
|
+
|
133
|
+
def GetGClientPrimarySolutionName(gclient_root_dir_path):
|
134
|
+
"""Returns the name of the primary solution in the .gclient file specified."""
|
135
|
+
gclient_config_file = os.path.join(gclient_root_dir_path, '.gclient')
|
136
|
+
env = {}
|
137
|
+
exec(compile(open(gclient_config_file).read(), gclient_config_file, 'exec'),
|
138
|
+
env)
|
139
|
+
solutions = env.get('solutions', [])
|
140
|
+
if solutions:
|
141
|
+
return solutions[0].get('name')
|
142
|
+
return None
|
@@ -18,7 +18,11 @@ import sys
|
|
18
18
|
import tempfile
|
19
19
|
import threading
|
20
20
|
import traceback
|
21
|
-
|
21
|
+
|
22
|
+
try:
|
23
|
+
import urlparse
|
24
|
+
except ImportError: # For Py3 compatibility
|
25
|
+
import urllib.parse as urlparse
|
22
26
|
|
23
27
|
import download_from_google_storage
|
24
28
|
import gclient_utils
|
@@ -92,7 +96,6 @@ class SCMWrapper(object):
|
|
92
96
|
|
93
97
|
This is the abstraction layer to bind to different SCM.
|
94
98
|
"""
|
95
|
-
|
96
99
|
def __init__(self, url=None, root_dir=None, relpath=None, out_fh=None,
|
97
100
|
out_cb=None, print_outbuf=False):
|
98
101
|
self.url = url
|
@@ -138,7 +141,7 @@ class SCMWrapper(object):
|
|
138
141
|
return log.splitlines()[0].split(' ', 1)[1]
|
139
142
|
|
140
143
|
def GetCacheMirror(self):
|
141
|
-
if
|
144
|
+
if getattr(self, 'cache_dir', None):
|
142
145
|
url, _ = gclient_utils.SplitUrlRevision(self.url)
|
143
146
|
return git_cache.Mirror(url)
|
144
147
|
return None
|
@@ -210,11 +213,17 @@ class GitWrapper(SCMWrapper):
|
|
210
213
|
name = 'git'
|
211
214
|
remote = 'origin'
|
212
215
|
|
213
|
-
|
216
|
+
@property
|
217
|
+
def cache_dir(self):
|
218
|
+
try:
|
219
|
+
return git_cache.Mirror.GetCachePath()
|
220
|
+
except RuntimeError:
|
221
|
+
return None
|
214
222
|
|
215
223
|
def __init__(self, url=None, *args, **kwargs):
|
216
224
|
"""Removes 'git+' fake prefix from git URL."""
|
217
|
-
if url.startswith('git+http://') or
|
225
|
+
if url and (url.startswith('git+http://') or
|
226
|
+
url.startswith('git+https://')):
|
218
227
|
url = url[4:]
|
219
228
|
SCMWrapper.__init__(self, url, *args, **kwargs)
|
220
229
|
filter_kwargs = { 'time_throttle': 1, 'out_fh': self.out_fh }
|
@@ -300,14 +309,15 @@ class GitWrapper(SCMWrapper):
|
|
300
309
|
|
301
310
|
def _FetchAndReset(self, revision, file_list, options):
|
302
311
|
"""Equivalent to git fetch; git reset."""
|
303
|
-
self.
|
312
|
+
self._SetFetchConfig(options)
|
304
313
|
|
305
314
|
self._Fetch(options, prune=True, quiet=options.verbose)
|
306
315
|
self._Scrub(revision, options)
|
307
316
|
if file_list is not None:
|
308
317
|
files = self._Capture(
|
309
318
|
['-c', 'core.quotePath=false', 'ls-files']).splitlines()
|
310
|
-
file_list.extend(
|
319
|
+
file_list.extend(
|
320
|
+
[os.path.join(self.checkout_path, f.decode()) for f in files])
|
311
321
|
|
312
322
|
def _DisableHooks(self):
|
313
323
|
hook_dir = os.path.join(self.checkout_path, '.git', 'hooks')
|
@@ -340,29 +350,127 @@ class GitWrapper(SCMWrapper):
|
|
340
350
|
self.Print('FAILED to break lock: %s: %s' % (to_break, ex))
|
341
351
|
raise
|
342
352
|
|
343
|
-
|
353
|
+
# TODO(ehmaldonado): Remove after bot_update is modified to pass the patch's
|
354
|
+
# branch.
|
355
|
+
def _GetTargetBranchForCommit(self, commit):
|
356
|
+
"""Get the remote branch a commit is part of."""
|
357
|
+
_WELL_KNOWN_BRANCHES = [
|
358
|
+
'refs/remotes/origin/master',
|
359
|
+
'refs/remotes/origin/infra/config',
|
360
|
+
'refs/remotes/origin/lkgr',
|
361
|
+
]
|
362
|
+
for branch in _WELL_KNOWN_BRANCHES:
|
363
|
+
if scm.GIT.IsAncestor(self.checkout_path, commit, branch):
|
364
|
+
return branch
|
365
|
+
remote_refs = self._Capture(
|
366
|
+
['for-each-ref', 'refs/remotes/%s' % self.remote,
|
367
|
+
'--format=%(refname)']).splitlines()
|
368
|
+
for ref in sorted(remote_refs, reverse=True):
|
369
|
+
if scm.GIT.IsAncestor(self.checkout_path, commit, ref):
|
370
|
+
return ref
|
371
|
+
self.Print('Failed to find a remote ref that contains %s. '
|
372
|
+
'Candidate refs were %s.' % (commit, remote_refs))
|
373
|
+
# Fallback to the commit we got.
|
374
|
+
# This means that apply_path_ref will try to find the merge-base between the
|
375
|
+
# patch and the commit (which is most likely the commit) and cherry-pick
|
376
|
+
# everything in between.
|
377
|
+
return commit
|
378
|
+
|
379
|
+
def apply_patch_ref(self, patch_repo, patch_ref, target_branch, options,
|
380
|
+
file_list):
|
381
|
+
"""Apply a patch on top of the revision we're synced at.
|
382
|
+
|
383
|
+
The patch ref is given by |patch_repo|@|patch_ref|, and the current revision
|
384
|
+
is |base_rev|.
|
385
|
+
We also need the |target_branch| that the patch was uploaded against. We use
|
386
|
+
it to find a merge base between |patch_rev| and |base_rev|, so we can find
|
387
|
+
what commits constitute the patch:
|
388
|
+
|
389
|
+
Graphically, it looks like this:
|
390
|
+
|
391
|
+
... -> merge_base -> [possibly already landed commits] -> target_branch
|
392
|
+
\
|
393
|
+
-> [possibly not yet landed dependent CLs] -> patch_rev
|
394
|
+
|
395
|
+
Next, we apply the commits |merge_base..patch_rev| on top of whatever is
|
396
|
+
currently checked out, denoted |base_rev|. Typically, it'd be a revision
|
397
|
+
from |target_branch|, but this is not required.
|
398
|
+
|
399
|
+
Graphically, we cherry pick |merge_base..patch_rev| on top of |base_rev|:
|
400
|
+
|
401
|
+
... -> base_rev -> [possibly not yet landed dependent CLs] -> patch_rev
|
402
|
+
|
403
|
+
After application, if |options.reset_patch_ref| is specified, we soft reset
|
404
|
+
the just cherry-picked changes, keeping them in git index only.
|
405
|
+
|
406
|
+
Args:
|
407
|
+
patch_repo: The patch origin. e.g. 'https://foo.googlesource.com/bar'
|
408
|
+
patch_ref: The ref to the patch. e.g. 'refs/changes/1234/34/1'.
|
409
|
+
target_branch: The branch the patch was uploaded against.
|
410
|
+
e.g. 'refs/heads/master' or 'refs/heads/infra/config'.
|
411
|
+
options: The options passed to gclient.
|
412
|
+
file_list: A list where modified files will be appended.
|
413
|
+
"""
|
414
|
+
|
415
|
+
# Abort any cherry-picks in progress.
|
416
|
+
try:
|
417
|
+
self._Capture(['cherry-pick', '--abort'])
|
418
|
+
except subprocess2.CalledProcessError:
|
419
|
+
pass
|
420
|
+
|
344
421
|
base_rev = self._Capture(['rev-parse', 'HEAD'])
|
422
|
+
target_branch = target_branch or self._GetTargetBranchForCommit(base_rev)
|
345
423
|
self.Print('===Applying patch ref===')
|
346
|
-
self.Print('
|
347
|
-
|
424
|
+
self.Print('Patch ref is %r @ %r. Target branch for patch is %r. '
|
425
|
+
'Current HEAD is %r. Current dir is %r' % (
|
426
|
+
patch_repo, patch_ref, target_branch, base_rev,
|
427
|
+
self.checkout_path))
|
348
428
|
self._Capture(['reset', '--hard'])
|
349
429
|
self._Capture(['fetch', patch_repo, patch_ref])
|
350
|
-
|
351
|
-
|
352
|
-
|
430
|
+
patch_rev = self._Capture(['rev-parse', 'FETCH_HEAD'])
|
431
|
+
|
432
|
+
try:
|
433
|
+
if not options.rebase_patch_ref:
|
434
|
+
self._Capture(['checkout', patch_rev])
|
435
|
+
else:
|
436
|
+
# Find the merge-base between the branch_rev and patch_rev to find out
|
437
|
+
# the changes we need to cherry-pick on top of base_rev.
|
438
|
+
merge_base = self._Capture(['merge-base', target_branch, patch_rev])
|
439
|
+
self.Print('Merge base of %s and %s is %s' % (
|
440
|
+
target_branch, patch_rev, merge_base))
|
441
|
+
if merge_base == patch_rev:
|
442
|
+
# If the merge-base is patch_rev, it means patch_rev is already part
|
443
|
+
# of the history, so just check it out.
|
444
|
+
self._Capture(['checkout', patch_rev])
|
445
|
+
else:
|
446
|
+
# If a change was uploaded on top of another change, which has already
|
447
|
+
# landed, one of the commits in the cherry-pick range will be
|
448
|
+
# redundant, since it has already landed and its changes incorporated
|
449
|
+
# in the tree.
|
450
|
+
# We pass '--keep-redundant-commits' to ignore those changes.
|
451
|
+
self._Capture(['cherry-pick', merge_base + '..' + patch_rev,
|
452
|
+
'--keep-redundant-commits'])
|
353
453
|
|
354
|
-
|
454
|
+
if file_list is not None:
|
455
|
+
file_list.extend(self._GetDiffFilenames(base_rev))
|
456
|
+
|
457
|
+
except subprocess2.CalledProcessError as e:
|
458
|
+
self.Print('Failed to apply patch.')
|
459
|
+
self.Print('Patch ref is %r @ %r. Target branch for patch is %r. '
|
460
|
+
'Current HEAD is %r. Current dir is %r' % (
|
461
|
+
patch_repo, patch_ref, target_branch, base_rev,
|
462
|
+
self.checkout_path))
|
463
|
+
self.Print('git returned non-zero exit status %s:\n%s' % (
|
464
|
+
e.returncode, e.stderr))
|
465
|
+
# Print the current status so that developers know what changes caused the
|
466
|
+
# patch failure, since git cherry-pick doesn't show that information.
|
467
|
+
self.Print(self._Capture(['status']))
|
355
468
|
try:
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
patch_repo, patch_ref, base_rev, self.checkout_path))
|
362
|
-
self.Print('git returned non-zero exit status %s:\n%s' % (
|
363
|
-
e.returncode, e.stderr))
|
364
|
-
self._Capture(['rebase', '--abort'])
|
365
|
-
raise
|
469
|
+
self._Capture(['cherry-pick', '--abort'])
|
470
|
+
except subprocess2.CalledProcessError:
|
471
|
+
pass
|
472
|
+
raise
|
473
|
+
|
366
474
|
if options.reset_patch_ref:
|
367
475
|
self._Capture(['reset', '--soft', base_rev])
|
368
476
|
|
@@ -405,6 +513,14 @@ class GitWrapper(SCMWrapper):
|
|
405
513
|
verbose = ['--verbose']
|
406
514
|
printed_path = True
|
407
515
|
|
516
|
+
revision_ref = revision
|
517
|
+
if ':' in revision:
|
518
|
+
revision_ref, _, revision = revision.partition(':')
|
519
|
+
|
520
|
+
mirror = self._GetMirror(url, options, revision_ref)
|
521
|
+
if mirror:
|
522
|
+
url = mirror.mirror_path
|
523
|
+
|
408
524
|
remote_ref = scm.GIT.RefToRemoteRef(revision, self.remote)
|
409
525
|
if remote_ref:
|
410
526
|
# Rewrite remote refs to their local equivalents.
|
@@ -418,10 +534,6 @@ class GitWrapper(SCMWrapper):
|
|
418
534
|
# hash is also a tag, only make a distinction at checkout
|
419
535
|
rev_type = "hash"
|
420
536
|
|
421
|
-
mirror = self._GetMirror(url, options)
|
422
|
-
if mirror:
|
423
|
-
url = mirror.mirror_path
|
424
|
-
|
425
537
|
# If we are going to introduce a new project, there is a possibility that
|
426
538
|
# we are syncing back to a state where the project was originally a
|
427
539
|
# sub-project rolled by DEPS (realistic case: crossing the Blink merge point
|
@@ -448,16 +560,24 @@ class GitWrapper(SCMWrapper):
|
|
448
560
|
self._Clone(revision, url, options)
|
449
561
|
if file_list is not None:
|
450
562
|
files = self._Capture(
|
451
|
-
|
452
|
-
file_list.extend(
|
563
|
+
['-c', 'core.quotePath=false', 'ls-files']).splitlines()
|
564
|
+
file_list.extend(
|
565
|
+
[os.path.join(self.checkout_path, f.decode()) for f in files])
|
566
|
+
if mirror:
|
567
|
+
self._Capture(
|
568
|
+
['remote', 'set-url', '--push', 'origin', mirror.url])
|
453
569
|
if not verbose:
|
454
570
|
# Make the output a little prettier. It's nice to have some whitespace
|
455
571
|
# between projects when cloning.
|
456
572
|
self.Print('')
|
457
573
|
return self._Capture(['rev-parse', '--verify', 'HEAD'])
|
458
574
|
|
575
|
+
if mirror:
|
576
|
+
self._Capture(
|
577
|
+
['remote', 'set-url', '--push', 'origin', mirror.url])
|
578
|
+
|
459
579
|
if not managed:
|
460
|
-
self.
|
580
|
+
self._SetFetchConfig(options)
|
461
581
|
self.Print('________ unmanaged solution; skipping %s' % self.relpath)
|
462
582
|
return self._Capture(['rev-parse', '--verify', 'HEAD'])
|
463
583
|
|
@@ -475,8 +595,7 @@ class GitWrapper(SCMWrapper):
|
|
475
595
|
# Skip url auto-correction if remote.origin.gclient-auto-fix-url is set.
|
476
596
|
# This allows devs to use experimental repos which have a different url
|
477
597
|
# but whose branch(s) are the same as official repos.
|
478
|
-
if (current_url.rstrip('/') != url.rstrip('/') and
|
479
|
-
url != 'git://foo' and
|
598
|
+
if (current_url.rstrip(b'/') != url.rstrip('/') and url != 'git://foo' and
|
480
599
|
subprocess2.capture(
|
481
600
|
['git', 'config', 'remote.%s.gclient-auto-fix-url' % self.remote],
|
482
601
|
cwd=self.checkout_path).strip() != 'False'):
|
@@ -542,14 +661,19 @@ class GitWrapper(SCMWrapper):
|
|
542
661
|
else:
|
543
662
|
raise gclient_utils.Error('Invalid Upstream: %s' % upstream_branch)
|
544
663
|
|
664
|
+
self._SetFetchConfig(options)
|
665
|
+
|
666
|
+
# Fetch upstream if we don't already have |revision|.
|
545
667
|
if not scm.GIT.IsValidRevision(self.checkout_path, revision, sha_only=True):
|
546
|
-
|
547
|
-
remote_output = scm.GIT.Capture(['remote'] + verbose + ['update'],
|
548
|
-
cwd=self.checkout_path)
|
549
|
-
if verbose:
|
550
|
-
self.Print(remote_output)
|
668
|
+
self._Fetch(options, prune=options.force)
|
551
669
|
|
552
|
-
|
670
|
+
if not scm.GIT.IsValidRevision(self.checkout_path, revision,
|
671
|
+
sha_only=True):
|
672
|
+
# Update the remotes first so we have all the refs.
|
673
|
+
remote_output = scm.GIT.Capture(['remote'] + verbose + ['update'],
|
674
|
+
cwd=self.checkout_path)
|
675
|
+
if verbose:
|
676
|
+
self.Print(remote_output)
|
553
677
|
|
554
678
|
revision = self._AutoFetchRef(options, revision)
|
555
679
|
|
@@ -830,9 +954,9 @@ class GitWrapper(SCMWrapper):
|
|
830
954
|
return os.path.join(self._root_dir,
|
831
955
|
'old_' + self.relpath.replace(os.sep, '_')) + '.git'
|
832
956
|
|
833
|
-
def _GetMirror(self, url, options):
|
957
|
+
def _GetMirror(self, url, options, revision_ref=None):
|
834
958
|
"""Get a git_cache.Mirror object for the argument url."""
|
835
|
-
if not
|
959
|
+
if not self.cache_dir:
|
836
960
|
return None
|
837
961
|
mirror_kwargs = {
|
838
962
|
'print_func': self.filter,
|
@@ -840,8 +964,12 @@ class GitWrapper(SCMWrapper):
|
|
840
964
|
}
|
841
965
|
if hasattr(options, 'with_branch_heads') and options.with_branch_heads:
|
842
966
|
mirror_kwargs['refs'].append('refs/branch-heads/*')
|
967
|
+
elif revision_ref and revision_ref.startswith('refs/branch-heads/'):
|
968
|
+
mirror_kwargs['refs'].append(revision_ref)
|
843
969
|
if hasattr(options, 'with_tags') and options.with_tags:
|
844
970
|
mirror_kwargs['refs'].append('refs/tags/*')
|
971
|
+
elif revision_ref and revision_ref.startswith('refs/tags/'):
|
972
|
+
mirror_kwargs['refs'].append(revision_ref)
|
845
973
|
return git_cache.Mirror(url, **mirror_kwargs)
|
846
974
|
|
847
975
|
def _UpdateMirrorIfNotContains(self, mirror, options, rev_type, revision):
|
@@ -936,7 +1064,8 @@ class GitWrapper(SCMWrapper):
|
|
936
1064
|
gclient_utils.rmtree(tmp_dir)
|
937
1065
|
if template_dir:
|
938
1066
|
gclient_utils.rmtree(template_dir)
|
939
|
-
self.
|
1067
|
+
self._SetFetchConfig(options)
|
1068
|
+
self._Fetch(options, prune=options.force)
|
940
1069
|
revision = self._AutoFetchRef(options, revision)
|
941
1070
|
remote_ref = scm.GIT.RefToRemoteRef(revision, self.remote)
|
942
1071
|
self._Checkout(options, ''.join(remote_ref or revision), quiet=True)
|
@@ -996,7 +1125,7 @@ class GitWrapper(SCMWrapper):
|
|
996
1125
|
|
997
1126
|
try:
|
998
1127
|
rebase_output = scm.GIT.Capture(rebase_cmd, cwd=self.checkout_path)
|
999
|
-
except subprocess2.CalledProcessError
|
1128
|
+
except subprocess2.CalledProcessError as e:
|
1000
1129
|
if (re.match(r'cannot rebase: you have unstaged changes', e.stderr) or
|
1001
1130
|
re.match(r'cannot rebase: your index contains uncommitted changes',
|
1002
1131
|
e.stderr)):
|
@@ -1170,6 +1299,19 @@ class GitWrapper(SCMWrapper):
|
|
1170
1299
|
def _Fetch(self, options, remote=None, prune=False, quiet=False,
|
1171
1300
|
refspec=None):
|
1172
1301
|
cfg = gclient_utils.DefaultIndexPackConfig(self.url)
|
1302
|
+
# When updating, the ref is modified to be a remote ref .
|
1303
|
+
# (e.g. refs/heads/NAME becomes refs/remotes/REMOTE/NAME).
|
1304
|
+
# Try to reverse that mapping.
|
1305
|
+
original_ref = scm.GIT.RemoteRefToRef(refspec, self.remote)
|
1306
|
+
if original_ref:
|
1307
|
+
refspec = original_ref + ':' + refspec
|
1308
|
+
# When a mirror is configured, it only fetches
|
1309
|
+
# refs/{heads,branch-heads,tags}/*.
|
1310
|
+
# If asked to fetch other refs, we must fetch those directly from the
|
1311
|
+
# repository, and not from the mirror.
|
1312
|
+
if not original_ref.startswith(
|
1313
|
+
('refs/heads/', 'refs/branch-heads/', 'refs/tags/')):
|
1314
|
+
remote, _ = gclient_utils.SplitUrlRevision(self.url)
|
1173
1315
|
fetch_cmd = cfg + [
|
1174
1316
|
'fetch',
|
1175
1317
|
remote or self.remote,
|
@@ -1188,24 +1330,30 @@ class GitWrapper(SCMWrapper):
|
|
1188
1330
|
# Return the revision that was fetched; this will be stored in 'FETCH_HEAD'
|
1189
1331
|
return self._Capture(['rev-parse', '--verify', 'FETCH_HEAD'])
|
1190
1332
|
|
1191
|
-
def
|
1333
|
+
def _SetFetchConfig(self, options):
|
1192
1334
|
"""Adds, and optionally fetches, "branch-heads" and "tags" refspecs
|
1193
1335
|
if requested."""
|
1194
|
-
|
1336
|
+
if options.force or options.reset:
|
1337
|
+
try:
|
1338
|
+
self._Run(['config', '--unset-all', 'remote.%s.fetch' % self.remote],
|
1339
|
+
options)
|
1340
|
+
self._Run(['config', 'remote.%s.fetch' % self.remote,
|
1341
|
+
'+refs/heads/*:refs/remotes/%s/*' % self.remote], options)
|
1342
|
+
except subprocess2.CalledProcessError as e:
|
1343
|
+
# If exit code was 5, it means we attempted to unset a config that
|
1344
|
+
# didn't exist. Ignore it.
|
1345
|
+
if e.returncode != 5:
|
1346
|
+
raise
|
1195
1347
|
if hasattr(options, 'with_branch_heads') and options.with_branch_heads:
|
1196
1348
|
config_cmd = ['config', 'remote.%s.fetch' % self.remote,
|
1197
1349
|
'+refs/branch-heads/*:refs/remotes/branch-heads/*',
|
1198
1350
|
'^\\+refs/branch-heads/\\*:.*$']
|
1199
1351
|
self._Run(config_cmd, options)
|
1200
|
-
need_fetch = True
|
1201
1352
|
if hasattr(options, 'with_tags') and options.with_tags:
|
1202
1353
|
config_cmd = ['config', 'remote.%s.fetch' % self.remote,
|
1203
1354
|
'+refs/tags/*:refs/tags/*',
|
1204
1355
|
'^\\+refs/tags/\\*:.*$']
|
1205
1356
|
self._Run(config_cmd, options)
|
1206
|
-
need_fetch = True
|
1207
|
-
if fetch and need_fetch:
|
1208
|
-
self._Fetch(options, prune=options.force)
|
1209
1357
|
|
1210
1358
|
def _AutoFetchRef(self, options, revision):
|
1211
1359
|
"""Attempts to fetch |revision| if not available in local repo.
|
@@ -1318,8 +1466,9 @@ class CipdRoot(object):
|
|
1318
1466
|
try:
|
1319
1467
|
ensure_file = None
|
1320
1468
|
with tempfile.NamedTemporaryFile(
|
1321
|
-
suffix='.ensure', delete=False) as ensure_file:
|
1322
|
-
|
1469
|
+
suffix='.ensure', delete=False, mode='w') as ensure_file:
|
1470
|
+
ensure_file.write('$ParanoidMode CheckPresence\n\n')
|
1471
|
+
for subdir, packages in sorted(self._packages_by_subdir.items()):
|
1323
1472
|
ensure_file.write('@Subdir %s\n' % subdir)
|
1324
1473
|
for package in sorted(packages, key=lambda p: p.name):
|
1325
1474
|
ensure_file.write('%s %s\n' % (package.name, package.version))
|