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,303 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
|
3
|
+
# Use of this source code is governed by a BSD-style license that can be
|
4
|
+
# found in the LICENSE file.
|
5
|
+
|
6
|
+
from __future__ import print_function
|
7
|
+
|
8
|
+
import re
|
9
|
+
import scm
|
10
|
+
import subprocess2
|
11
|
+
import sys
|
12
|
+
|
13
|
+
try:
|
14
|
+
import urlparse
|
15
|
+
except ImportError: # For Py3 compatibility
|
16
|
+
import urllib.parse as urlparse
|
17
|
+
|
18
|
+
|
19
|
+
# Current version of metrics recording.
|
20
|
+
# When we add new metrics, the version number will be increased, we display the
|
21
|
+
# user what has changed, and ask the user to agree again.
|
22
|
+
CURRENT_VERSION = 1
|
23
|
+
|
24
|
+
APP_URL = 'https://cit-cli-metrics.appspot.com'
|
25
|
+
|
26
|
+
def get_notice_countdown_header(countdown):
|
27
|
+
if countdown == 0:
|
28
|
+
yield ' METRICS COLLECTION IS TAKING PLACE'
|
29
|
+
else:
|
30
|
+
yield ' METRICS COLLECTION WILL START IN %d EXECUTIONS' % countdown
|
31
|
+
|
32
|
+
def get_notice_version_change_header():
|
33
|
+
yield ' WE ARE COLLECTING ADDITIONAL METRICS'
|
34
|
+
yield ''
|
35
|
+
yield ' Please review the changes and opt-in again.'
|
36
|
+
|
37
|
+
def get_notice_footer():
|
38
|
+
yield 'To suppress this message opt in or out using:'
|
39
|
+
yield '$ gclient metrics [--opt-in] [--opt-out]'
|
40
|
+
yield 'For more information please see metrics.README.md'
|
41
|
+
yield 'in your depot_tools checkout or visit'
|
42
|
+
yield 'https://goo.gl/yNpRDV.'
|
43
|
+
|
44
|
+
def get_change_notice(version):
|
45
|
+
if version == 0:
|
46
|
+
pass # No changes for version 0
|
47
|
+
elif version == 1:
|
48
|
+
yield 'We want to collect the Git version.'
|
49
|
+
yield 'We want to collect information about the HTTP'
|
50
|
+
yield 'requests that depot_tools makes, and the git and'
|
51
|
+
yield 'cipd commands it executes.'
|
52
|
+
yield ''
|
53
|
+
yield 'We only collect known strings to make sure we'
|
54
|
+
yield 'don\'t record PII.'
|
55
|
+
|
56
|
+
|
57
|
+
KNOWN_PROJECT_URLS = {
|
58
|
+
'https://chrome-internal.googlesource.com/chrome/ios_internal',
|
59
|
+
'https://chrome-internal.googlesource.com/infra/infra_internal',
|
60
|
+
'https://chromium.googlesource.com/breakpad/breakpad',
|
61
|
+
'https://chromium.googlesource.com/chromium/src',
|
62
|
+
'https://chromium.googlesource.com/chromium/tools/depot_tools',
|
63
|
+
'https://chromium.googlesource.com/crashpad/crashpad',
|
64
|
+
'https://chromium.googlesource.com/external/gyp',
|
65
|
+
'https://chromium.googlesource.com/external/naclports',
|
66
|
+
'https://chromium.googlesource.com/infra/goma/client',
|
67
|
+
'https://chromium.googlesource.com/infra/infra',
|
68
|
+
'https://chromium.googlesource.com/native_client/',
|
69
|
+
'https://chromium.googlesource.com/syzygy',
|
70
|
+
'https://chromium.googlesource.com/v8/v8',
|
71
|
+
'https://dart.googlesource.com/sdk',
|
72
|
+
'https://pdfium.googlesource.com/pdfium',
|
73
|
+
'https://skia.googlesource.com/buildbot',
|
74
|
+
'https://skia.googlesource.com/skia',
|
75
|
+
'https://webrtc.googlesource.com/src',
|
76
|
+
}
|
77
|
+
|
78
|
+
KNOWN_HTTP_HOSTS = {
|
79
|
+
'chrome-internal-review.googlesource.com',
|
80
|
+
'chromium-review.googlesource.com',
|
81
|
+
'dart-review.googlesource.com',
|
82
|
+
'eu1-mirror-chromium-review.googlesource.com',
|
83
|
+
'pdfium-review.googlesource.com',
|
84
|
+
'skia-review.googlesource.com',
|
85
|
+
'us1-mirror-chromium-review.googlesource.com',
|
86
|
+
'us2-mirror-chromium-review.googlesource.com',
|
87
|
+
'us3-mirror-chromium-review.googlesource.com',
|
88
|
+
'webrtc-review.googlesource.com',
|
89
|
+
}
|
90
|
+
|
91
|
+
KNOWN_HTTP_METHODS = {
|
92
|
+
'DELETE',
|
93
|
+
'GET',
|
94
|
+
'PATCH',
|
95
|
+
'POST',
|
96
|
+
'PUT',
|
97
|
+
}
|
98
|
+
|
99
|
+
KNOWN_HTTP_PATHS = {
|
100
|
+
'accounts':
|
101
|
+
re.compile(r'(/a)?/accounts/.*'),
|
102
|
+
'changes':
|
103
|
+
re.compile(r'(/a)?/changes/([^/]+)?$'),
|
104
|
+
'changes/abandon':
|
105
|
+
re.compile(r'(/a)?/changes/.*/abandon'),
|
106
|
+
'changes/comments':
|
107
|
+
re.compile(r'(/a)?/changes/.*/comments'),
|
108
|
+
'changes/detail':
|
109
|
+
re.compile(r'(/a)?/changes/.*/detail'),
|
110
|
+
'changes/edit':
|
111
|
+
re.compile(r'(/a)?/changes/.*/edit'),
|
112
|
+
'changes/message':
|
113
|
+
re.compile(r'(/a)?/changes/.*/message'),
|
114
|
+
'changes/restore':
|
115
|
+
re.compile(r'(/a)?/changes/.*/restore'),
|
116
|
+
'changes/reviewers':
|
117
|
+
re.compile(r'(/a)?/changes/.*/reviewers/.*'),
|
118
|
+
'changes/revisions/commit':
|
119
|
+
re.compile(r'(/a)?/changes/.*/revisions/.*/commit'),
|
120
|
+
'changes/revisions/review':
|
121
|
+
re.compile(r'(/a)?/changes/.*/revisions/.*/review'),
|
122
|
+
'changes/submit':
|
123
|
+
re.compile(r'(/a)?/changes/.*/submit'),
|
124
|
+
'projects/branches':
|
125
|
+
re.compile(r'(/a)?/projects/.*/branches/.*'),
|
126
|
+
}
|
127
|
+
|
128
|
+
KNOWN_HTTP_ARGS = {
|
129
|
+
'ALL_REVISIONS',
|
130
|
+
'CURRENT_COMMIT',
|
131
|
+
'CURRENT_REVISION',
|
132
|
+
'DETAILED_ACCOUNTS',
|
133
|
+
'LABELS',
|
134
|
+
}
|
135
|
+
|
136
|
+
GIT_VERSION_RE = re.compile(
|
137
|
+
r'git version (\d)\.(\d{0,2})\.(\d{0,2})'
|
138
|
+
)
|
139
|
+
|
140
|
+
KNOWN_SUBCOMMAND_ARGS = {
|
141
|
+
'cc',
|
142
|
+
'hashtag',
|
143
|
+
'l=Auto-Submit+1',
|
144
|
+
'l=Code-Review+1',
|
145
|
+
'l=Code-Review+2',
|
146
|
+
'l=Commit-Queue+1',
|
147
|
+
'l=Commit-Queue+2',
|
148
|
+
'label',
|
149
|
+
'm',
|
150
|
+
'notify=ALL',
|
151
|
+
'notify=NONE',
|
152
|
+
'private',
|
153
|
+
'r',
|
154
|
+
'ready',
|
155
|
+
'topic',
|
156
|
+
'wip'
|
157
|
+
}
|
158
|
+
|
159
|
+
|
160
|
+
def get_python_version():
|
161
|
+
"""Return the python version in the major.minor.micro format."""
|
162
|
+
return '{v.major}.{v.minor}.{v.micro}'.format(v=sys.version_info)
|
163
|
+
|
164
|
+
|
165
|
+
def get_git_version():
|
166
|
+
"""Return the Git version in the major.minor.micro format."""
|
167
|
+
p = subprocess2.Popen(
|
168
|
+
['git', '--version'],
|
169
|
+
stdout=subprocess2.PIPE, stderr=subprocess2.PIPE)
|
170
|
+
stdout, _ = p.communicate()
|
171
|
+
match = GIT_VERSION_RE.match(stdout)
|
172
|
+
if not match:
|
173
|
+
return None
|
174
|
+
return '%s.%s.%s' % match.groups()
|
175
|
+
|
176
|
+
|
177
|
+
def return_code_from_exception(exception):
|
178
|
+
"""Returns the exit code that would result of raising the exception."""
|
179
|
+
if exception is None:
|
180
|
+
return 0
|
181
|
+
if isinstance(exception[1], SystemExit):
|
182
|
+
return exception[1].code
|
183
|
+
return 1
|
184
|
+
|
185
|
+
|
186
|
+
def seconds_to_weeks(duration):
|
187
|
+
"""Transform a |duration| from seconds to weeks approximately.
|
188
|
+
|
189
|
+
Drops the lowest 19 bits of the integer representation, which ammounts to
|
190
|
+
about 6 days.
|
191
|
+
"""
|
192
|
+
return int(duration) >> 19
|
193
|
+
|
194
|
+
|
195
|
+
def extract_known_subcommand_args(args):
|
196
|
+
"""Extract the known arguments from the passed list of args."""
|
197
|
+
known_args = []
|
198
|
+
for arg in args:
|
199
|
+
if arg in KNOWN_SUBCOMMAND_ARGS:
|
200
|
+
known_args.append(arg)
|
201
|
+
else:
|
202
|
+
arg = arg.split('=')[0]
|
203
|
+
if arg in KNOWN_SUBCOMMAND_ARGS:
|
204
|
+
known_args.append(arg)
|
205
|
+
return sorted(known_args)
|
206
|
+
|
207
|
+
|
208
|
+
def extract_http_metrics(request_uri, method, status, response_time):
|
209
|
+
"""Extract metrics from the request URI.
|
210
|
+
|
211
|
+
Extracts the host, path, and arguments from the request URI, and returns them
|
212
|
+
along with the method, status and response time.
|
213
|
+
|
214
|
+
The host, method, path and arguments must be in the KNOWN_HTTP_* constants
|
215
|
+
defined above.
|
216
|
+
|
217
|
+
Arguments are the values of the o= url parameter. In Gerrit, additional fields
|
218
|
+
can be obtained by adding o parameters, each option requires more database
|
219
|
+
lookups and slows down the query response time to the client, so we make an
|
220
|
+
effort to collect them.
|
221
|
+
|
222
|
+
The regex defined in KNOWN_HTTP_PATH_RES are checked against the path, and
|
223
|
+
those that match will be returned.
|
224
|
+
"""
|
225
|
+
http_metrics = {
|
226
|
+
'status': status,
|
227
|
+
'response_time': response_time,
|
228
|
+
}
|
229
|
+
|
230
|
+
if method in KNOWN_HTTP_METHODS:
|
231
|
+
http_metrics['method'] = method
|
232
|
+
|
233
|
+
parsed_url = urlparse.urlparse(request_uri)
|
234
|
+
|
235
|
+
if parsed_url.netloc in KNOWN_HTTP_HOSTS:
|
236
|
+
http_metrics['host'] = parsed_url.netloc
|
237
|
+
|
238
|
+
for name, path_re in KNOWN_HTTP_PATHS.iteritems():
|
239
|
+
if path_re.match(parsed_url.path):
|
240
|
+
http_metrics['path'] = name
|
241
|
+
break
|
242
|
+
|
243
|
+
parsed_query = urlparse.parse_qs(parsed_url.query)
|
244
|
+
|
245
|
+
# Collect o-parameters from the request.
|
246
|
+
args = [
|
247
|
+
arg for arg in parsed_query.get('o', [])
|
248
|
+
if arg in KNOWN_HTTP_ARGS
|
249
|
+
]
|
250
|
+
if args:
|
251
|
+
http_metrics['arguments'] = args
|
252
|
+
|
253
|
+
return http_metrics
|
254
|
+
|
255
|
+
|
256
|
+
def get_repo_timestamp(path_to_repo):
|
257
|
+
"""Get an approximate timestamp for the upstream of |path_to_repo|.
|
258
|
+
|
259
|
+
Returns the top two bits of the timestamp of the HEAD for the upstream of the
|
260
|
+
branch path_to_repo is checked out at.
|
261
|
+
"""
|
262
|
+
# Get the upstream for the current branch. If we're not in a branch, fallback
|
263
|
+
# to HEAD.
|
264
|
+
try:
|
265
|
+
upstream = scm.GIT.GetUpstreamBranch(path_to_repo) or 'HEAD'
|
266
|
+
except subprocess2.CalledProcessError:
|
267
|
+
upstream = 'HEAD'
|
268
|
+
|
269
|
+
# Get the timestamp of the HEAD for the upstream of the current branch.
|
270
|
+
p = subprocess2.Popen(
|
271
|
+
['git', '-C', path_to_repo, 'log', '-n1', upstream, '--format=%at'],
|
272
|
+
stdout=subprocess2.PIPE, stderr=subprocess2.PIPE)
|
273
|
+
stdout, _ = p.communicate()
|
274
|
+
|
275
|
+
# If there was an error, give up.
|
276
|
+
if p.returncode != 0:
|
277
|
+
return None
|
278
|
+
|
279
|
+
# Get the age of the checkout in weeks.
|
280
|
+
return seconds_to_weeks(stdout.strip())
|
281
|
+
|
282
|
+
def print_boxed_text(out, min_width, lines):
|
283
|
+
[EW, NS, SE, SW, NE, NW] = list('=|++++')
|
284
|
+
width = max(min_width, max(len(line) for line in lines))
|
285
|
+
out(SE + EW * (width + 2) + SW + '\n')
|
286
|
+
for line in lines:
|
287
|
+
out('%s %-*s %s\n' % (NS, width, line, NS))
|
288
|
+
out(NE + EW * (width + 2) + NW + '\n')
|
289
|
+
|
290
|
+
def print_notice(countdown):
|
291
|
+
"""Print a notice to let the user know the status of metrics collection."""
|
292
|
+
lines = list(get_notice_countdown_header(countdown))
|
293
|
+
lines.append('')
|
294
|
+
lines += list(get_notice_footer())
|
295
|
+
print_boxed_text(sys.stderr.write, 49, lines)
|
296
|
+
|
297
|
+
def print_version_change(config_version):
|
298
|
+
"""Print a notice to let the user know we are collecting more metrics."""
|
299
|
+
lines = list(get_notice_version_change_header())
|
300
|
+
for version in xrange(config_version + 1, CURRENT_VERSION + 1):
|
301
|
+
lines.append('')
|
302
|
+
lines += list(get_change_notice(version))
|
303
|
+
print_boxed_text(sys.stderr.write, 49, lines)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#!/usr/bin/env
|
1
|
+
#!/usr/bin/env vpython
|
2
2
|
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
3
3
|
# Use of this source code is governed by a BSD-style license that can be
|
4
4
|
# found in the LICENSE file.
|
@@ -21,6 +21,17 @@ Example:
|
|
21
21
|
# check those details to determine if there was activity in the given period.
|
22
22
|
# This means that query time scales mostly with (today() - begin).
|
23
23
|
|
24
|
+
# [VPYTHON:BEGIN]
|
25
|
+
# wheel: <
|
26
|
+
# name: "infra/python/wheels/python-dateutil-py2_py3"
|
27
|
+
# version: "version:2.7.3"
|
28
|
+
# >
|
29
|
+
# wheel: <
|
30
|
+
# name: "infra/python/wheels/six-py2_py3"
|
31
|
+
# version: "version:1.10.0"
|
32
|
+
# >
|
33
|
+
# [VPYTHON:END]
|
34
|
+
|
24
35
|
import collections
|
25
36
|
import contextlib
|
26
37
|
from datetime import datetime
|
@@ -96,9 +107,7 @@ rietveld_instances = [
|
|
96
107
|
|
97
108
|
gerrit_instances = [
|
98
109
|
{
|
99
|
-
'url': '
|
100
|
-
'shorturl': 'crrev.com/c',
|
101
|
-
'short_url_protocol': 'https',
|
110
|
+
'url': 'android-review.googlesource.com',
|
102
111
|
},
|
103
112
|
{
|
104
113
|
'url': 'chrome-internal-review.googlesource.com',
|
@@ -106,11 +115,16 @@ gerrit_instances = [
|
|
106
115
|
'short_url_protocol': 'https',
|
107
116
|
},
|
108
117
|
{
|
109
|
-
'url': '
|
118
|
+
'url': 'chromium-review.googlesource.com',
|
119
|
+
'shorturl': 'crrev.com/c',
|
120
|
+
'short_url_protocol': 'https',
|
110
121
|
},
|
111
122
|
{
|
112
123
|
'url': 'pdfium-review.googlesource.com',
|
113
124
|
},
|
125
|
+
{
|
126
|
+
'url': 'skia-review.googlesource.com',
|
127
|
+
},
|
114
128
|
]
|
115
129
|
|
116
130
|
monorail_projects = {
|
@@ -269,7 +283,7 @@ class MyActivity(object):
|
|
269
283
|
|
270
284
|
return issues
|
271
285
|
|
272
|
-
def
|
286
|
+
def extract_bug_numbers_from_description(self, issue):
|
273
287
|
description = None
|
274
288
|
|
275
289
|
if 'description' in issue:
|
@@ -293,7 +307,7 @@ class MyActivity(object):
|
|
293
307
|
# Add default chromium: prefix if none specified.
|
294
308
|
bugs = [bug if ':' in bug else 'chromium:%s' % bug for bug in bugs]
|
295
309
|
|
296
|
-
return bugs
|
310
|
+
return sorted(set(bugs))
|
297
311
|
|
298
312
|
def process_rietveld_issue(self, remote, instance, issue):
|
299
313
|
ret = {}
|
@@ -336,7 +350,7 @@ class MyActivity(object):
|
|
336
350
|
ret['created'] = datetime_from_rietveld(issue['created'])
|
337
351
|
ret['replies'] = self.process_rietveld_replies(issue['messages'])
|
338
352
|
|
339
|
-
ret['bugs'] = self.
|
353
|
+
ret['bugs'] = self.extract_bug_numbers_from_description(issue)
|
340
354
|
ret['landed_days_ago'] = issue['landed_days_ago']
|
341
355
|
|
342
356
|
return ret
|
@@ -369,16 +383,22 @@ class MyActivity(object):
|
|
369
383
|
|
370
384
|
def gerrit_search(self, instance, owner=None, reviewer=None):
|
371
385
|
max_age = datetime.today() - self.modified_after
|
372
|
-
|
373
|
-
|
374
|
-
|
386
|
+
filters = ['-age:%ss' % (max_age.days * 24 * 3600 + max_age.seconds)]
|
387
|
+
if owner:
|
388
|
+
assert not reviewer
|
389
|
+
filters.append('owner:%s' % owner)
|
390
|
+
else:
|
391
|
+
filters.extend(('-owner:%s' % reviewer, 'reviewer:%s' % reviewer))
|
392
|
+
# TODO(cjhopman): Should abandoned changes be filtered out when
|
393
|
+
# merged_only is not enabled?
|
394
|
+
if self.options.merged_only:
|
395
|
+
filters.append('status:merged')
|
375
396
|
|
376
397
|
issues = self.gerrit_changes_over_rest(instance, filters)
|
377
398
|
self.show_progress()
|
378
399
|
issues = [self.process_gerrit_issue(instance, issue)
|
379
400
|
for issue in issues]
|
380
401
|
|
381
|
-
# TODO(cjhopman): should we filter abandoned changes?
|
382
402
|
issues = filter(self.filter_issue, issues)
|
383
403
|
issues = sorted(issues, key=lambda i: i['modified'], reverse=True)
|
384
404
|
|
@@ -400,7 +420,7 @@ class MyActivity(object):
|
|
400
420
|
ret['review_url'] = '%s://%s/%s' % (protocol, url, issue['_number'])
|
401
421
|
|
402
422
|
ret['header'] = issue['subject']
|
403
|
-
ret['owner'] = issue['owner']
|
423
|
+
ret['owner'] = issue['owner'].get('email', '')
|
404
424
|
ret['author'] = ret['owner']
|
405
425
|
ret['created'] = datetime_from_gerrit(issue['created'])
|
406
426
|
ret['modified'] = datetime_from_gerrit(issue['updated'])
|
@@ -410,7 +430,7 @@ class MyActivity(object):
|
|
410
430
|
ret['replies'] = []
|
411
431
|
ret['reviewers'] = set(r['author'] for r in ret['replies'])
|
412
432
|
ret['reviewers'].discard(ret['author'])
|
413
|
-
ret['bugs'] = self.
|
433
|
+
ret['bugs'] = self.extract_bug_numbers_from_description(issue)
|
414
434
|
return ret
|
415
435
|
|
416
436
|
@staticmethod
|
@@ -430,7 +450,10 @@ class MyActivity(object):
|
|
430
450
|
auth_config = auth.extract_auth_config_from_options(self.options)
|
431
451
|
authenticator = auth.get_authenticator_for_host(
|
432
452
|
'bugs.chromium.org', auth_config)
|
433
|
-
|
453
|
+
# Manually use a long timeout (10m); for some users who have a
|
454
|
+
# long history on the issue tracker, whatever the default timeout
|
455
|
+
# is is reached.
|
456
|
+
return authenticator.authorize(httplib2.Http(timeout=600))
|
434
457
|
|
435
458
|
def filter_modified_monorail_issue(self, issue):
|
436
459
|
"""Precisely checks if an issue has been modified in the time range.
|
@@ -515,6 +538,7 @@ class MyActivity(object):
|
|
515
538
|
|
516
539
|
def monorail_issue_search(self, project):
|
517
540
|
epoch = datetime.utcfromtimestamp(0)
|
541
|
+
# TODO(tandrii): support non-chromium email, too.
|
518
542
|
user_str = '%s@chromium.org' % self.user
|
519
543
|
|
520
544
|
issues = self.monorail_query_issues(project, {
|
@@ -524,6 +548,13 @@ class MyActivity(object):
|
|
524
548
|
'updatedMin': '%d' % (self.modified_after - epoch).total_seconds(),
|
525
549
|
})
|
526
550
|
|
551
|
+
if self.options.completed_issues:
|
552
|
+
return [
|
553
|
+
issue for issue in issues
|
554
|
+
if (self.match(issue['owner']) and
|
555
|
+
issue['status'].lower() in ('verified', 'fixed'))
|
556
|
+
]
|
557
|
+
|
527
558
|
return [
|
528
559
|
issue for issue in issues
|
529
560
|
if issue['author'] == user_str or issue['owner'] == user_str]
|
@@ -564,6 +595,8 @@ class MyActivity(object):
|
|
564
595
|
change['header'],
|
565
596
|
change['review_url'],
|
566
597
|
change['author'],
|
598
|
+
change['created'],
|
599
|
+
change['modified'],
|
567
600
|
optional_values)
|
568
601
|
|
569
602
|
def print_issue(self, issue):
|
@@ -578,6 +611,8 @@ class MyActivity(object):
|
|
578
611
|
issue['header'],
|
579
612
|
issue['url'],
|
580
613
|
issue['author'],
|
614
|
+
issue['created'],
|
615
|
+
issue['modified'],
|
581
616
|
optional_values)
|
582
617
|
|
583
618
|
def print_review(self, review):
|
@@ -600,11 +635,13 @@ class MyActivity(object):
|
|
600
635
|
review['header'],
|
601
636
|
review['review_url'],
|
602
637
|
review['author'],
|
638
|
+
review['created'],
|
639
|
+
review['modified'],
|
603
640
|
optional_values)
|
604
641
|
|
605
642
|
@staticmethod
|
606
643
|
def print_generic(default_fmt, specific_fmt,
|
607
|
-
title, url, author,
|
644
|
+
title, url, author, created, modified,
|
608
645
|
optional_values=None):
|
609
646
|
output_format = specific_fmt if specific_fmt is not None else default_fmt
|
610
647
|
output_format = unicode(output_format)
|
@@ -612,6 +649,8 @@ class MyActivity(object):
|
|
612
649
|
'title': title,
|
613
650
|
'url': url,
|
614
651
|
'author': author,
|
652
|
+
'created': created,
|
653
|
+
'modified': modified,
|
615
654
|
}
|
616
655
|
if optional_values is not None:
|
617
656
|
values.update(optional_values)
|
@@ -669,7 +708,7 @@ class MyActivity(object):
|
|
669
708
|
if self.changes:
|
670
709
|
self.print_heading('Changes')
|
671
710
|
for change in self.changes:
|
672
|
-
|
711
|
+
self.print_change(change)
|
673
712
|
|
674
713
|
def print_access_errors(self):
|
675
714
|
if self.access_errors:
|
@@ -688,7 +727,6 @@ class MyActivity(object):
|
|
688
727
|
gerrit_instances)
|
689
728
|
rietveld_reviews = itertools.chain.from_iterable(rietveld_reviews.get())
|
690
729
|
gerrit_reviews = itertools.chain.from_iterable(gerrit_reviews.get())
|
691
|
-
gerrit_reviews = [r for r in gerrit_reviews if r['owner'] != self.user]
|
692
730
|
self.reviews = list(rietveld_reviews) + list(gerrit_reviews)
|
693
731
|
|
694
732
|
def print_reviews(self):
|
@@ -763,9 +801,12 @@ class MyActivity(object):
|
|
763
801
|
for issue_uid in issues:
|
764
802
|
if changes_by_issue_uid[issue_uid] or not skip_empty_own:
|
765
803
|
self.print_issue(issues[issue_uid])
|
766
|
-
|
767
|
-
print
|
768
|
-
|
804
|
+
if changes_by_issue_uid[issue_uid]:
|
805
|
+
print
|
806
|
+
for change in changes_by_issue_uid[issue_uid]:
|
807
|
+
print ' ', # this prints one space due to comma, but no newline
|
808
|
+
self.print_change(change)
|
809
|
+
print
|
769
810
|
|
770
811
|
# Changes referencing others' issues.
|
771
812
|
for issue_uid in ref_issues:
|
@@ -824,7 +865,8 @@ def main():
|
|
824
865
|
parser = optparse.OptionParser(description=sys.modules[__name__].__doc__)
|
825
866
|
parser.add_option(
|
826
867
|
'-u', '--user', metavar='<email>',
|
827
|
-
|
868
|
+
# Look for USER and USERNAME (Windows) environment variables.
|
869
|
+
default=os.environ.get('USER', os.environ.get('USERNAME')),
|
828
870
|
help='Filter on user, default=%default')
|
829
871
|
parser.add_option(
|
830
872
|
'-b', '--begin', metavar='<date>',
|
@@ -896,9 +938,10 @@ def main():
|
|
896
938
|
'individually for each activity type. The format '
|
897
939
|
'is defined as documented for '
|
898
940
|
'string.format(...). The variables available for '
|
899
|
-
'all activity types are url, title
|
900
|
-
'Format options for
|
901
|
-
'override the
|
941
|
+
'all activity types are url, title, author, '
|
942
|
+
'created and modified. Format options for '
|
943
|
+
'specific activity types will override the '
|
944
|
+
'generic format.')
|
902
945
|
output_format_group.add_option(
|
903
946
|
'-f', '--output-format', metavar='<format>',
|
904
947
|
default=u'{url} {title}',
|
@@ -949,6 +992,19 @@ def main():
|
|
949
992
|
const=logging.ERROR,
|
950
993
|
help='Suppress non-error messages.'
|
951
994
|
)
|
995
|
+
parser.add_option(
|
996
|
+
'-M', '--merged-only',
|
997
|
+
action='store_true',
|
998
|
+
dest='merged_only',
|
999
|
+
default=False,
|
1000
|
+
help='Shows only changes that have been merged.')
|
1001
|
+
parser.add_option(
|
1002
|
+
'-C', '--completed-issues',
|
1003
|
+
action='store_true',
|
1004
|
+
dest='completed_issues',
|
1005
|
+
default=False,
|
1006
|
+
help='Shows only monorail issues that have completed (Fixed|Verified) '
|
1007
|
+
'by the user.')
|
952
1008
|
parser.add_option(
|
953
1009
|
'-o', '--output', metavar='<file>',
|
954
1010
|
help='Where to output the results. By default prints to stdout.')
|
@@ -962,7 +1018,7 @@ def main():
|
|
962
1018
|
if args:
|
963
1019
|
parser.error('Args unsupported')
|
964
1020
|
if not options.user:
|
965
|
-
parser.error('USER is not set, please use -u')
|
1021
|
+
parser.error('USER/USERNAME is not set, please use -u')
|
966
1022
|
options.user = username(options.user)
|
967
1023
|
|
968
1024
|
logging.basicConfig(level=options.verbosity)
|
@@ -992,11 +1048,17 @@ def main():
|
|
992
1048
|
else:
|
993
1049
|
end = datetime.today()
|
994
1050
|
options.begin, options.end = begin, end
|
1051
|
+
if begin >= end:
|
1052
|
+
# The queries fail in peculiar ways when the begin date is in the future.
|
1053
|
+
# Give a descriptive error message instead.
|
1054
|
+
logging.error('Start date (%s) is the same or later than end date (%s)' %
|
1055
|
+
(begin, end))
|
1056
|
+
return 1
|
995
1057
|
|
996
1058
|
if options.markdown:
|
997
|
-
options.
|
998
|
-
options.
|
999
|
-
options.output_format_no_url = '
|
1059
|
+
options.output_format_heading = '### {heading}\n'
|
1060
|
+
options.output_format = ' * [{title}]({url})'
|
1061
|
+
options.output_format_no_url = ' * {title}'
|
1000
1062
|
logging.info('Searching for activity by %s', options.user)
|
1001
1063
|
logging.info('Using range %s to %s', options.begin, options.end)
|
1002
1064
|
|