libv8 8.4.255.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.gitmodules +3 -0
- data/.rspec +3 -0
- data/.travis.yml +45 -0
- data/CHANGELOG.md +111 -0
- data/Gemfile +4 -0
- data/README.md +152 -0
- data/Rakefile +125 -0
- data/appveyor.yml.disabled +36 -0
- data/ext/libv8/arch.rb +20 -0
- data/ext/libv8/builder.rb +106 -0
- data/ext/libv8/extconf.rb +7 -0
- data/ext/libv8/location.rb +89 -0
- data/ext/libv8/paths.rb +28 -0
- data/lib/libv8.rb +9 -0
- data/lib/libv8/version.rb +3 -0
- data/libv8.gemspec +30 -0
- data/scaleway.png +0 -0
- data/spec/location_spec.rb +69 -0
- data/spec/spec_helper.rb +4 -0
- data/thefrontside.png +0 -0
- data/vendor/depot_tools/.cipd_impl.ps1 +129 -0
- data/vendor/depot_tools/.gitattributes +55 -0
- data/vendor/depot_tools/.gitignore +92 -0
- data/vendor/depot_tools/.style.yapf +4 -0
- data/vendor/depot_tools/.vpython +55 -0
- data/vendor/depot_tools/.vpython3 +23 -0
- data/vendor/depot_tools/CROS_OWNERS +7 -0
- data/vendor/depot_tools/GOMA_OWNERS +9 -0
- data/vendor/depot_tools/LICENSE +27 -0
- data/vendor/depot_tools/LUCI_OWNERS +5 -0
- data/vendor/depot_tools/OWNERS +39 -0
- data/vendor/depot_tools/PRESUBMIT.py +150 -0
- data/vendor/depot_tools/README.gclient.md +67 -0
- data/vendor/depot_tools/README.git-cl.md +99 -0
- data/vendor/depot_tools/README.md +78 -0
- data/vendor/depot_tools/WATCHLISTS +26 -0
- data/vendor/depot_tools/auth.py +163 -0
- data/vendor/depot_tools/autoninja +36 -0
- data/vendor/depot_tools/autoninja.bat +33 -0
- data/vendor/depot_tools/autoninja.py +148 -0
- data/vendor/depot_tools/bb +12 -0
- data/vendor/depot_tools/bb.bat +7 -0
- data/vendor/depot_tools/bootstrap/README.md +155 -0
- data/vendor/depot_tools/bootstrap/bootstrap.py +356 -0
- data/vendor/depot_tools/bootstrap/git-bash.template.sh +12 -0
- data/vendor/depot_tools/bootstrap/git.template.bat +5 -0
- data/vendor/depot_tools/bootstrap/manifest.txt +27 -0
- data/vendor/depot_tools/bootstrap/manifest_bleeding_edge.txt +27 -0
- data/vendor/depot_tools/bootstrap/profile.d.python.sh +20 -0
- data/vendor/depot_tools/bootstrap/python27.bat +46 -0
- data/vendor/depot_tools/bootstrap/python3.bat +46 -0
- data/vendor/depot_tools/bootstrap/win_tools.bat +79 -0
- data/vendor/depot_tools/bootstrap_python3 +35 -0
- data/vendor/depot_tools/breakpad.py +12 -0
- data/vendor/depot_tools/cbuildbot +1 -0
- data/vendor/depot_tools/chrome_set_ver +1 -0
- data/vendor/depot_tools/cipd +247 -0
- data/vendor/depot_tools/cipd.bat +67 -0
- data/vendor/depot_tools/cipd_bin_setup.bat +6 -0
- data/vendor/depot_tools/cipd_bin_setup.sh +22 -0
- data/vendor/depot_tools/cipd_client_version +1 -0
- data/vendor/depot_tools/cipd_client_version.digests +22 -0
- data/vendor/depot_tools/cipd_manifest.txt +63 -0
- data/vendor/depot_tools/cipd_manifest.versions +438 -0
- data/vendor/depot_tools/cit +8 -0
- data/vendor/depot_tools/cit.bat +12 -0
- data/vendor/depot_tools/cit.py +167 -0
- data/vendor/depot_tools/clang-format +8 -0
- data/vendor/depot_tools/clang-format.bat +12 -0
- data/vendor/depot_tools/clang_format.py +79 -0
- data/vendor/depot_tools/clang_format_merge_driver +8 -0
- data/vendor/depot_tools/clang_format_merge_driver.bat +12 -0
- data/vendor/depot_tools/clang_format_merge_driver.py +69 -0
- data/vendor/depot_tools/codereview.settings +6 -0
- data/vendor/depot_tools/compile_single_file +8 -0
- data/vendor/depot_tools/compile_single_file.bat +11 -0
- data/vendor/depot_tools/compile_single_file.py +79 -0
- data/vendor/depot_tools/cpplint.bat +11 -0
- data/vendor/depot_tools/cpplint.py +6097 -0
- data/vendor/depot_tools/cpplint_chromium.py +50 -0
- data/vendor/depot_tools/cros +87 -0
- data/vendor/depot_tools/cros_sdk +1 -0
- data/vendor/depot_tools/crosjobs +13 -0
- data/vendor/depot_tools/detect_host_arch.py +55 -0
- data/vendor/depot_tools/dirmd +12 -0
- data/vendor/depot_tools/dirmd.bat +7 -0
- data/vendor/depot_tools/download_from_google_storage +8 -0
- data/vendor/depot_tools/download_from_google_storage.bat +12 -0
- data/vendor/depot_tools/download_from_google_storage.py +634 -0
- data/vendor/depot_tools/ensure_bootstrap +53 -0
- data/vendor/depot_tools/fetch +21 -0
- data/vendor/depot_tools/fetch.bat +28 -0
- data/vendor/depot_tools/fetch.py +319 -0
- data/vendor/depot_tools/fetch_configs/android.py +34 -0
- data/vendor/depot_tools/fetch_configs/android_internal.py +34 -0
- data/vendor/depot_tools/fetch_configs/breakpad.py +44 -0
- data/vendor/depot_tools/fetch_configs/chromium.py +66 -0
- data/vendor/depot_tools/fetch_configs/config_util.py +52 -0
- data/vendor/depot_tools/fetch_configs/crashpad.py +41 -0
- data/vendor/depot_tools/fetch_configs/dart.py +45 -0
- data/vendor/depot_tools/fetch_configs/depot_tools.py +44 -0
- data/vendor/depot_tools/fetch_configs/devtools-frontend.py +44 -0
- data/vendor/depot_tools/fetch_configs/goma_client.py +41 -0
- data/vendor/depot_tools/fetch_configs/gyp.py +41 -0
- data/vendor/depot_tools/fetch_configs/infra.py +40 -0
- data/vendor/depot_tools/fetch_configs/infra_internal.py +45 -0
- data/vendor/depot_tools/fetch_configs/inspector_protocol.py +40 -0
- data/vendor/depot_tools/fetch_configs/ios.py +34 -0
- data/vendor/depot_tools/fetch_configs/ios_internal.py +39 -0
- data/vendor/depot_tools/fetch_configs/nacl.py +48 -0
- data/vendor/depot_tools/fetch_configs/naclports.py +47 -0
- data/vendor/depot_tools/fetch_configs/node-ci.py +41 -0
- data/vendor/depot_tools/fetch_configs/pdfium.py +40 -0
- data/vendor/depot_tools/fetch_configs/skia.py +41 -0
- data/vendor/depot_tools/fetch_configs/skia_buildbot.py +41 -0
- data/vendor/depot_tools/fetch_configs/syzygy.py +41 -0
- data/vendor/depot_tools/fetch_configs/v8.py +44 -0
- data/vendor/depot_tools/fetch_configs/webrtc.py +52 -0
- data/vendor/depot_tools/fetch_configs/webrtc_android.py +34 -0
- data/vendor/depot_tools/fetch_configs/webrtc_ios.py +34 -0
- data/vendor/depot_tools/fix_encoding.py +385 -0
- data/vendor/depot_tools/gclient +38 -0
- data/vendor/depot_tools/gclient-new-workdir.py +124 -0
- data/vendor/depot_tools/gclient.bat +32 -0
- data/vendor/depot_tools/gclient.py +3198 -0
- data/vendor/depot_tools/gclient_completion.sh +76 -0
- data/vendor/depot_tools/gclient_eval.py +891 -0
- data/vendor/depot_tools/gclient_paths.py +152 -0
- data/vendor/depot_tools/gclient_scm.py +1615 -0
- data/vendor/depot_tools/gclient_utils.py +1280 -0
- data/vendor/depot_tools/gerrit_client.py +151 -0
- data/vendor/depot_tools/gerrit_util.py +996 -0
- data/vendor/depot_tools/git-cache +6 -0
- data/vendor/depot_tools/git-cl +6 -0
- data/vendor/depot_tools/git-crrev-parse +53 -0
- data/vendor/depot_tools/git-drover +6 -0
- data/vendor/depot_tools/git-find-releases +6 -0
- data/vendor/depot_tools/git-footers +6 -0
- data/vendor/depot_tools/git-freeze +8 -0
- data/vendor/depot_tools/git-gs +9 -0
- data/vendor/depot_tools/git-hyper-blame +6 -0
- data/vendor/depot_tools/git-map +6 -0
- data/vendor/depot_tools/git-map-branches +6 -0
- data/vendor/depot_tools/git-mark-merge-base +6 -0
- data/vendor/depot_tools/git-nav-downstream +6 -0
- data/vendor/depot_tools/git-nav-upstream +6 -0
- data/vendor/depot_tools/git-new-branch +6 -0
- data/vendor/depot_tools/git-number +6 -0
- data/vendor/depot_tools/git-rebase-update +6 -0
- data/vendor/depot_tools/git-rename-branch +6 -0
- data/vendor/depot_tools/git-reparent-branch +6 -0
- data/vendor/depot_tools/git-retry +8 -0
- data/vendor/depot_tools/git-runhooks +23 -0
- data/vendor/depot_tools/git-squash-branch +6 -0
- data/vendor/depot_tools/git-templates/description +3 -0
- data/vendor/depot_tools/git-templates/hooks/applypatch-msg +4 -0
- data/vendor/depot_tools/git-templates/hooks/post-applypatch +4 -0
- data/vendor/depot_tools/git-templates/hooks/post-checkout +4 -0
- data/vendor/depot_tools/git-templates/hooks/post-commit +4 -0
- data/vendor/depot_tools/git-templates/hooks/post-merge +4 -0
- data/vendor/depot_tools/git-templates/hooks/post-update +4 -0
- data/vendor/depot_tools/git-templates/hooks/pre-applypatch +4 -0
- data/vendor/depot_tools/git-templates/hooks/pre-auto-gc +4 -0
- data/vendor/depot_tools/git-templates/hooks/pre-commit +4 -0
- data/vendor/depot_tools/git-templates/hooks/pre-rebase +4 -0
- data/vendor/depot_tools/git-templates/hooks/prepare-commit-msg +4 -0
- data/vendor/depot_tools/git-templates/info/exclude +6 -0
- data/vendor/depot_tools/git-thaw +13 -0
- data/vendor/depot_tools/git-upstream-diff +9 -0
- data/vendor/depot_tools/git_cache.py +786 -0
- data/vendor/depot_tools/git_cl.py +5158 -0
- data/vendor/depot_tools/git_cl_completion.sh +48 -0
- data/vendor/depot_tools/git_common.py +1101 -0
- data/vendor/depot_tools/git_dates.py +62 -0
- data/vendor/depot_tools/git_drover.py +469 -0
- data/vendor/depot_tools/git_find_releases.py +67 -0
- data/vendor/depot_tools/git_footers.py +261 -0
- data/vendor/depot_tools/git_freezer.py +40 -0
- data/vendor/depot_tools/git_hyper_blame.py +391 -0
- data/vendor/depot_tools/git_map.py +166 -0
- data/vendor/depot_tools/git_map_branches.py +354 -0
- data/vendor/depot_tools/git_mark_merge_base.py +73 -0
- data/vendor/depot_tools/git_nav_downstream.py +69 -0
- data/vendor/depot_tools/git_new_branch.py +82 -0
- data/vendor/depot_tools/git_number.py +301 -0
- data/vendor/depot_tools/git_rebase_update.py +351 -0
- data/vendor/depot_tools/git_rename_branch.py +55 -0
- data/vendor/depot_tools/git_reparent_branch.py +101 -0
- data/vendor/depot_tools/git_retry.py +181 -0
- data/vendor/depot_tools/git_squash_branch.py +28 -0
- data/vendor/depot_tools/git_upstream_diff.py +64 -0
- data/vendor/depot_tools/gn +8 -0
- data/vendor/depot_tools/gn.bat +12 -0
- data/vendor/depot_tools/gn.py +78 -0
- data/vendor/depot_tools/goma_auth +12 -0
- data/vendor/depot_tools/goma_auth.bat +8 -0
- data/vendor/depot_tools/goma_ctl +12 -0
- data/vendor/depot_tools/goma_ctl.bat +8 -0
- data/vendor/depot_tools/gsutil.py +190 -0
- data/vendor/depot_tools/gsutil.py.bat +23 -0
- data/vendor/depot_tools/gsutil.vpython +120 -0
- data/vendor/depot_tools/infra/README.md +1 -0
- data/vendor/depot_tools/infra/config/OWNERS +7 -0
- data/vendor/depot_tools/infra/config/README.md +1 -0
- data/vendor/depot_tools/infra/config/recipes.cfg +26 -0
- data/vendor/depot_tools/led +12 -0
- data/vendor/depot_tools/led.bat +7 -0
- data/vendor/depot_tools/lockfile.py +116 -0
- data/vendor/depot_tools/luci-auth +13 -0
- data/vendor/depot_tools/luci-auth.bat +8 -0
- data/vendor/depot_tools/lucicfg +12 -0
- data/vendor/depot_tools/lucicfg.bat +7 -0
- data/vendor/depot_tools/mac_toolchain +12 -0
- data/vendor/depot_tools/man/html/depot_tools.html +934 -0
- data/vendor/depot_tools/man/html/depot_tools_tutorial.html +1593 -0
- data/vendor/depot_tools/man/html/git-cl.html +1033 -0
- data/vendor/depot_tools/man/html/git-drover.html +1048 -0
- data/vendor/depot_tools/man/html/git-footers.html +878 -0
- data/vendor/depot_tools/man/html/git-freeze.html +859 -0
- data/vendor/depot_tools/man/html/git-hyper-blame.html +878 -0
- data/vendor/depot_tools/man/html/git-map-branches.html +904 -0
- data/vendor/depot_tools/man/html/git-map.html +887 -0
- data/vendor/depot_tools/man/html/git-mark-merge-base.html +826 -0
- data/vendor/depot_tools/man/html/git-nav-downstream.html +844 -0
- data/vendor/depot_tools/man/html/git-nav-upstream.html +853 -0
- data/vendor/depot_tools/man/html/git-new-branch.html +932 -0
- data/vendor/depot_tools/man/html/git-rebase-update.html +961 -0
- data/vendor/depot_tools/man/html/git-rename-branch.html +794 -0
- data/vendor/depot_tools/man/html/git-reparent-branch.html +847 -0
- data/vendor/depot_tools/man/html/git-retry.html +858 -0
- data/vendor/depot_tools/man/html/git-squash-branch.html +881 -0
- data/vendor/depot_tools/man/html/git-thaw.html +794 -0
- data/vendor/depot_tools/man/html/git-upstream-diff.html +923 -0
- data/vendor/depot_tools/man/man1/git-cl.1 +198 -0
- data/vendor/depot_tools/man/man1/git-drover.1 +330 -0
- data/vendor/depot_tools/man/man1/git-footers.1 +144 -0
- data/vendor/depot_tools/man/man1/git-freeze.1 +113 -0
- data/vendor/depot_tools/man/man1/git-hyper-blame.1 +128 -0
- data/vendor/depot_tools/man/man1/git-map-branches.1 +210 -0
- data/vendor/depot_tools/man/man1/git-map.1 +179 -0
- data/vendor/depot_tools/man/man1/git-mark-merge-base.1 +69 -0
- data/vendor/depot_tools/man/man1/git-nav-downstream.1 +112 -0
- data/vendor/depot_tools/man/man1/git-nav-upstream.1 +122 -0
- data/vendor/depot_tools/man/man1/git-new-branch.1 +176 -0
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +177 -0
- data/vendor/depot_tools/man/man1/git-rename-branch.1 +53 -0
- data/vendor/depot_tools/man/man1/git-reparent-branch.1 +93 -0
- data/vendor/depot_tools/man/man1/git-retry.1 +108 -0
- data/vendor/depot_tools/man/man1/git-squash-branch.1 +129 -0
- data/vendor/depot_tools/man/man1/git-thaw.1 +54 -0
- data/vendor/depot_tools/man/man1/git-upstream-diff.1 +153 -0
- data/vendor/depot_tools/man/man7/depot_tools.7 +139 -0
- data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +1061 -0
- data/vendor/depot_tools/man/push_to_gs.sh +4 -0
- data/vendor/depot_tools/man/src/.gitignore +5 -0
- data/vendor/depot_tools/man/src/_aliases.txt +5 -0
- data/vendor/depot_tools/man/src/_footer.txt +8 -0
- data/vendor/depot_tools/man/src/_git-cl_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-drover_desc.helper.txt +2 -0
- data/vendor/depot_tools/man/src/_git-footers_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-freeze_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-hyper-blame_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-map-branches_desc.helper.txt +4 -0
- data/vendor/depot_tools/man/src/_git-map_desc.helper.txt +3 -0
- data/vendor/depot_tools/man/src/_git-mark-merge-base_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-nav-downstream_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-nav-upstream_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-new-branch_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-rebase-update_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-rename-branch_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-reparent-branch_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-retry_desc.helper.txt +2 -0
- data/vendor/depot_tools/man/src/_git-squash-branch_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_git-thaw_desc.helper.txt +2 -0
- data/vendor/depot_tools/man/src/_git-upstream-diff_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/_helper_prefix.txt +1 -0
- data/vendor/depot_tools/man/src/asciidoc-override.css +7 -0
- data/vendor/depot_tools/man/src/common_demo_functions.sh +84 -0
- data/vendor/depot_tools/man/src/demo_repo.sh +43 -0
- data/vendor/depot_tools/man/src/depot_tools.txt +28 -0
- data/vendor/depot_tools/man/src/depot_tools_tutorial.demo.walkthrough.sh +155 -0
- data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +432 -0
- data/vendor/depot_tools/man/src/filter_demo_output.py +141 -0
- data/vendor/depot_tools/man/src/git-cl.txt +119 -0
- data/vendor/depot_tools/man/src/git-drover.demo.1.sh +22 -0
- data/vendor/depot_tools/man/src/git-drover.demo.2.sh +23 -0
- data/vendor/depot_tools/man/src/git-drover.demo.3.sh +27 -0
- data/vendor/depot_tools/man/src/git-drover.demo.4.sh +39 -0
- data/vendor/depot_tools/man/src/git-drover.demo.common.sh +19 -0
- data/vendor/depot_tools/man/src/git-drover.txt +102 -0
- data/vendor/depot_tools/man/src/git-footers.demo.1.sh +17 -0
- data/vendor/depot_tools/man/src/git-footers.txt +71 -0
- data/vendor/depot_tools/man/src/git-freeze.demo.1.sh +23 -0
- data/vendor/depot_tools/man/src/git-freeze.txt +54 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.1.sh +3 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.2.sh +4 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.common.sh +57 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.txt +85 -0
- data/vendor/depot_tools/man/src/git-map-branches.demo.1.sh +8 -0
- data/vendor/depot_tools/man/src/git-map-branches.txt +64 -0
- data/vendor/depot_tools/man/src/git-map.demo.1.sh +3 -0
- data/vendor/depot_tools/man/src/git-map.txt +67 -0
- data/vendor/depot_tools/man/src/git-mark-merge-base.txt +46 -0
- data/vendor/depot_tools/man/src/git-nav-downstream.demo.1.sh +12 -0
- data/vendor/depot_tools/man/src/git-nav-downstream.txt +40 -0
- data/vendor/depot_tools/man/src/git-nav-upstream.demo.1.sh +12 -0
- data/vendor/depot_tools/man/src/git-nav-upstream.txt +39 -0
- data/vendor/depot_tools/man/src/git-new-branch.demo.1.sh +17 -0
- data/vendor/depot_tools/man/src/git-new-branch.txt +82 -0
- data/vendor/depot_tools/man/src/git-rebase-update.txt +141 -0
- data/vendor/depot_tools/man/src/git-rename-branch.txt +28 -0
- data/vendor/depot_tools/man/src/git-reparent-branch.txt +61 -0
- data/vendor/depot_tools/man/src/git-retry.txt +67 -0
- data/vendor/depot_tools/man/src/git-squash-branch.demo.1.sh +12 -0
- data/vendor/depot_tools/man/src/git-squash-branch.txt +59 -0
- data/vendor/depot_tools/man/src/git-thaw.txt +29 -0
- data/vendor/depot_tools/man/src/git-upstream-diff.txt +107 -0
- data/vendor/depot_tools/man/src/make_docs.sh +260 -0
- data/vendor/depot_tools/man/src/prep_demo_repo.sh +103 -0
- data/vendor/depot_tools/metrics.README.md +101 -0
- data/vendor/depot_tools/metrics.py +297 -0
- data/vendor/depot_tools/metrics_utils.py +293 -0
- data/vendor/depot_tools/my_activity.py +971 -0
- data/vendor/depot_tools/ninja +44 -0
- data/vendor/depot_tools/ninja-linux32 +0 -0
- data/vendor/depot_tools/ninja-linux64 +0 -0
- data/vendor/depot_tools/ninja-mac +0 -0
- data/vendor/depot_tools/ninja.exe +0 -0
- data/vendor/depot_tools/ninjalog.README.md +64 -0
- data/vendor/depot_tools/ninjalog_uploader.py +233 -0
- data/vendor/depot_tools/ninjalog_uploader_wrapper.py +125 -0
- data/vendor/depot_tools/owners.py +641 -0
- data/vendor/depot_tools/owners_finder.py +385 -0
- data/vendor/depot_tools/post_build_ninja_summary.py +350 -0
- data/vendor/depot_tools/presubmit_canned_checks.py +1655 -0
- data/vendor/depot_tools/presubmit_support.py +1923 -0
- data/vendor/depot_tools/profile.xml +8 -0
- data/vendor/depot_tools/prpc +13 -0
- data/vendor/depot_tools/prpc.bat +8 -0
- data/vendor/depot_tools/pylint +9 -0
- data/vendor/depot_tools/pylint-1.5 +78 -0
- data/vendor/depot_tools/pylint-1.6 +78 -0
- data/vendor/depot_tools/pylint-1.7 +78 -0
- data/vendor/depot_tools/pylint-1.8 +78 -0
- data/vendor/depot_tools/pylint-1.9 +78 -0
- data/vendor/depot_tools/pylint.bat +12 -0
- data/vendor/depot_tools/pylint_main.py +45 -0
- data/vendor/depot_tools/pylintrc +349 -0
- data/vendor/depot_tools/python-bin/python3 +7 -0
- data/vendor/depot_tools/python_runner.sh +60 -0
- data/vendor/depot_tools/rdb +12 -0
- data/vendor/depot_tools/rdb.bat +7 -0
- data/vendor/depot_tools/recipes/OWNERS +4 -0
- data/vendor/depot_tools/recipes/README.recipes.md +1079 -0
- data/vendor/depot_tools/recipes/recipe_modules/OWNERS +1 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/OWNERS +2 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +38 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +516 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic.json +117 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json +117 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json +118 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json +211 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +194 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json +211 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json +211 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json +210 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json +214 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json +265 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json +65 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_branch_head.json +65 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json +65 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_master.json +65 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/refs.json +212 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json +210 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/resolve_chromium_fixed_version.json +117 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +95 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +209 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +193 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json +265 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json +261 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json +261 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json +265 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json +265 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +265 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +265 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/unrecognized_commit_repo.json +8 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json +211 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.py +308 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/__init__.py +0 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/bot_update.py +1258 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/test_api.py +93 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/tests/do_not_retry_patch_failures_in_cq.py +42 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/tests/ensure_checkout.py +35 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/__init__.py +9 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/api.py +455 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/basic.json +403 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/basic_pkg.json +403 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/describe-failed.json +82 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/describe-many-instances.json +411 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/mac64.json +403 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_file.json +315 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_mode.json +313 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_verfile.json +313 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/win64.json +403 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.py +187 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk arch.json +5 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk bits.json +5 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_32.json +12 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_64.json +12 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_32.json +12 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_64.json +12 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_mips_64.json +12 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/mac_intel_64.json +12 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_32.json +12 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_64.json +12 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/platform_suffix.py +59 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/test_api.py +93 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/__init__.py +9 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/api.py +75 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/examples/full.expected/basic.json +83 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/examples/full.expected/basic_luci.json +83 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/examples/full.expected/win.json +83 -0
- data/vendor/depot_tools/recipes/recipe_modules/depot_tools/examples/full.py +55 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/__init__.py +13 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/api.py +428 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +462 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/basic.json +238 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/revision.json +240 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/tryserver.json +238 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.py +95 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/resources/diff_deps.py +16 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/test_api.py +36 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/diff_deps.expected/basic.json +55 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/diff_deps.expected/dont have revision yet.json +84 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/diff_deps.expected/no change, exception.json +83 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/diff_deps.expected/windows.json +55 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/diff_deps.py +88 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/patch_project.py +92 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/tests/sync_failure.py +24 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/__init__.py +8 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/api.py +178 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +284 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.py +73 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/test_api.py +53 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/__init__.py +11 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/api.py +405 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic.json +217 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_branch.json +217 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json +219 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_hash.json +216 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_ref.json +217 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json +218 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/basic_tags.json +218 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json +164 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json +220 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/cat-file_test.json +239 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json +290 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json +220 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json +222 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json +111 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/curl_trace_file.json +218 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json +265 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/platform_win.json +217 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json +221 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json +219 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json +218 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.py +170 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/resources/git_setup.py +52 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/test_api.py +18 -0
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/__init__.py +5 -0
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/api.py +50 -0
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/config.py +22 -0
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/examples/full.expected/basic.json +105 -0
- data/vendor/depot_tools/recipes/recipe_modules/git_cl/examples/full.py +47 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/OWNERS +2 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/__init__.py +12 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/api.py +257 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.expected/basic.json +596 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py +93 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/resources/gerrit_client.py +251 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/test_api.py +95 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/tests/parse_repo_url.expected/basic.json +5 -0
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/tests/parse_repo_url.py +49 -0
- data/vendor/depot_tools/recipes/recipe_modules/gsutil/__init__.py +4 -0
- data/vendor/depot_tools/recipes/recipe_modules/gsutil/api.py +222 -0
- data/vendor/depot_tools/recipes/recipe_modules/gsutil/examples/full.expected/basic.json +247 -0
- data/vendor/depot_tools/recipes/recipe_modules/gsutil/examples/full.py +92 -0
- data/vendor/depot_tools/recipes/recipe_modules/gsutil/resources/gsutil_smart_retry.py +69 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/__init__.py +36 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/api.py +140 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.expected/ancient_version.json +83 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.expected/automatic_version.json +83 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.expected/explicit_version.json +83 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.expected/linux.json +21 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.expected/mac.json +83 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.expected/win.json +21 -0
- data/vendor/depot_tools/recipes/recipe_modules/osx_sdk/examples/full.py +42 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/__init__.py +27 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/api.py +251 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/examples/full.expected/basic.json +27 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/examples/full.py +19 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/properties.proto +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/test_api.py +19 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/tests/execute.py +247 -0
- data/vendor/depot_tools/recipes/recipe_modules/presubmit/tests/prepare.py +49 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/__init__.py +18 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/api.py +264 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/basic_tags.json +57 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json +190 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json +190 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +21 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch_new.json +22 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.py +95 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/test_api.py +14 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/tests/gerrit_change_fetch_ref_timeout.py +29 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/tests/gerrit_change_owner.expected/basic.json +5 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/tests/gerrit_change_owner.py +22 -0
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/tests/gerrit_change_target_ref.py +32 -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 +21 -0
- data/vendor/depot_tools/recipes/recipe_modules/windows_sdk/examples/full.expected/mac.json +21 -0
- data/vendor/depot_tools/recipes/recipe_modules/windows_sdk/examples/full.expected/win.json +108 -0
- data/vendor/depot_tools/recipes/recipe_modules/windows_sdk/examples/full.py +21 -0
- data/vendor/depot_tools/recipes/recipes.py +249 -0
- data/vendor/depot_tools/recipes/recipes/fetch_end_to_end_test.expected/basic.json +175 -0
- data/vendor/depot_tools/recipes/recipes/fetch_end_to_end_test.py +56 -0
- data/vendor/depot_tools/recipes/trigger_recipe_roller.txt +13 -0
- data/vendor/depot_tools/repo +1194 -0
- data/vendor/depot_tools/roll-dep +21 -0
- data/vendor/depot_tools/roll-dep.bat +21 -0
- data/vendor/depot_tools/roll_dep.py +282 -0
- data/vendor/depot_tools/scm.py +415 -0
- data/vendor/depot_tools/setup_color.py +130 -0
- data/vendor/depot_tools/split_cl.py +263 -0
- data/vendor/depot_tools/subcommand.py +261 -0
- data/vendor/depot_tools/subprocess2.py +258 -0
- data/vendor/depot_tools/third_party/__init__.py +5 -0
- data/vendor/depot_tools/third_party/colorama/LICENSE.txt +27 -0
- data/vendor/depot_tools/third_party/colorama/README.chromium +12 -0
- data/vendor/depot_tools/third_party/colorama/README.rst +346 -0
- data/vendor/depot_tools/third_party/colorama/__init__.py +6 -0
- data/vendor/depot_tools/third_party/colorama/ansi.py +102 -0
- data/vendor/depot_tools/third_party/colorama/ansitowin32.py +257 -0
- data/vendor/depot_tools/third_party/colorama/initialise.py +80 -0
- data/vendor/depot_tools/third_party/colorama/win32.py +152 -0
- data/vendor/depot_tools/third_party/colorama/winterm.py +169 -0
- data/vendor/depot_tools/third_party/coverage/AUTHORS.txt +43 -0
- data/vendor/depot_tools/third_party/coverage/PKG-INFO +41 -0
- data/vendor/depot_tools/third_party/coverage/README.chromium +13 -0
- data/vendor/depot_tools/third_party/coverage/__init__.py +120 -0
- data/vendor/depot_tools/third_party/coverage/__main__.py +4 -0
- data/vendor/depot_tools/third_party/coverage/annotate.py +101 -0
- data/vendor/depot_tools/third_party/coverage/backward.py +184 -0
- data/vendor/depot_tools/third_party/coverage/bytecode.py +75 -0
- data/vendor/depot_tools/third_party/coverage/cmdline.py +740 -0
- data/vendor/depot_tools/third_party/coverage/codeunit.py +145 -0
- data/vendor/depot_tools/third_party/coverage/collector.py +353 -0
- data/vendor/depot_tools/third_party/coverage/config.py +213 -0
- data/vendor/depot_tools/third_party/coverage/control.py +776 -0
- data/vendor/depot_tools/third_party/coverage/data.py +278 -0
- data/vendor/depot_tools/third_party/coverage/debug.py +54 -0
- data/vendor/depot_tools/third_party/coverage/execfile.py +171 -0
- data/vendor/depot_tools/third_party/coverage/files.py +309 -0
- data/vendor/depot_tools/third_party/coverage/fullcoverage/encodings.py +57 -0
- data/vendor/depot_tools/third_party/coverage/html.py +387 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/coverage_html.js +376 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/index.html +104 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/jquery-1.4.3.min.js +166 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/jquery.hotkeys.js +99 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/jquery.isonscreen.js +53 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/jquery.min.js +166 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/jquery.tablesorter.min.js +2 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/keybd_closed.png +0 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/keybd_open.png +0 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/pyfile.html +90 -0
- data/vendor/depot_tools/third_party/coverage/htmlfiles/style.css +300 -0
- data/vendor/depot_tools/third_party/coverage/misc.py +163 -0
- data/vendor/depot_tools/third_party/coverage/parser.py +666 -0
- data/vendor/depot_tools/third_party/coverage/phystokens.py +208 -0
- data/vendor/depot_tools/third_party/coverage/report.py +92 -0
- data/vendor/depot_tools/third_party/coverage/results.py +286 -0
- data/vendor/depot_tools/third_party/coverage/summary.py +86 -0
- data/vendor/depot_tools/third_party/coverage/templite.py +166 -0
- data/vendor/depot_tools/third_party/coverage/version.py +9 -0
- data/vendor/depot_tools/third_party/coverage/xmlreport.py +155 -0
- data/vendor/depot_tools/third_party/httplib2/LICENSE +1339 -0
- data/vendor/depot_tools/third_party/httplib2/README.chromium +15 -0
- data/vendor/depot_tools/third_party/httplib2/__init__.py +1780 -0
- data/vendor/depot_tools/third_party/httplib2/cacerts.txt +2196 -0
- data/vendor/depot_tools/third_party/httplib2/iri2uri.py +110 -0
- data/vendor/depot_tools/third_party/httplib2/socks.py +448 -0
- data/vendor/depot_tools/third_party/repo/COPYING +202 -0
- data/vendor/depot_tools/third_party/repo/README.chromium +4 -0
- data/vendor/depot_tools/third_party/repo/__init__.py +0 -0
- data/vendor/depot_tools/third_party/repo/progress.py +117 -0
- data/vendor/depot_tools/third_party/retry_decorator/LICENSE.google +30 -0
- data/vendor/depot_tools/third_party/retry_decorator/__init__.py +0 -0
- data/vendor/depot_tools/third_party/retry_decorator/decorators.py +45 -0
- data/vendor/depot_tools/third_party/schema/.editorconfig +15 -0
- data/vendor/depot_tools/third_party/schema/.gitignore +174 -0
- data/vendor/depot_tools/third_party/schema/.travis.yml +37 -0
- data/vendor/depot_tools/third_party/schema/LICENSE-MIT +19 -0
- data/vendor/depot_tools/third_party/schema/MANIFEST.in +1 -0
- data/vendor/depot_tools/third_party/schema/README.chromium +12 -0
- data/vendor/depot_tools/third_party/schema/README.rst +382 -0
- data/vendor/depot_tools/third_party/schema/__init__.py +1 -0
- data/vendor/depot_tools/third_party/schema/schema.py +338 -0
- data/vendor/depot_tools/third_party/schema/setup.cfg +5 -0
- data/vendor/depot_tools/third_party/schema/setup.py +30 -0
- data/vendor/depot_tools/third_party/schema/test_schema.py +556 -0
- data/vendor/depot_tools/third_party/schema/tox.ini +33 -0
- data/vendor/depot_tools/third_party/six/LICENSE.txt +18 -0
- data/vendor/depot_tools/third_party/six/README.chromium +10 -0
- data/vendor/depot_tools/third_party/six/__init__.py +762 -0
- data/vendor/depot_tools/update_depot_tools +138 -0
- data/vendor/depot_tools/update_depot_tools.bat +65 -0
- data/vendor/depot_tools/update_depot_tools_toggle.py +38 -0
- data/vendor/depot_tools/upload_metrics.py +26 -0
- data/vendor/depot_tools/upload_to_google_storage.py +306 -0
- data/vendor/depot_tools/vpython +42 -0
- data/vendor/depot_tools/vpython.bat +7 -0
- data/vendor/depot_tools/vpython3 +55 -0
- data/vendor/depot_tools/vpython3.bat +12 -0
- data/vendor/depot_tools/watchlists.py +141 -0
- data/vendor/depot_tools/weekly +54 -0
- data/vendor/depot_tools/win32imports.py +61 -0
- data/vendor/depot_tools/win_toolchain/OWNERS +2 -0
- data/vendor/depot_tools/win_toolchain/README.md +74 -0
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +599 -0
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +524 -0
- data/vendor/depot_tools/wtf +81 -0
- data/vendor/depot_tools/yapf +21 -0
- data/vendor/depot_tools/yapf.bat +12 -0
- data/vendor/depot_tools/zsh-goodies/README +6 -0
- data/vendor/depot_tools/zsh-goodies/_gclient +14 -0
- metadata +729 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
No-op file. Edit this to kick recipes.
|
2
|
+
|
3
|
+
This is a beginning of a story in this silly file.
|
4
|
+
Once upon a time, a budding web browser dev team needed a CI system.
|
5
|
+
All they had was one poor machine under a desk, and its name was Batty,
|
6
|
+
the Build and Test Yeti.
|
7
|
+
|
8
|
+
As the CI needs of the browser grew, Batty, the Build and Test Yeti, got
|
9
|
+
a new friend, but this information was marked RVG, so it was months before
|
10
|
+
any details were revealed.
|
11
|
+
|
12
|
+
|
13
|
+
The End!
|
@@ -0,0 +1,1194 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# -*- coding:utf-8 -*-
|
3
|
+
#
|
4
|
+
# Copyright (C) 2008 The Android Open Source Project
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
|
18
|
+
"""Repo launcher.
|
19
|
+
|
20
|
+
This is a standalone tool that people may copy to anywhere in their system.
|
21
|
+
It is used to get an initial repo client checkout, and after that it runs the
|
22
|
+
copy of repo in the checkout.
|
23
|
+
"""
|
24
|
+
|
25
|
+
from __future__ import print_function
|
26
|
+
|
27
|
+
import datetime
|
28
|
+
import os
|
29
|
+
import platform
|
30
|
+
import shlex
|
31
|
+
import subprocess
|
32
|
+
import sys
|
33
|
+
|
34
|
+
|
35
|
+
# Keep basic logic in sync with repo_trace.py.
|
36
|
+
class Trace(object):
|
37
|
+
"""Trace helper logic."""
|
38
|
+
|
39
|
+
REPO_TRACE = 'REPO_TRACE'
|
40
|
+
|
41
|
+
def __init__(self):
|
42
|
+
self.set(os.environ.get(self.REPO_TRACE) == '1')
|
43
|
+
|
44
|
+
def set(self, value):
|
45
|
+
self.enabled = bool(value)
|
46
|
+
|
47
|
+
def print(self, *args, **kwargs):
|
48
|
+
if self.enabled:
|
49
|
+
print(*args, **kwargs)
|
50
|
+
|
51
|
+
|
52
|
+
trace = Trace()
|
53
|
+
|
54
|
+
|
55
|
+
def exec_command(cmd):
|
56
|
+
"""Execute |cmd| or return None on failure."""
|
57
|
+
trace.print(':', ' '.join(cmd))
|
58
|
+
try:
|
59
|
+
if platform.system() == 'Windows':
|
60
|
+
ret = subprocess.call(cmd)
|
61
|
+
sys.exit(ret)
|
62
|
+
else:
|
63
|
+
os.execvp(cmd[0], cmd)
|
64
|
+
except Exception:
|
65
|
+
pass
|
66
|
+
|
67
|
+
|
68
|
+
def check_python_version():
|
69
|
+
"""Make sure the active Python version is recent enough."""
|
70
|
+
def reexec(prog):
|
71
|
+
exec_command([prog] + sys.argv)
|
72
|
+
|
73
|
+
MIN_PYTHON_VERSION = (3, 6)
|
74
|
+
|
75
|
+
ver = sys.version_info
|
76
|
+
major = ver.major
|
77
|
+
minor = ver.minor
|
78
|
+
|
79
|
+
# Abort on very old Python 2 versions.
|
80
|
+
if (major, minor) < (2, 7):
|
81
|
+
print('repo: error: Your Python version is too old. '
|
82
|
+
'Please use Python {}.{} or newer instead.'.format(
|
83
|
+
*MIN_PYTHON_VERSION), file=sys.stderr)
|
84
|
+
sys.exit(1)
|
85
|
+
|
86
|
+
# Try to re-exec the version specific Python 3 if needed.
|
87
|
+
if (major, minor) < MIN_PYTHON_VERSION:
|
88
|
+
# Python makes releases ~once a year, so try our min version +10 to help
|
89
|
+
# bridge the gap. This is the fallback anyways so perf isn't critical.
|
90
|
+
min_major, min_minor = MIN_PYTHON_VERSION
|
91
|
+
for inc in range(0, 10):
|
92
|
+
reexec('python{}.{}'.format(min_major, min_minor + inc))
|
93
|
+
|
94
|
+
# Try the generic Python 3 wrapper, but only if it's new enough. We don't
|
95
|
+
# want to go from (still supported) Python 2.7 to (unsupported) Python 3.5.
|
96
|
+
try:
|
97
|
+
proc = subprocess.Popen(
|
98
|
+
['python3', '-c', 'import sys; '
|
99
|
+
'print(sys.version_info.major, sys.version_info.minor)'],
|
100
|
+
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
101
|
+
(output, _) = proc.communicate()
|
102
|
+
python3_ver = tuple(int(x) for x in output.decode('utf-8').split())
|
103
|
+
except (OSError, subprocess.CalledProcessError):
|
104
|
+
python3_ver = None
|
105
|
+
|
106
|
+
# The python3 version looks like it's new enough, so give it a try.
|
107
|
+
if python3_ver and python3_ver >= MIN_PYTHON_VERSION:
|
108
|
+
reexec('python3')
|
109
|
+
|
110
|
+
# We're still here, so diagnose things for the user.
|
111
|
+
if major < 3:
|
112
|
+
print('repo: warning: Python 2 is no longer supported; '
|
113
|
+
'Please upgrade to Python {}.{}+.'.format(*MIN_PYTHON_VERSION),
|
114
|
+
file=sys.stderr)
|
115
|
+
else:
|
116
|
+
print('repo: error: Python 3 version is too old; '
|
117
|
+
'Please use Python {}.{} or newer.'.format(*MIN_PYTHON_VERSION),
|
118
|
+
file=sys.stderr)
|
119
|
+
sys.exit(1)
|
120
|
+
|
121
|
+
|
122
|
+
if __name__ == '__main__':
|
123
|
+
check_python_version()
|
124
|
+
|
125
|
+
|
126
|
+
# repo default configuration
|
127
|
+
#
|
128
|
+
REPO_URL = os.environ.get('REPO_URL', None)
|
129
|
+
if not REPO_URL:
|
130
|
+
REPO_URL = 'https://chromium.googlesource.com/external/repo'
|
131
|
+
REPO_REV = os.environ.get('REPO_REV')
|
132
|
+
if not REPO_REV:
|
133
|
+
REPO_REV = 'stable'
|
134
|
+
|
135
|
+
# increment this whenever we make important changes to this script
|
136
|
+
VERSION = (2, 8)
|
137
|
+
|
138
|
+
# increment this if the MAINTAINER_KEYS block is modified
|
139
|
+
KEYRING_VERSION = (2, 3)
|
140
|
+
|
141
|
+
# Each individual key entry is created by using:
|
142
|
+
# gpg --armor --export keyid
|
143
|
+
MAINTAINER_KEYS = """
|
144
|
+
|
145
|
+
Repo Maintainer <repo@android.kernel.org>
|
146
|
+
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
147
|
+
|
148
|
+
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
|
213
|
+
cZ7aFsJF4PtcDrfdejyAxbtsSHI=
|
214
|
+
=82Tj
|
215
|
+
-----END PGP PUBLIC KEY BLOCK-----
|
216
|
+
"""
|
217
|
+
|
218
|
+
GIT = 'git' # our git command
|
219
|
+
# NB: The version of git that the repo launcher requires may be much older than
|
220
|
+
# the version of git that the main repo source tree requires. Keeping this at
|
221
|
+
# an older version also makes it easier for users to upgrade/rollback as needed.
|
222
|
+
#
|
223
|
+
# git-1.7 is in (EOL) Ubuntu Precise.
|
224
|
+
MIN_GIT_VERSION = (1, 7, 2) # minimum supported git version
|
225
|
+
repodir = '.repo' # name of repo's private directory
|
226
|
+
S_repo = 'repo' # special repo repository
|
227
|
+
S_manifests = 'manifests' # special manifest repository
|
228
|
+
REPO_MAIN = S_repo + '/main.py' # main script
|
229
|
+
GITC_CONFIG_FILE = '/gitc/.config'
|
230
|
+
GITC_FS_ROOT_DIR = '/gitc/manifest-rw/'
|
231
|
+
|
232
|
+
|
233
|
+
import collections
|
234
|
+
import errno
|
235
|
+
import optparse
|
236
|
+
import re
|
237
|
+
import shutil
|
238
|
+
import stat
|
239
|
+
|
240
|
+
if sys.version_info[0] == 3:
|
241
|
+
import urllib.request
|
242
|
+
import urllib.error
|
243
|
+
else:
|
244
|
+
import imp
|
245
|
+
import urllib2
|
246
|
+
urllib = imp.new_module('urllib')
|
247
|
+
urllib.request = urllib2
|
248
|
+
urllib.error = urllib2
|
249
|
+
|
250
|
+
|
251
|
+
home_dot_repo = os.path.expanduser('~/.repoconfig')
|
252
|
+
gpg_dir = os.path.join(home_dot_repo, 'gnupg')
|
253
|
+
|
254
|
+
|
255
|
+
def GetParser(gitc_init=False):
|
256
|
+
"""Setup the CLI parser."""
|
257
|
+
if gitc_init:
|
258
|
+
usage = 'repo gitc-init -u url -c client [options]'
|
259
|
+
else:
|
260
|
+
usage = 'repo init -u url [options]'
|
261
|
+
|
262
|
+
parser = optparse.OptionParser(usage=usage)
|
263
|
+
|
264
|
+
# Logging.
|
265
|
+
group = parser.add_option_group('Logging options')
|
266
|
+
group.add_option('-v', '--verbose',
|
267
|
+
dest='output_mode', action='store_true',
|
268
|
+
help='show all output')
|
269
|
+
group.add_option('-q', '--quiet',
|
270
|
+
dest='output_mode', action='store_false',
|
271
|
+
help='only show errors')
|
272
|
+
|
273
|
+
# Manifest.
|
274
|
+
group = parser.add_option_group('Manifest options')
|
275
|
+
group.add_option('-u', '--manifest-url',
|
276
|
+
help='manifest repository location', metavar='URL')
|
277
|
+
group.add_option('-b', '--manifest-branch',
|
278
|
+
help='manifest branch or revision', metavar='REVISION')
|
279
|
+
group.add_option('-m', '--manifest-name',
|
280
|
+
help='initial manifest file', metavar='NAME.xml')
|
281
|
+
cbr_opts = ['--current-branch']
|
282
|
+
# The gitc-init subcommand allocates -c itself, but a lot of init users
|
283
|
+
# want -c, so try to satisfy both as best we can.
|
284
|
+
if not gitc_init:
|
285
|
+
cbr_opts += ['-c']
|
286
|
+
group.add_option(*cbr_opts,
|
287
|
+
dest='current_branch_only', action='store_true',
|
288
|
+
help='fetch only current manifest branch from server')
|
289
|
+
group.add_option('--mirror', action='store_true',
|
290
|
+
help='create a replica of the remote repositories '
|
291
|
+
'rather than a client working directory')
|
292
|
+
group.add_option('--reference',
|
293
|
+
help='location of mirror directory', metavar='DIR')
|
294
|
+
group.add_option('--dissociate', action='store_true',
|
295
|
+
help='dissociate from reference mirrors after clone')
|
296
|
+
group.add_option('--depth', type='int', default=None,
|
297
|
+
help='create a shallow clone with given depth; '
|
298
|
+
'see git clone')
|
299
|
+
group.add_option('--partial-clone', action='store_true',
|
300
|
+
help='perform partial clone (https://git-scm.com/'
|
301
|
+
'docs/gitrepository-layout#_code_partialclone_code)')
|
302
|
+
group.add_option('--clone-filter', action='store', default='blob:none',
|
303
|
+
help='filter for use with --partial-clone '
|
304
|
+
'[default: %default]')
|
305
|
+
group.add_option('--worktree', action='store_true',
|
306
|
+
help=optparse.SUPPRESS_HELP)
|
307
|
+
group.add_option('--archive', action='store_true',
|
308
|
+
help='checkout an archive instead of a git repository for '
|
309
|
+
'each project. See git archive.')
|
310
|
+
group.add_option('--submodules', action='store_true',
|
311
|
+
help='sync any submodules associated with the manifest repo')
|
312
|
+
group.add_option('-g', '--groups', default='default',
|
313
|
+
help='restrict manifest projects to ones with specified '
|
314
|
+
'group(s) [default|all|G1,G2,G3|G4,-G5,-G6]',
|
315
|
+
metavar='GROUP')
|
316
|
+
group.add_option('-p', '--platform', default='auto',
|
317
|
+
help='restrict manifest projects to ones with a specified '
|
318
|
+
'platform group [auto|all|none|linux|darwin|...]',
|
319
|
+
metavar='PLATFORM')
|
320
|
+
group.add_option('--clone-bundle', action='store_true',
|
321
|
+
help='enable use of /clone.bundle on HTTP/HTTPS (default if not --partial-clone)')
|
322
|
+
group.add_option('--no-clone-bundle',
|
323
|
+
dest='clone_bundle', action='store_false',
|
324
|
+
help='disable use of /clone.bundle on HTTP/HTTPS (default if --partial-clone)')
|
325
|
+
group.add_option('--no-tags',
|
326
|
+
dest='tags', default=True, action='store_false',
|
327
|
+
help="don't fetch tags in the manifest")
|
328
|
+
|
329
|
+
# Tool.
|
330
|
+
group = parser.add_option_group('repo Version options')
|
331
|
+
group.add_option('--repo-url', metavar='URL',
|
332
|
+
help='repo repository location ($REPO_URL)')
|
333
|
+
group.add_option('--repo-rev', metavar='REV',
|
334
|
+
help='repo branch or revision ($REPO_REV)')
|
335
|
+
group.add_option('--repo-branch', dest='repo_rev',
|
336
|
+
help=optparse.SUPPRESS_HELP)
|
337
|
+
group.add_option('--no-repo-verify',
|
338
|
+
dest='repo_verify', default=True, action='store_false',
|
339
|
+
help='do not verify repo source code')
|
340
|
+
|
341
|
+
# Other.
|
342
|
+
group = parser.add_option_group('Other options')
|
343
|
+
group.add_option('--config-name',
|
344
|
+
action='store_true', default=False,
|
345
|
+
help='Always prompt for name/e-mail')
|
346
|
+
|
347
|
+
# gitc-init specific settings.
|
348
|
+
if gitc_init:
|
349
|
+
group = parser.add_option_group('GITC options')
|
350
|
+
group.add_option('-f', '--manifest-file',
|
351
|
+
help='Optional manifest file to use for this GITC client.')
|
352
|
+
group.add_option('-c', '--gitc-client',
|
353
|
+
help='Name of the gitc_client instance to create or modify.')
|
354
|
+
|
355
|
+
return parser
|
356
|
+
|
357
|
+
|
358
|
+
# This is a poor replacement for subprocess.run until we require Python 3.6+.
|
359
|
+
RunResult = collections.namedtuple(
|
360
|
+
'RunResult', ('returncode', 'stdout', 'stderr'))
|
361
|
+
|
362
|
+
|
363
|
+
class RunError(Exception):
|
364
|
+
"""Error when running a command failed."""
|
365
|
+
|
366
|
+
|
367
|
+
def run_command(cmd, **kwargs):
|
368
|
+
"""Run |cmd| and return its output."""
|
369
|
+
check = kwargs.pop('check', False)
|
370
|
+
if kwargs.pop('capture_output', False):
|
371
|
+
kwargs.setdefault('stdout', subprocess.PIPE)
|
372
|
+
kwargs.setdefault('stderr', subprocess.PIPE)
|
373
|
+
cmd_input = kwargs.pop('input', None)
|
374
|
+
|
375
|
+
def decode(output):
|
376
|
+
"""Decode |output| to text."""
|
377
|
+
if output is None:
|
378
|
+
return output
|
379
|
+
try:
|
380
|
+
return output.decode('utf-8')
|
381
|
+
except UnicodeError:
|
382
|
+
print('repo: warning: Invalid UTF-8 output:\ncmd: %r\n%r' % (cmd, output),
|
383
|
+
file=sys.stderr)
|
384
|
+
# TODO(vapier): Once we require Python 3, use 'backslashreplace'.
|
385
|
+
return output.decode('utf-8', 'replace')
|
386
|
+
|
387
|
+
# Run & package the results.
|
388
|
+
proc = subprocess.Popen(cmd, **kwargs)
|
389
|
+
(stdout, stderr) = proc.communicate(input=cmd_input)
|
390
|
+
dbg = ': ' + ' '.join(cmd)
|
391
|
+
if cmd_input is not None:
|
392
|
+
dbg += ' 0<|'
|
393
|
+
if stdout == subprocess.PIPE:
|
394
|
+
dbg += ' 1>|'
|
395
|
+
if stderr == subprocess.PIPE:
|
396
|
+
dbg += ' 2>|'
|
397
|
+
elif stderr == subprocess.STDOUT:
|
398
|
+
dbg += ' 2>&1'
|
399
|
+
trace.print(dbg)
|
400
|
+
ret = RunResult(proc.returncode, decode(stdout), decode(stderr))
|
401
|
+
|
402
|
+
# If things failed, print useful debugging output.
|
403
|
+
if check and ret.returncode:
|
404
|
+
print('repo: error: "%s" failed with exit status %s' %
|
405
|
+
(cmd[0], ret.returncode), file=sys.stderr)
|
406
|
+
print(' cwd: %s\n cmd: %r' %
|
407
|
+
(kwargs.get('cwd', os.getcwd()), cmd), file=sys.stderr)
|
408
|
+
|
409
|
+
def _print_output(name, output):
|
410
|
+
if output:
|
411
|
+
print(' %s:\n >> %s' % (name, '\n >> '.join(output.splitlines())),
|
412
|
+
file=sys.stderr)
|
413
|
+
|
414
|
+
_print_output('stdout', ret.stdout)
|
415
|
+
_print_output('stderr', ret.stderr)
|
416
|
+
raise RunError(ret)
|
417
|
+
|
418
|
+
return ret
|
419
|
+
|
420
|
+
|
421
|
+
_gitc_manifest_dir = None
|
422
|
+
|
423
|
+
|
424
|
+
def get_gitc_manifest_dir():
|
425
|
+
global _gitc_manifest_dir
|
426
|
+
if _gitc_manifest_dir is None:
|
427
|
+
_gitc_manifest_dir = ''
|
428
|
+
try:
|
429
|
+
with open(GITC_CONFIG_FILE, 'r') as gitc_config:
|
430
|
+
for line in gitc_config:
|
431
|
+
match = re.match('gitc_dir=(?P<gitc_manifest_dir>.*)', line)
|
432
|
+
if match:
|
433
|
+
_gitc_manifest_dir = match.group('gitc_manifest_dir')
|
434
|
+
except IOError:
|
435
|
+
pass
|
436
|
+
return _gitc_manifest_dir
|
437
|
+
|
438
|
+
|
439
|
+
def gitc_parse_clientdir(gitc_fs_path):
|
440
|
+
"""Parse a path in the GITC FS and return its client name.
|
441
|
+
|
442
|
+
@param gitc_fs_path: A subdirectory path within the GITC_FS_ROOT_DIR.
|
443
|
+
|
444
|
+
@returns: The GITC client name
|
445
|
+
"""
|
446
|
+
if gitc_fs_path == GITC_FS_ROOT_DIR:
|
447
|
+
return None
|
448
|
+
if not gitc_fs_path.startswith(GITC_FS_ROOT_DIR):
|
449
|
+
manifest_dir = get_gitc_manifest_dir()
|
450
|
+
if manifest_dir == '':
|
451
|
+
return None
|
452
|
+
if manifest_dir[-1] != '/':
|
453
|
+
manifest_dir += '/'
|
454
|
+
if gitc_fs_path == manifest_dir:
|
455
|
+
return None
|
456
|
+
if not gitc_fs_path.startswith(manifest_dir):
|
457
|
+
return None
|
458
|
+
return gitc_fs_path.split(manifest_dir)[1].split('/')[0]
|
459
|
+
return gitc_fs_path.split(GITC_FS_ROOT_DIR)[1].split('/')[0]
|
460
|
+
|
461
|
+
|
462
|
+
class CloneFailure(Exception):
|
463
|
+
|
464
|
+
"""Indicate the remote clone of repo itself failed.
|
465
|
+
"""
|
466
|
+
|
467
|
+
|
468
|
+
def check_repo_verify(repo_verify, quiet=False):
|
469
|
+
"""Check the --repo-verify state."""
|
470
|
+
if not repo_verify:
|
471
|
+
print('repo: warning: verification of repo code has been disabled;\n'
|
472
|
+
'repo will not be able to verify the integrity of itself.\n',
|
473
|
+
file=sys.stderr)
|
474
|
+
return False
|
475
|
+
|
476
|
+
if NeedSetupGnuPG():
|
477
|
+
return SetupGnuPG(quiet)
|
478
|
+
|
479
|
+
return True
|
480
|
+
|
481
|
+
|
482
|
+
def check_repo_rev(dst, rev, repo_verify=True, quiet=False):
|
483
|
+
"""Check that |rev| is valid."""
|
484
|
+
do_verify = check_repo_verify(repo_verify, quiet=quiet)
|
485
|
+
remote_ref, local_rev = resolve_repo_rev(dst, rev)
|
486
|
+
if not quiet and not remote_ref.startswith('refs/heads/'):
|
487
|
+
print('warning: repo is not tracking a remote branch, so it will not '
|
488
|
+
'receive updates', file=sys.stderr)
|
489
|
+
if do_verify:
|
490
|
+
rev = verify_rev(dst, remote_ref, local_rev, quiet)
|
491
|
+
else:
|
492
|
+
rev = local_rev
|
493
|
+
return (remote_ref, rev)
|
494
|
+
|
495
|
+
|
496
|
+
def _Init(args, gitc_init=False):
|
497
|
+
"""Installs repo by cloning it over the network.
|
498
|
+
"""
|
499
|
+
parser = GetParser(gitc_init=gitc_init)
|
500
|
+
opt, args = parser.parse_args(args)
|
501
|
+
if args:
|
502
|
+
parser.print_usage()
|
503
|
+
sys.exit(1)
|
504
|
+
opt.quiet = opt.output_mode is False
|
505
|
+
opt.verbose = opt.output_mode is True
|
506
|
+
|
507
|
+
if opt.clone_bundle is None:
|
508
|
+
opt.clone_bundle = False if opt.partial_clone else True
|
509
|
+
|
510
|
+
url = opt.repo_url or REPO_URL
|
511
|
+
rev = opt.repo_rev or REPO_REV
|
512
|
+
|
513
|
+
try:
|
514
|
+
if gitc_init:
|
515
|
+
gitc_manifest_dir = get_gitc_manifest_dir()
|
516
|
+
if not gitc_manifest_dir:
|
517
|
+
print('fatal: GITC filesystem is not available. Exiting...',
|
518
|
+
file=sys.stderr)
|
519
|
+
sys.exit(1)
|
520
|
+
gitc_client = opt.gitc_client
|
521
|
+
if not gitc_client:
|
522
|
+
gitc_client = gitc_parse_clientdir(os.getcwd())
|
523
|
+
if not gitc_client:
|
524
|
+
print('fatal: GITC client (-c) is required.', file=sys.stderr)
|
525
|
+
sys.exit(1)
|
526
|
+
client_dir = os.path.join(gitc_manifest_dir, gitc_client)
|
527
|
+
if not os.path.exists(client_dir):
|
528
|
+
os.makedirs(client_dir)
|
529
|
+
os.chdir(client_dir)
|
530
|
+
if os.path.exists(repodir):
|
531
|
+
# This GITC Client has already initialized repo so continue.
|
532
|
+
return
|
533
|
+
|
534
|
+
os.mkdir(repodir)
|
535
|
+
except OSError as e:
|
536
|
+
if e.errno != errno.EEXIST:
|
537
|
+
print('fatal: cannot make %s directory: %s'
|
538
|
+
% (repodir, e.strerror), file=sys.stderr)
|
539
|
+
# Don't raise CloneFailure; that would delete the
|
540
|
+
# name. Instead exit immediately.
|
541
|
+
#
|
542
|
+
sys.exit(1)
|
543
|
+
|
544
|
+
_CheckGitVersion()
|
545
|
+
try:
|
546
|
+
if not opt.quiet:
|
547
|
+
print('Downloading Repo source from', url)
|
548
|
+
dst = os.path.abspath(os.path.join(repodir, S_repo))
|
549
|
+
_Clone(url, dst, opt.clone_bundle, opt.quiet, opt.verbose)
|
550
|
+
|
551
|
+
remote_ref, rev = check_repo_rev(dst, rev, opt.repo_verify, quiet=opt.quiet)
|
552
|
+
_Checkout(dst, remote_ref, rev, opt.quiet)
|
553
|
+
|
554
|
+
if not os.path.isfile(os.path.join(dst, 'repo')):
|
555
|
+
print("warning: '%s' does not look like a git-repo repository, is "
|
556
|
+
"REPO_URL set correctly?" % url, file=sys.stderr)
|
557
|
+
|
558
|
+
except CloneFailure:
|
559
|
+
if opt.quiet:
|
560
|
+
print('fatal: repo init failed; run without --quiet to see why',
|
561
|
+
file=sys.stderr)
|
562
|
+
raise
|
563
|
+
|
564
|
+
|
565
|
+
def run_git(*args, **kwargs):
|
566
|
+
"""Run git and return execution details."""
|
567
|
+
kwargs.setdefault('capture_output', True)
|
568
|
+
kwargs.setdefault('check', True)
|
569
|
+
try:
|
570
|
+
return run_command([GIT] + list(args), **kwargs)
|
571
|
+
except OSError as e:
|
572
|
+
print(file=sys.stderr)
|
573
|
+
print('repo: error: "%s" is not available' % GIT, file=sys.stderr)
|
574
|
+
print('repo: error: %s' % e, file=sys.stderr)
|
575
|
+
print(file=sys.stderr)
|
576
|
+
print('Please make sure %s is installed and in your path.' % GIT,
|
577
|
+
file=sys.stderr)
|
578
|
+
sys.exit(1)
|
579
|
+
except RunError:
|
580
|
+
raise CloneFailure()
|
581
|
+
|
582
|
+
|
583
|
+
# The git version info broken down into components for easy analysis.
|
584
|
+
# Similar to Python's sys.version_info.
|
585
|
+
GitVersion = collections.namedtuple(
|
586
|
+
'GitVersion', ('major', 'minor', 'micro', 'full'))
|
587
|
+
|
588
|
+
|
589
|
+
def ParseGitVersion(ver_str=None):
|
590
|
+
if ver_str is None:
|
591
|
+
# Load the version ourselves.
|
592
|
+
ver_str = run_git('--version').stdout
|
593
|
+
|
594
|
+
if not ver_str.startswith('git version '):
|
595
|
+
return None
|
596
|
+
|
597
|
+
full_version = ver_str[len('git version '):].strip()
|
598
|
+
num_ver_str = full_version.split('-')[0]
|
599
|
+
to_tuple = []
|
600
|
+
for num_str in num_ver_str.split('.')[:3]:
|
601
|
+
if num_str.isdigit():
|
602
|
+
to_tuple.append(int(num_str))
|
603
|
+
else:
|
604
|
+
to_tuple.append(0)
|
605
|
+
to_tuple.append(full_version)
|
606
|
+
return GitVersion(*to_tuple)
|
607
|
+
|
608
|
+
|
609
|
+
def _CheckGitVersion():
|
610
|
+
ver_act = ParseGitVersion()
|
611
|
+
if ver_act is None:
|
612
|
+
print('fatal: unable to detect git version', file=sys.stderr)
|
613
|
+
raise CloneFailure()
|
614
|
+
|
615
|
+
if ver_act < MIN_GIT_VERSION:
|
616
|
+
need = '.'.join(map(str, MIN_GIT_VERSION))
|
617
|
+
print('fatal: git %s or later required; found %s' % (need, ver_act.full),
|
618
|
+
file=sys.stderr)
|
619
|
+
raise CloneFailure()
|
620
|
+
|
621
|
+
|
622
|
+
def SetGitTrace2ParentSid(env=None):
|
623
|
+
"""Set up GIT_TRACE2_PARENT_SID for git tracing."""
|
624
|
+
# We roughly follow the format git itself uses in trace2/tr2_sid.c.
|
625
|
+
# (1) Be unique (2) be valid filename (3) be fixed length.
|
626
|
+
#
|
627
|
+
# Since we always export this variable, we try to avoid more expensive calls.
|
628
|
+
# e.g. We don't attempt hostname lookups or hashing the results.
|
629
|
+
if env is None:
|
630
|
+
env = os.environ
|
631
|
+
|
632
|
+
KEY = 'GIT_TRACE2_PARENT_SID'
|
633
|
+
|
634
|
+
now = datetime.datetime.utcnow()
|
635
|
+
value = 'repo-%s-P%08x' % (now.strftime('%Y%m%dT%H%M%SZ'), os.getpid())
|
636
|
+
|
637
|
+
# If it's already set, then append ourselves.
|
638
|
+
if KEY in env:
|
639
|
+
value = env[KEY] + '/' + value
|
640
|
+
|
641
|
+
_setenv(KEY, value, env=env)
|
642
|
+
|
643
|
+
|
644
|
+
def _setenv(key, value, env=None):
|
645
|
+
"""Set |key| in the OS environment |env| to |value|."""
|
646
|
+
if env is None:
|
647
|
+
env = os.environ
|
648
|
+
# Environment handling across systems is messy.
|
649
|
+
try:
|
650
|
+
env[key] = value
|
651
|
+
except UnicodeEncodeError:
|
652
|
+
env[key] = value.encode()
|
653
|
+
|
654
|
+
|
655
|
+
def NeedSetupGnuPG():
|
656
|
+
if not os.path.isdir(home_dot_repo):
|
657
|
+
return True
|
658
|
+
|
659
|
+
kv = os.path.join(home_dot_repo, 'keyring-version')
|
660
|
+
if not os.path.exists(kv):
|
661
|
+
return True
|
662
|
+
|
663
|
+
kv = open(kv).read()
|
664
|
+
if not kv:
|
665
|
+
return True
|
666
|
+
|
667
|
+
kv = tuple(map(int, kv.split('.')))
|
668
|
+
if kv < KEYRING_VERSION:
|
669
|
+
return True
|
670
|
+
return False
|
671
|
+
|
672
|
+
|
673
|
+
def SetupGnuPG(quiet):
|
674
|
+
try:
|
675
|
+
os.mkdir(home_dot_repo)
|
676
|
+
except OSError as e:
|
677
|
+
if e.errno != errno.EEXIST:
|
678
|
+
print('fatal: cannot make %s directory: %s'
|
679
|
+
% (home_dot_repo, e.strerror), file=sys.stderr)
|
680
|
+
sys.exit(1)
|
681
|
+
|
682
|
+
try:
|
683
|
+
os.mkdir(gpg_dir, stat.S_IRWXU)
|
684
|
+
except OSError as e:
|
685
|
+
if e.errno != errno.EEXIST:
|
686
|
+
print('fatal: cannot make %s directory: %s' % (gpg_dir, e.strerror),
|
687
|
+
file=sys.stderr)
|
688
|
+
sys.exit(1)
|
689
|
+
|
690
|
+
if not quiet:
|
691
|
+
print('repo: Updating release signing keys to keyset ver %s' %
|
692
|
+
('.'.join(str(x) for x in KEYRING_VERSION),))
|
693
|
+
# NB: We use --homedir (and cwd below) because some environments (Windows) do
|
694
|
+
# not correctly handle full native paths. We avoid the issue by changing to
|
695
|
+
# the right dir with cwd=gpg_dir before executing gpg, and then telling gpg to
|
696
|
+
# use the cwd (.) as its homedir which leaves the path resolution logic to it.
|
697
|
+
cmd = ['gpg', '--homedir', '.', '--import']
|
698
|
+
try:
|
699
|
+
# gpg can be pretty chatty. Always capture the output and if something goes
|
700
|
+
# wrong, the builtin check failure will dump stdout & stderr for debugging.
|
701
|
+
run_command(cmd, stdin=subprocess.PIPE, capture_output=True,
|
702
|
+
cwd=gpg_dir, check=True,
|
703
|
+
input=MAINTAINER_KEYS.encode('utf-8'))
|
704
|
+
except OSError:
|
705
|
+
if not quiet:
|
706
|
+
print('warning: gpg (GnuPG) is not available.', file=sys.stderr)
|
707
|
+
print('warning: Installing it is strongly encouraged.', file=sys.stderr)
|
708
|
+
print(file=sys.stderr)
|
709
|
+
return False
|
710
|
+
|
711
|
+
with open(os.path.join(home_dot_repo, 'keyring-version'), 'w') as fd:
|
712
|
+
fd.write('.'.join(map(str, KEYRING_VERSION)) + '\n')
|
713
|
+
return True
|
714
|
+
|
715
|
+
|
716
|
+
def _SetConfig(cwd, name, value):
|
717
|
+
"""Set a git configuration option to the specified value.
|
718
|
+
"""
|
719
|
+
run_git('config', name, value, cwd=cwd)
|
720
|
+
|
721
|
+
|
722
|
+
def _GetRepoConfig(name):
|
723
|
+
"""Read a repo configuration option."""
|
724
|
+
config = os.path.join(home_dot_repo, 'config')
|
725
|
+
if not os.path.exists(config):
|
726
|
+
return None
|
727
|
+
|
728
|
+
cmd = ['config', '--file', config, '--get', name]
|
729
|
+
ret = run_git(*cmd, check=False)
|
730
|
+
if ret.returncode == 0:
|
731
|
+
return ret.stdout
|
732
|
+
elif ret.returncode == 1:
|
733
|
+
return None
|
734
|
+
else:
|
735
|
+
print('repo: error: git %s failed:\n%s' % (' '.join(cmd), ret.stderr),
|
736
|
+
file=sys.stderr)
|
737
|
+
raise RunError()
|
738
|
+
|
739
|
+
|
740
|
+
def _InitHttp():
|
741
|
+
handlers = []
|
742
|
+
|
743
|
+
mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm()
|
744
|
+
try:
|
745
|
+
import netrc
|
746
|
+
n = netrc.netrc()
|
747
|
+
for host in n.hosts:
|
748
|
+
p = n.hosts[host]
|
749
|
+
mgr.add_password(p[1], 'http://%s/' % host, p[0], p[2])
|
750
|
+
mgr.add_password(p[1], 'https://%s/' % host, p[0], p[2])
|
751
|
+
except Exception:
|
752
|
+
pass
|
753
|
+
handlers.append(urllib.request.HTTPBasicAuthHandler(mgr))
|
754
|
+
handlers.append(urllib.request.HTTPDigestAuthHandler(mgr))
|
755
|
+
|
756
|
+
if 'http_proxy' in os.environ:
|
757
|
+
url = os.environ['http_proxy']
|
758
|
+
handlers.append(urllib.request.ProxyHandler({'http': url, 'https': url}))
|
759
|
+
if 'REPO_CURL_VERBOSE' in os.environ:
|
760
|
+
handlers.append(urllib.request.HTTPHandler(debuglevel=1))
|
761
|
+
handlers.append(urllib.request.HTTPSHandler(debuglevel=1))
|
762
|
+
urllib.request.install_opener(urllib.request.build_opener(*handlers))
|
763
|
+
|
764
|
+
|
765
|
+
def _Fetch(url, cwd, src, quiet, verbose):
|
766
|
+
cmd = ['fetch']
|
767
|
+
if not verbose:
|
768
|
+
cmd.append('--quiet')
|
769
|
+
err = None
|
770
|
+
if not quiet and sys.stdout.isatty():
|
771
|
+
cmd.append('--progress')
|
772
|
+
elif not verbose:
|
773
|
+
err = subprocess.PIPE
|
774
|
+
cmd.append(src)
|
775
|
+
cmd.append('+refs/heads/*:refs/remotes/origin/*')
|
776
|
+
cmd.append('+refs/tags/*:refs/tags/*')
|
777
|
+
run_git(*cmd, stderr=err, capture_output=False, cwd=cwd)
|
778
|
+
|
779
|
+
|
780
|
+
def _DownloadBundle(url, cwd, quiet, verbose):
|
781
|
+
if not url.endswith('/'):
|
782
|
+
url += '/'
|
783
|
+
url += 'clone.bundle'
|
784
|
+
|
785
|
+
ret = run_git('config', '--get-regexp', 'url.*.insteadof', cwd=cwd,
|
786
|
+
check=False)
|
787
|
+
for line in ret.stdout.splitlines():
|
788
|
+
m = re.compile(r'^url\.(.*)\.insteadof (.*)$').match(line)
|
789
|
+
if m:
|
790
|
+
new_url = m.group(1)
|
791
|
+
old_url = m.group(2)
|
792
|
+
if url.startswith(old_url):
|
793
|
+
url = new_url + url[len(old_url):]
|
794
|
+
break
|
795
|
+
|
796
|
+
if not url.startswith('http:') and not url.startswith('https:'):
|
797
|
+
return False
|
798
|
+
|
799
|
+
dest = open(os.path.join(cwd, '.git', 'clone.bundle'), 'w+b')
|
800
|
+
try:
|
801
|
+
try:
|
802
|
+
r = urllib.request.urlopen(url)
|
803
|
+
except urllib.error.HTTPError as e:
|
804
|
+
if e.code in [401, 403, 404, 501]:
|
805
|
+
return False
|
806
|
+
print('fatal: Cannot get %s' % url, file=sys.stderr)
|
807
|
+
print('fatal: HTTP error %s' % e.code, file=sys.stderr)
|
808
|
+
raise CloneFailure()
|
809
|
+
except urllib.error.URLError as e:
|
810
|
+
print('fatal: Cannot get %s' % url, file=sys.stderr)
|
811
|
+
print('fatal: error %s' % e.reason, file=sys.stderr)
|
812
|
+
raise CloneFailure()
|
813
|
+
try:
|
814
|
+
if verbose:
|
815
|
+
print('Downloading clone bundle %s' % url, file=sys.stderr)
|
816
|
+
while True:
|
817
|
+
buf = r.read(8192)
|
818
|
+
if not buf:
|
819
|
+
return True
|
820
|
+
dest.write(buf)
|
821
|
+
finally:
|
822
|
+
r.close()
|
823
|
+
finally:
|
824
|
+
dest.close()
|
825
|
+
|
826
|
+
|
827
|
+
def _ImportBundle(cwd):
|
828
|
+
path = os.path.join(cwd, '.git', 'clone.bundle')
|
829
|
+
try:
|
830
|
+
_Fetch(cwd, cwd, path, True, False)
|
831
|
+
finally:
|
832
|
+
os.remove(path)
|
833
|
+
|
834
|
+
|
835
|
+
def _Clone(url, cwd, clone_bundle, quiet, verbose):
|
836
|
+
"""Clones a git repository to a new subdirectory of repodir
|
837
|
+
"""
|
838
|
+
if verbose:
|
839
|
+
print('Cloning git repository', url)
|
840
|
+
|
841
|
+
try:
|
842
|
+
os.mkdir(cwd)
|
843
|
+
except OSError as e:
|
844
|
+
print('fatal: cannot make %s directory: %s' % (cwd, e.strerror),
|
845
|
+
file=sys.stderr)
|
846
|
+
raise CloneFailure()
|
847
|
+
|
848
|
+
run_git('init', '--quiet', cwd=cwd)
|
849
|
+
|
850
|
+
_InitHttp()
|
851
|
+
_SetConfig(cwd, 'remote.origin.url', url)
|
852
|
+
_SetConfig(cwd,
|
853
|
+
'remote.origin.fetch',
|
854
|
+
'+refs/heads/*:refs/remotes/origin/*')
|
855
|
+
if clone_bundle and _DownloadBundle(url, cwd, quiet, verbose):
|
856
|
+
_ImportBundle(cwd)
|
857
|
+
_Fetch(url, cwd, 'origin', quiet, verbose)
|
858
|
+
|
859
|
+
|
860
|
+
def resolve_repo_rev(cwd, committish):
|
861
|
+
"""Figure out what REPO_REV represents.
|
862
|
+
|
863
|
+
We support:
|
864
|
+
* refs/heads/xxx: Branch.
|
865
|
+
* refs/tags/xxx: Tag.
|
866
|
+
* xxx: Branch or tag or commit.
|
867
|
+
|
868
|
+
Args:
|
869
|
+
cwd: The git checkout to run in.
|
870
|
+
committish: The REPO_REV argument to resolve.
|
871
|
+
|
872
|
+
Returns:
|
873
|
+
A tuple of (remote ref, commit) as makes sense for the committish.
|
874
|
+
For branches, this will look like ('refs/heads/stable', <revision>).
|
875
|
+
For tags, this will look like ('refs/tags/v1.0', <revision>).
|
876
|
+
For commits, this will be (<revision>, <revision>).
|
877
|
+
"""
|
878
|
+
def resolve(committish):
|
879
|
+
ret = run_git('rev-parse', '--verify', '%s^{commit}' % (committish,),
|
880
|
+
cwd=cwd, check=False)
|
881
|
+
return None if ret.returncode else ret.stdout.strip()
|
882
|
+
|
883
|
+
# An explicit branch.
|
884
|
+
if committish.startswith('refs/heads/'):
|
885
|
+
remote_ref = committish
|
886
|
+
committish = committish[len('refs/heads/'):]
|
887
|
+
rev = resolve('refs/remotes/origin/%s' % committish)
|
888
|
+
if rev is None:
|
889
|
+
print('repo: error: unknown branch "%s"' % (committish,),
|
890
|
+
file=sys.stderr)
|
891
|
+
raise CloneFailure()
|
892
|
+
return (remote_ref, rev)
|
893
|
+
|
894
|
+
# An explicit tag.
|
895
|
+
if committish.startswith('refs/tags/'):
|
896
|
+
remote_ref = committish
|
897
|
+
committish = committish[len('refs/tags/'):]
|
898
|
+
rev = resolve(remote_ref)
|
899
|
+
if rev is None:
|
900
|
+
print('repo: error: unknown tag "%s"' % (committish,),
|
901
|
+
file=sys.stderr)
|
902
|
+
raise CloneFailure()
|
903
|
+
return (remote_ref, rev)
|
904
|
+
|
905
|
+
# See if it's a short branch name.
|
906
|
+
rev = resolve('refs/remotes/origin/%s' % committish)
|
907
|
+
if rev:
|
908
|
+
return ('refs/heads/%s' % (committish,), rev)
|
909
|
+
|
910
|
+
# See if it's a tag.
|
911
|
+
rev = resolve('refs/tags/%s' % committish)
|
912
|
+
if rev:
|
913
|
+
return ('refs/tags/%s' % (committish,), rev)
|
914
|
+
|
915
|
+
# See if it's a commit.
|
916
|
+
rev = resolve(committish)
|
917
|
+
if rev and rev.lower().startswith(committish.lower()):
|
918
|
+
return (rev, rev)
|
919
|
+
|
920
|
+
# Give up!
|
921
|
+
print('repo: error: unable to resolve "%s"' % (committish,), file=sys.stderr)
|
922
|
+
raise CloneFailure()
|
923
|
+
|
924
|
+
|
925
|
+
def verify_rev(cwd, remote_ref, rev, quiet):
|
926
|
+
"""Verify the commit has been signed by a tag."""
|
927
|
+
ret = run_git('describe', rev, cwd=cwd)
|
928
|
+
cur = ret.stdout.strip()
|
929
|
+
|
930
|
+
m = re.compile(r'^(.*)-[0-9]{1,}-g[0-9a-f]{1,}$').match(cur)
|
931
|
+
if m:
|
932
|
+
cur = m.group(1)
|
933
|
+
if not quiet:
|
934
|
+
print(file=sys.stderr)
|
935
|
+
print("warning: '%s' is not signed; falling back to signed release '%s'"
|
936
|
+
% (remote_ref, cur), file=sys.stderr)
|
937
|
+
print(file=sys.stderr)
|
938
|
+
|
939
|
+
env = os.environ.copy()
|
940
|
+
_setenv('GNUPGHOME', gpg_dir, env)
|
941
|
+
run_git('tag', '-v', cur, cwd=cwd, env=env)
|
942
|
+
return '%s^0' % cur
|
943
|
+
|
944
|
+
|
945
|
+
def _Checkout(cwd, remote_ref, rev, quiet):
|
946
|
+
"""Checkout an upstream branch into the repository and track it.
|
947
|
+
"""
|
948
|
+
run_git('update-ref', 'refs/heads/default', rev, cwd=cwd)
|
949
|
+
|
950
|
+
_SetConfig(cwd, 'branch.default.remote', 'origin')
|
951
|
+
_SetConfig(cwd, 'branch.default.merge', remote_ref)
|
952
|
+
|
953
|
+
run_git('symbolic-ref', 'HEAD', 'refs/heads/default', cwd=cwd)
|
954
|
+
|
955
|
+
cmd = ['read-tree', '--reset', '-u']
|
956
|
+
if not quiet:
|
957
|
+
cmd.append('-v')
|
958
|
+
cmd.append('HEAD')
|
959
|
+
run_git(*cmd, cwd=cwd)
|
960
|
+
|
961
|
+
|
962
|
+
def _FindRepo():
|
963
|
+
"""Look for a repo installation, starting at the current directory.
|
964
|
+
"""
|
965
|
+
curdir = os.getcwd()
|
966
|
+
repo = None
|
967
|
+
|
968
|
+
olddir = None
|
969
|
+
while curdir != '/' \
|
970
|
+
and curdir != olddir \
|
971
|
+
and not repo:
|
972
|
+
repo = os.path.join(curdir, repodir, REPO_MAIN)
|
973
|
+
if not os.path.isfile(repo):
|
974
|
+
repo = None
|
975
|
+
olddir = curdir
|
976
|
+
curdir = os.path.dirname(curdir)
|
977
|
+
return (repo, os.path.join(curdir, repodir))
|
978
|
+
|
979
|
+
|
980
|
+
class _Options(object):
|
981
|
+
help = False
|
982
|
+
version = False
|
983
|
+
|
984
|
+
|
985
|
+
def _ExpandAlias(name):
|
986
|
+
"""Look up user registered aliases."""
|
987
|
+
# We don't resolve aliases for existing subcommands. This matches git.
|
988
|
+
if name in {'gitc-init', 'help', 'init'}:
|
989
|
+
return name, []
|
990
|
+
|
991
|
+
alias = _GetRepoConfig('alias.%s' % (name,))
|
992
|
+
if alias is None:
|
993
|
+
return name, []
|
994
|
+
|
995
|
+
args = alias.strip().split(' ', 1)
|
996
|
+
name = args[0]
|
997
|
+
if len(args) == 2:
|
998
|
+
args = shlex.split(args[1])
|
999
|
+
else:
|
1000
|
+
args = []
|
1001
|
+
return name, args
|
1002
|
+
|
1003
|
+
|
1004
|
+
def _ParseArguments(args):
|
1005
|
+
cmd = None
|
1006
|
+
opt = _Options()
|
1007
|
+
arg = []
|
1008
|
+
|
1009
|
+
for i in range(len(args)):
|
1010
|
+
a = args[i]
|
1011
|
+
if a == '-h' or a == '--help':
|
1012
|
+
opt.help = True
|
1013
|
+
elif a == '--version':
|
1014
|
+
opt.version = True
|
1015
|
+
elif a == '--trace':
|
1016
|
+
trace.set(True)
|
1017
|
+
elif not a.startswith('-'):
|
1018
|
+
cmd = a
|
1019
|
+
arg = args[i + 1:]
|
1020
|
+
break
|
1021
|
+
return cmd, opt, arg
|
1022
|
+
|
1023
|
+
|
1024
|
+
def _Usage():
|
1025
|
+
gitc_usage = ""
|
1026
|
+
if get_gitc_manifest_dir():
|
1027
|
+
gitc_usage = " gitc-init Initialize a GITC Client.\n"
|
1028
|
+
|
1029
|
+
print(
|
1030
|
+
"""usage: repo COMMAND [ARGS]
|
1031
|
+
|
1032
|
+
repo is not yet installed. Use "repo init" to install it here.
|
1033
|
+
|
1034
|
+
The most commonly used repo commands are:
|
1035
|
+
|
1036
|
+
init Install repo in the current working directory
|
1037
|
+
""" + gitc_usage +
|
1038
|
+
""" help Display detailed help on a command
|
1039
|
+
|
1040
|
+
For access to the full online help, install repo ("repo init").
|
1041
|
+
""")
|
1042
|
+
sys.exit(0)
|
1043
|
+
|
1044
|
+
|
1045
|
+
def _Help(args):
|
1046
|
+
if args:
|
1047
|
+
if args[0] in {'init', 'gitc-init'}:
|
1048
|
+
parser = GetParser(gitc_init=args[0] == 'gitc-init')
|
1049
|
+
parser.print_help()
|
1050
|
+
sys.exit(0)
|
1051
|
+
else:
|
1052
|
+
print("error: '%s' is not a bootstrap command.\n"
|
1053
|
+
' For access to online help, install repo ("repo init").'
|
1054
|
+
% args[0], file=sys.stderr)
|
1055
|
+
else:
|
1056
|
+
_Usage()
|
1057
|
+
sys.exit(1)
|
1058
|
+
|
1059
|
+
|
1060
|
+
def _Version():
|
1061
|
+
"""Show version information."""
|
1062
|
+
print('<repo not installed>')
|
1063
|
+
print('repo launcher version %s' % ('.'.join(str(x) for x in VERSION),))
|
1064
|
+
print(' (from %s)' % (__file__,))
|
1065
|
+
print('git %s' % (ParseGitVersion().full,))
|
1066
|
+
print('Python %s' % sys.version)
|
1067
|
+
uname = platform.uname()
|
1068
|
+
if sys.version_info.major < 3:
|
1069
|
+
# Python 3 returns a named tuple, but Python 2 is simpler.
|
1070
|
+
print(uname)
|
1071
|
+
else:
|
1072
|
+
print('OS %s %s (%s)' % (uname.system, uname.release, uname.version))
|
1073
|
+
print('CPU %s (%s)' %
|
1074
|
+
(uname.machine, uname.processor if uname.processor else 'unknown'))
|
1075
|
+
sys.exit(0)
|
1076
|
+
|
1077
|
+
|
1078
|
+
def _NotInstalled():
|
1079
|
+
print('error: repo is not installed. Use "repo init" to install it here.',
|
1080
|
+
file=sys.stderr)
|
1081
|
+
sys.exit(1)
|
1082
|
+
|
1083
|
+
|
1084
|
+
def _NoCommands(cmd):
|
1085
|
+
print("""error: command '%s' requires repo to be installed first.
|
1086
|
+
Use "repo init" to install it here.""" % cmd, file=sys.stderr)
|
1087
|
+
sys.exit(1)
|
1088
|
+
|
1089
|
+
|
1090
|
+
def _RunSelf(wrapper_path):
|
1091
|
+
my_dir = os.path.dirname(wrapper_path)
|
1092
|
+
my_main = os.path.join(my_dir, 'main.py')
|
1093
|
+
my_git = os.path.join(my_dir, '.git')
|
1094
|
+
|
1095
|
+
if os.path.isfile(my_main) and os.path.isdir(my_git):
|
1096
|
+
for name in ['git_config.py',
|
1097
|
+
'project.py',
|
1098
|
+
'subcmds']:
|
1099
|
+
if not os.path.exists(os.path.join(my_dir, name)):
|
1100
|
+
return None, None
|
1101
|
+
return my_main, my_git
|
1102
|
+
return None, None
|
1103
|
+
|
1104
|
+
|
1105
|
+
def _SetDefaultsTo(gitdir):
|
1106
|
+
global REPO_URL
|
1107
|
+
global REPO_REV
|
1108
|
+
|
1109
|
+
REPO_URL = gitdir
|
1110
|
+
ret = run_git('--git-dir=%s' % gitdir, 'symbolic-ref', 'HEAD', check=False)
|
1111
|
+
if ret.returncode:
|
1112
|
+
# If we're not tracking a branch (bisect/etc...), then fall back to commit.
|
1113
|
+
print('repo: warning: %s has no current branch; using HEAD' % gitdir,
|
1114
|
+
file=sys.stderr)
|
1115
|
+
try:
|
1116
|
+
ret = run_git('rev-parse', 'HEAD', cwd=gitdir)
|
1117
|
+
except CloneFailure:
|
1118
|
+
print('fatal: %s has invalid HEAD' % gitdir, file=sys.stderr)
|
1119
|
+
sys.exit(1)
|
1120
|
+
|
1121
|
+
REPO_REV = ret.stdout.strip()
|
1122
|
+
|
1123
|
+
|
1124
|
+
def main(orig_args):
|
1125
|
+
cmd, opt, args = _ParseArguments(orig_args)
|
1126
|
+
|
1127
|
+
# We run this early as we run some git commands ourselves.
|
1128
|
+
SetGitTrace2ParentSid()
|
1129
|
+
|
1130
|
+
repo_main, rel_repo_dir = None, None
|
1131
|
+
# Don't use the local repo copy, make sure to switch to the gitc client first.
|
1132
|
+
if cmd != 'gitc-init':
|
1133
|
+
repo_main, rel_repo_dir = _FindRepo()
|
1134
|
+
|
1135
|
+
wrapper_path = os.path.abspath(__file__)
|
1136
|
+
my_main, my_git = _RunSelf(wrapper_path)
|
1137
|
+
|
1138
|
+
cwd = os.getcwd()
|
1139
|
+
if get_gitc_manifest_dir() and cwd.startswith(get_gitc_manifest_dir()):
|
1140
|
+
print('error: repo cannot be used in the GITC local manifest directory.'
|
1141
|
+
'\nIf you want to work on this GITC client please rerun this '
|
1142
|
+
'command from the corresponding client under /gitc/',
|
1143
|
+
file=sys.stderr)
|
1144
|
+
sys.exit(1)
|
1145
|
+
if not repo_main:
|
1146
|
+
# Only expand aliases here since we'll be parsing the CLI ourselves.
|
1147
|
+
# If we had repo_main, alias expansion would happen in main.py.
|
1148
|
+
cmd, alias_args = _ExpandAlias(cmd)
|
1149
|
+
args = alias_args + args
|
1150
|
+
|
1151
|
+
if opt.help:
|
1152
|
+
_Usage()
|
1153
|
+
if cmd == 'help':
|
1154
|
+
_Help(args)
|
1155
|
+
if opt.version or cmd == 'version':
|
1156
|
+
_Version()
|
1157
|
+
if not cmd:
|
1158
|
+
_NotInstalled()
|
1159
|
+
if cmd == 'init' or cmd == 'gitc-init':
|
1160
|
+
if my_git:
|
1161
|
+
_SetDefaultsTo(my_git)
|
1162
|
+
try:
|
1163
|
+
_Init(args, gitc_init=(cmd == 'gitc-init'))
|
1164
|
+
except CloneFailure:
|
1165
|
+
path = os.path.join(repodir, S_repo)
|
1166
|
+
print("fatal: cloning the git-repo repository failed, will remove "
|
1167
|
+
"'%s' " % path, file=sys.stderr)
|
1168
|
+
shutil.rmtree(path, ignore_errors=True)
|
1169
|
+
sys.exit(1)
|
1170
|
+
repo_main, rel_repo_dir = _FindRepo()
|
1171
|
+
else:
|
1172
|
+
_NoCommands(cmd)
|
1173
|
+
|
1174
|
+
if my_main:
|
1175
|
+
repo_main = my_main
|
1176
|
+
|
1177
|
+
if not repo_main:
|
1178
|
+
print("fatal: unable to find repo entry point", file=sys.stderr)
|
1179
|
+
sys.exit(1)
|
1180
|
+
|
1181
|
+
ver_str = '.'.join(map(str, VERSION))
|
1182
|
+
me = [sys.executable, repo_main,
|
1183
|
+
'--repo-dir=%s' % rel_repo_dir,
|
1184
|
+
'--wrapper-version=%s' % ver_str,
|
1185
|
+
'--wrapper-path=%s' % wrapper_path,
|
1186
|
+
'--']
|
1187
|
+
me.extend(orig_args)
|
1188
|
+
exec_command(me)
|
1189
|
+
print("fatal: unable to start %s" % repo_main, file=sys.stderr)
|
1190
|
+
sys.exit(148)
|
1191
|
+
|
1192
|
+
|
1193
|
+
if __name__ == '__main__':
|
1194
|
+
main(sys.argv[1:])
|