libv8 5.3.332.38.5 → 5.6.326.50.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 +0 -1
- data/CHANGELOG.md +2 -0
- data/ext/libv8/builder.rb +2 -2
- data/lib/libv8/version.rb +1 -1
- data/patches/0001-Build-a-standalone-static-library.patch +4 -4
- data/patches/0002-Don-t-compile-unnecessary-stuff.patch +16 -11
- data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +4 -4
- data/patches/{0005-Do-not-embed-debug-symbols-in-macOS-libraries.patch → 0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch} +4 -4
- data/vendor/depot_tools/.gitignore +4 -0
- data/vendor/depot_tools/OWNERS +0 -2
- data/vendor/depot_tools/PRESUBMIT.py +20 -23
- data/vendor/depot_tools/README.gclient.md +3 -3
- data/vendor/depot_tools/README.git-cl.md +13 -12
- data/vendor/depot_tools/README.md +2 -3
- data/vendor/depot_tools/WATCHLISTS +0 -1
- data/vendor/depot_tools/appengine_mapper.py +23 -0
- data/vendor/depot_tools/apply_issue.py +2 -8
- data/vendor/depot_tools/bootstrap/win/README.md +1 -8
- data/vendor/depot_tools/bootstrap/win/git_bootstrap.py +6 -16
- data/vendor/depot_tools/bootstrap/win/git_version.txt +1 -1
- data/vendor/depot_tools/bootstrap/win/git_version_bleeding_edge.txt +1 -1
- data/vendor/depot_tools/checkout.py +20 -433
- data/vendor/depot_tools/cipd +73 -0
- data/vendor/depot_tools/cipd.bat +12 -0
- data/vendor/depot_tools/cipd.ps1 +57 -0
- data/vendor/depot_tools/cipd_client_version +1 -0
- data/vendor/depot_tools/clang_format.py +9 -6
- data/vendor/depot_tools/clang_format_merge_driver +8 -0
- data/vendor/depot_tools/clang_format_merge_driver.bat +11 -0
- data/vendor/depot_tools/clang_format_merge_driver.py +67 -0
- data/vendor/depot_tools/codereview.settings +3 -2
- data/vendor/depot_tools/commit_queue.py +1 -1
- data/vendor/depot_tools/cpplint.py +2 -0
- data/vendor/depot_tools/fetch.py +1 -54
- data/vendor/depot_tools/fetch_configs/android.py +2 -2
- data/vendor/depot_tools/fetch_configs/breakpad.py +2 -3
- data/vendor/depot_tools/fetch_configs/chromium.py +2 -3
- data/vendor/depot_tools/fetch_configs/crashpad.py +2 -2
- data/vendor/depot_tools/fetch_configs/dart.py +2 -3
- data/vendor/depot_tools/fetch_configs/dartino.py +2 -3
- data/vendor/depot_tools/fetch_configs/dartium.py +2 -3
- data/vendor/depot_tools/fetch_configs/depot_tools.py +3 -6
- data/vendor/depot_tools/fetch_configs/gyp.py +2 -3
- data/vendor/depot_tools/fetch_configs/infra.py +2 -2
- data/vendor/depot_tools/fetch_configs/infra_internal.py +2 -2
- data/vendor/depot_tools/fetch_configs/ios.py +2 -2
- data/vendor/depot_tools/fetch_configs/ios_internal.py +2 -3
- data/vendor/depot_tools/fetch_configs/mojo.py +2 -3
- data/vendor/depot_tools/fetch_configs/nacl.py +2 -3
- data/vendor/depot_tools/fetch_configs/naclports.py +2 -3
- data/vendor/depot_tools/fetch_configs/pdfium.py +2 -2
- data/vendor/depot_tools/fetch_configs/skia.py +2 -2
- data/vendor/depot_tools/fetch_configs/skia_buildbot.py +2 -2
- data/vendor/depot_tools/fetch_configs/syzygy.py +2 -2
- data/vendor/depot_tools/fetch_configs/v8.py +2 -3
- data/vendor/depot_tools/fetch_configs/webrtc.py +5 -3
- data/vendor/depot_tools/fetch_configs/webrtc_android.py +2 -2
- data/vendor/depot_tools/fetch_configs/webrtc_ios.py +2 -2
- data/vendor/depot_tools/fix_encoding.py +6 -6
- data/vendor/depot_tools/gclient.py +136 -368
- data/vendor/depot_tools/gclient_scm.py +108 -647
- data/vendor/depot_tools/gclient_utils.py +22 -86
- data/vendor/depot_tools/gerrit_client.py +105 -0
- data/vendor/depot_tools/gerrit_util.py +174 -67
- data/vendor/depot_tools/git-crrev-parse +6 -7
- data/vendor/depot_tools/git-gs +1 -1
- data/vendor/depot_tools/git_cache.py +68 -18
- data/vendor/depot_tools/git_cherry_pick_upload.py +4 -4
- data/vendor/depot_tools/git_cl.py +1028 -961
- data/vendor/depot_tools/git_common.py +2 -3
- data/vendor/depot_tools/git_drover.py +0 -1
- data/vendor/depot_tools/git_footers.py +3 -43
- data/vendor/depot_tools/git_rebase_update.py +9 -1
- data/vendor/depot_tools/git_squash_branch.py +1 -1
- data/vendor/depot_tools/infra/config/cq.cfg +8 -1
- data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
- data/vendor/depot_tools/man/html/depot_tools.html +3 -11
- data/vendor/depot_tools/man/html/depot_tools_tutorial.html +9 -9
- data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +2 -2
- data/vendor/depot_tools/man/html/git-drover.html +17 -17
- data/vendor/depot_tools/man/html/git-footers.html +2 -2
- data/vendor/depot_tools/man/html/git-freeze.html +4 -4
- data/vendor/depot_tools/man/html/git-hyper-blame.html +2 -2
- data/vendor/depot_tools/man/html/git-map-branches.html +2 -2
- data/vendor/depot_tools/man/html/git-map.html +2 -2
- data/vendor/depot_tools/man/html/git-mark-merge-base.html +2 -2
- data/vendor/depot_tools/man/html/git-nav-downstream.html +2 -2
- data/vendor/depot_tools/man/html/git-nav-upstream.html +2 -2
- data/vendor/depot_tools/man/html/git-new-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-rebase-update.html +2 -2
- data/vendor/depot_tools/man/html/git-rename-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-reparent-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-retry.html +3 -3
- data/vendor/depot_tools/man/html/git-squash-branch.html +3 -3
- data/vendor/depot_tools/man/html/git-thaw.html +2 -2
- data/vendor/depot_tools/man/html/git-upstream-diff.html +3 -3
- data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +4 -4
- data/vendor/depot_tools/man/man1/git-drover.1 +19 -19
- data/vendor/depot_tools/man/man1/git-footers.1 +4 -4
- data/vendor/depot_tools/man/man1/git-freeze.1 +6 -6
- data/vendor/depot_tools/man/man1/git-hyper-blame.1 +4 -4
- data/vendor/depot_tools/man/man1/git-map-branches.1 +4 -4
- data/vendor/depot_tools/man/man1/git-map.1 +4 -4
- data/vendor/depot_tools/man/man1/git-mark-merge-base.1 +4 -4
- data/vendor/depot_tools/man/man1/git-nav-downstream.1 +4 -4
- data/vendor/depot_tools/man/man1/git-nav-upstream.1 +4 -4
- data/vendor/depot_tools/man/man1/git-new-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +4 -4
- data/vendor/depot_tools/man/man1/git-rename-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-reparent-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-retry.1 +5 -5
- data/vendor/depot_tools/man/man1/git-squash-branch.1 +5 -5
- data/vendor/depot_tools/man/man1/git-thaw.1 +4 -4
- data/vendor/depot_tools/man/man1/git-upstream-diff.1 +5 -5
- data/vendor/depot_tools/man/man7/depot_tools.7 +5 -10
- data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +4 -4
- data/vendor/depot_tools/man/src/depot_tools.txt +1 -1
- data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +7 -7
- data/vendor/depot_tools/man/src/filter_demo_output.py +2 -2
- data/vendor/depot_tools/man/src/git-footers.demo.1.sh +1 -1
- data/vendor/depot_tools/man/src/git-retry.txt +1 -1
- data/vendor/depot_tools/man/src/git-squash-branch.txt +2 -2
- data/vendor/depot_tools/man/src/git-upstream-diff.txt +1 -1
- data/vendor/depot_tools/my_activity.py +6 -3
- data/vendor/depot_tools/my_reviews.py +1 -1
- data/vendor/depot_tools/ninja +2 -2
- data/vendor/depot_tools/ninja-linux32 +0 -0
- data/vendor/depot_tools/ninja-linux64 +0 -0
- data/vendor/depot_tools/ninja-mac +0 -0
- data/vendor/depot_tools/ninja.exe +0 -0
- data/vendor/depot_tools/owners.py +14 -3
- data/vendor/depot_tools/presubmit_canned_checks.py +46 -67
- data/vendor/depot_tools/presubmit_support.py +109 -371
- data/vendor/depot_tools/pylintrc +83 -56
- data/vendor/depot_tools/recipe_modules/OWNERS +1 -0
- data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +18 -9
- data/vendor/depot_tools/recipe_modules/bot_update/api.py +56 -55
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/buildbot.json +52 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +2 -54
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2_buildbot.json +56 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/{forced.json → trychange_oauth2_json.json} +6 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2_json_win.json +54 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +20 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle_deprecated.json +59 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +20 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.py +45 -63
- data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +210 -807
- data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +34 -45
- data/vendor/depot_tools/recipe_modules/cipd/api.py +59 -84
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/basic.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-failed.json +14 -60
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-many-instances.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/mac64.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/win64.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.py +2 -12
- data/vendor/depot_tools/recipe_modules/cipd/test_api.py +0 -9
- data/vendor/depot_tools/recipe_modules/depot_tools/api.py +6 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/example.expected/basic.json +7 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/example.expected/win.json +7 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/example.py +3 -0
- data/vendor/depot_tools/recipe_modules/gclient/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/gclient/api.py +9 -22
- data/vendor/depot_tools/recipe_modules/gclient/config.py +18 -5
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +14 -14
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/buildbot.json +211 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +16 -14
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +16 -14
- data/vendor/depot_tools/recipe_modules/gclient/example.py +13 -11
- data/vendor/depot_tools/recipe_modules/gerrit/__init__.py +6 -0
- data/vendor/depot_tools/recipe_modules/gerrit/api.py +63 -0
- data/vendor/depot_tools/recipe_modules/gerrit/example.expected/basic.json +64 -0
- data/vendor/depot_tools/recipe_modules/gerrit/example.py +35 -0
- data/vendor/depot_tools/recipe_modules/gerrit/test_api.py +24 -0
- data/vendor/depot_tools/recipe_modules/git/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/git/api.py +155 -142
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +13 -13
- data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +45 -19
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +45 -19
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +8 -8
- data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +44 -18
- data/vendor/depot_tools/recipe_modules/git/example.expected/git-cache-checkout.json +48 -22
- data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +42 -16
- data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.py +9 -3
- data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/git_cl/api.py +8 -8
- data/vendor/depot_tools/recipe_modules/git_cl/example.py +1 -1
- data/vendor/depot_tools/recipe_modules/gsutil/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/gsutil/api.py +196 -0
- data/vendor/depot_tools/recipe_modules/gsutil/example.expected/basic.json +186 -0
- data/vendor/depot_tools/recipe_modules/gsutil/example.py +77 -0
- data/vendor/depot_tools/recipe_modules/gsutil/resources/gsutil_smart_retry.py +69 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +3 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/api.py +20 -3
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.py +6 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +4 -6
- data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
- data/vendor/depot_tools/recipe_modules/rietveld/api.py +12 -9
- data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +2 -24
- data/vendor/depot_tools/recipe_modules/rietveld/example.expected/buildbot.json +30 -0
- data/vendor/depot_tools/recipe_modules/rietveld/example.py +12 -6
- data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/tryserver/api.py +46 -70
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/set_failure_hash_with_no_steps.json +8 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/{with_svn_patch.json → with_gerrit_patch.json} +1 -31
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_gerrit_patch_deprecated.json +39 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +2 -2
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch_luci.json +8 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +3 -3
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +3 -3
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +1 -1
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +1 -1
- data/vendor/depot_tools/recipe_modules/tryserver/example.py +35 -5
- data/vendor/depot_tools/recipes.py +52 -28
- data/vendor/depot_tools/repo +216 -69
- data/vendor/depot_tools/rietveld.py +20 -15
- data/vendor/depot_tools/roll_dep.py +1 -1
- data/vendor/depot_tools/scm.py +11 -826
- data/vendor/depot_tools/subprocess2.py +5 -5
- data/vendor/depot_tools/third_party/cq_client/README.depot_tools.md +2 -0
- data/vendor/depot_tools/third_party/cq_client/README.md +5 -1
- data/vendor/depot_tools/third_party/cq_client/cq.pb.go +183 -104
- data/vendor/depot_tools/third_party/cq_client/cq.proto +43 -27
- data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +95 -29
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_both.cfg +67 -0
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +1 -2
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_rietveld.cfg +0 -3
- data/vendor/depot_tools/third_party/upload.py +44 -24
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +0 -5
- metadata +38 -93
- data/patches/0004-Reinterpret-thread-hash-for-FreeBSD-too.patch +0 -25
- data/vendor/depot_tools/git-auto-svn +0 -6
- data/vendor/depot_tools/git_auto_svn.py +0 -122
- data/vendor/depot_tools/man/html/git-auto-svn.html +0 -837
- data/vendor/depot_tools/man/man1/git-auto-svn.1 +0 -113
- data/vendor/depot_tools/man/src/_git-auto-svn_desc.helper.txt +0 -1
- data/vendor/depot_tools/man/src/git-auto-svn.txt +0 -69
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +0 -43
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/install-failed.json +0 -31
- data/vendor/depot_tools/recipe_modules/cipd/resources/bootstrap.py +0 -218
- data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +0 -7
- data/vendor/depot_tools/third_party/gsutil/CHECKSUM +0 -1
- data/vendor/depot_tools/third_party/gsutil/COPYING +0 -202
- data/vendor/depot_tools/third_party/gsutil/LICENSE.third_party +0 -295
- data/vendor/depot_tools/third_party/gsutil/MANIFEST.in +0 -5
- data/vendor/depot_tools/third_party/gsutil/README +0 -38
- data/vendor/depot_tools/third_party/gsutil/README.chromium +0 -25
- data/vendor/depot_tools/third_party/gsutil/README.pkg +0 -49
- data/vendor/depot_tools/third_party/gsutil/ReleaseNotes.txt +0 -825
- data/vendor/depot_tools/third_party/gsutil/VERSION +0 -1
- data/vendor/depot_tools/third_party/gsutil/gslib/README +0 -5
- data/vendor/depot_tools/third_party/gsutil/gslib/__init__.py +0 -22
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/__init__.py +0 -15
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/acls.py +0 -234
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/anon.py +0 -57
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/command_opts.py +0 -116
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/dev.py +0 -139
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/metadata.py +0 -186
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/naming.py +0 -173
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/prod.py +0 -160
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/projects.py +0 -130
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/subdirs.py +0 -110
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/support.py +0 -86
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/versioning.py +0 -242
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/wildcards.py +0 -170
- data/vendor/depot_tools/third_party/gsutil/gslib/bucket_listing_ref.py +0 -175
- data/vendor/depot_tools/third_party/gsutil/gslib/command.py +0 -725
- data/vendor/depot_tools/third_party/gsutil/gslib/command_runner.py +0 -102
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/__init__.py +0 -15
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/cat.py +0 -131
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/chacl.py +0 -523
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/config.py +0 -662
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/cp.py +0 -1819
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/disablelogging.py +0 -101
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/enablelogging.py +0 -149
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getacl.py +0 -82
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getcors.py +0 -121
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getdefacl.py +0 -86
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getlogging.py +0 -137
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getversioning.py +0 -116
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getwebcfg.py +0 -122
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/help.py +0 -218
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/ls.py +0 -578
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/mb.py +0 -172
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/mv.py +0 -159
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/perfdiag.py +0 -903
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/rb.py +0 -113
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/rm.py +0 -237
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setacl.py +0 -138
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setcors.py +0 -145
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setdefacl.py +0 -105
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setmeta.py +0 -420
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setversioning.py +0 -114
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setwebcfg.py +0 -190
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/update.py +0 -305
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/version.py +0 -150
- data/vendor/depot_tools/third_party/gsutil/gslib/exception.py +0 -76
- data/vendor/depot_tools/third_party/gsutil/gslib/help_provider.py +0 -81
- data/vendor/depot_tools/third_party/gsutil/gslib/name_expansion.py +0 -550
- data/vendor/depot_tools/third_party/gsutil/gslib/no_op_auth_plugin.py +0 -30
- data/vendor/depot_tools/third_party/gsutil/gslib/plurality_checkable_iterator.py +0 -56
- data/vendor/depot_tools/third_party/gsutil/gslib/project_id.py +0 -67
- data/vendor/depot_tools/third_party/gsutil/gslib/storage_uri_builder.py +0 -56
- data/vendor/depot_tools/third_party/gsutil/gslib/thread_pool.py +0 -79
- data/vendor/depot_tools/third_party/gsutil/gslib/util.py +0 -167
- data/vendor/depot_tools/third_party/gsutil/gslib/wildcard_iterator.py +0 -498
- data/vendor/depot_tools/third_party/gsutil/gsutil +0 -384
- data/vendor/depot_tools/third_party/gsutil/gsutil.spec.in +0 -75
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/__init__.py +0 -22
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_client.py +0 -630
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_client_test.py +0 -374
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_helper.py +0 -103
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_plugin.py +0 -24
- data/vendor/depot_tools/third_party/gsutil/pkg_util.py +0 -60
- data/vendor/depot_tools/third_party/gsutil/plugins/__init__.py +0 -0
- data/vendor/depot_tools/third_party/gsutil/plugins/sso_auth.py +0 -105
@@ -26,6 +26,7 @@ RECIPES_CFG = os.path.join('infra', 'config', 'recipes.cfg')
|
|
26
26
|
|
27
27
|
BOOTSTRAP_VERSION = 1
|
28
28
|
|
29
|
+
import argparse
|
29
30
|
import ast
|
30
31
|
import logging
|
31
32
|
import random
|
@@ -103,15 +104,38 @@ def _subprocess_call(argv, **kwargs):
|
|
103
104
|
logging.info('Running %r', argv)
|
104
105
|
return subprocess.call(argv, **kwargs)
|
105
106
|
|
107
|
+
|
106
108
|
def _subprocess_check_call(argv, **kwargs):
|
107
109
|
logging.info('Running %r', argv)
|
108
110
|
subprocess.check_call(argv, **kwargs)
|
109
111
|
|
110
112
|
|
113
|
+
def find_engine_override(argv):
|
114
|
+
"""Since the bootstrap process attempts to defer all logic to the recipes-py
|
115
|
+
repo, we need to be aware if the user is overriding the recipe_engine
|
116
|
+
dependency. This looks for and returns the overridden recipe_engine path, if
|
117
|
+
any, or None if the user didn't override it."""
|
118
|
+
PREFIX = 'recipe_engine='
|
119
|
+
|
120
|
+
p = argparse.ArgumentParser()
|
121
|
+
p.add_argument('-O', '--project-override', action='append')
|
122
|
+
args, _ = p.parse_known_args(argv)
|
123
|
+
for override in args.project_override or ():
|
124
|
+
if override.startswith(PREFIX):
|
125
|
+
return override[len(PREFIX):]
|
126
|
+
return None
|
127
|
+
|
128
|
+
|
111
129
|
def main():
|
112
130
|
if '--verbose' in sys.argv:
|
113
131
|
logging.getLogger().setLevel(logging.INFO)
|
114
132
|
|
133
|
+
if REPO_ROOT is None or RECIPES_CFG is None:
|
134
|
+
logging.error(
|
135
|
+
'In order to use this script, please copy it to your repo and '
|
136
|
+
'replace the REPO_ROOT and RECIPES_CFG values with approprite paths.')
|
137
|
+
sys.exit(1)
|
138
|
+
|
115
139
|
if sys.platform.startswith(('win', 'cygwin')):
|
116
140
|
git = 'git.bat'
|
117
141
|
else:
|
@@ -135,34 +159,34 @@ def main():
|
|
135
159
|
recipes_path = os.path.join(repo_root,
|
136
160
|
get_unique(protobuf['recipes_path']).replace('/', os.path.sep))
|
137
161
|
deps_path = os.path.join(recipes_path, '.recipe_deps')
|
138
|
-
engine_path =
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
os.
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
162
|
+
engine_path = find_engine_override(sys.argv[1:])
|
163
|
+
if not engine_path:
|
164
|
+
# Ensure that we have the recipe engine cloned.
|
165
|
+
engine_path = os.path.join(deps_path, 'recipe_engine')
|
166
|
+
def ensure_engine():
|
167
|
+
if not os.path.exists(deps_path):
|
168
|
+
os.makedirs(deps_path)
|
169
|
+
if not os.path.exists(engine_path):
|
170
|
+
_subprocess_check_call([git, 'clone', engine_url, engine_path])
|
171
|
+
|
172
|
+
needs_fetch = _subprocess_call(
|
173
|
+
[git, 'rev-parse', '--verify', '%s^{commit}' % engine_revision],
|
174
|
+
cwd=engine_path, stdout=open(os.devnull, 'w'))
|
175
|
+
if needs_fetch:
|
176
|
+
_subprocess_check_call([git, 'fetch'], cwd=engine_path)
|
177
|
+
_subprocess_check_call(
|
178
|
+
[git, 'checkout', '--quiet', engine_revision], cwd=engine_path)
|
179
|
+
|
180
|
+
try:
|
181
|
+
ensure_engine()
|
182
|
+
except subprocess.CalledProcessError:
|
183
|
+
logging.exception('ensure_engine failed')
|
184
|
+
|
185
|
+
# Retry errors.
|
186
|
+
time.sleep(random.uniform(2,5))
|
187
|
+
ensure_engine()
|
188
|
+
|
189
|
+
args = ['--package', recipes_cfg_path] + sys.argv[1:]
|
166
190
|
return _subprocess_call([
|
167
191
|
sys.executable, '-u',
|
168
192
|
os.path.join(engine_path, engine_subpath, 'recipes.py')] + args)
|
data/vendor/depot_tools/repo
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
# repo default configuration
|
4
|
+
#
|
5
|
+
import os
|
6
|
+
REPO_URL = os.environ.get('REPO_URL', None)
|
7
|
+
if not REPO_URL:
|
8
|
+
REPO_URL = 'https://chromium.googlesource.com/external/repo'
|
9
|
+
REPO_REV = 'stable'
|
7
10
|
|
8
11
|
# Copyright (C) 2008 Google Inc.
|
9
12
|
#
|
@@ -20,10 +23,10 @@ REPO_REV='stable'
|
|
20
23
|
# limitations under the License.
|
21
24
|
|
22
25
|
# increment this whenever we make important changes to this script
|
23
|
-
VERSION = (1,
|
26
|
+
VERSION = (1, 23)
|
24
27
|
|
25
28
|
# increment this if the MAINTAINER_KEYS block is modified
|
26
|
-
KEYRING_VERSION = (1,
|
29
|
+
KEYRING_VERSION = (1, 5)
|
27
30
|
MAINTAINER_KEYS = """
|
28
31
|
|
29
32
|
Repo Maintainer <repo@android.kernel.org>
|
@@ -183,22 +186,66 @@ qanHjtbgNmkz+JpvJ9CTEEo69tkcbmOaCNwCWQL+Doqqi7tWMYUbAw0Rk+lOSu/N
|
|
183
186
|
j8zzwdwkRpt3SSvqzh3+L3Zq8xeb2M6u/QLz4aLFTR7yQJed0DJFUcISii9ccJr/
|
184
187
|
IM4=
|
185
188
|
=6VNc
|
189
|
+
-----END PGP PUBLIC KEY BLOCK-----
|
190
|
+
|
191
|
+
Mike Frysinger <vapier@chromium.org>
|
192
|
+
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
193
|
+
Version: GnuPG v1
|
194
|
+
|
195
|
+
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
|
230
|
+
=i88c
|
186
231
|
-----END PGP PUBLIC KEY BLOCK-----
|
187
232
|
"""
|
188
233
|
|
189
|
-
GIT = 'git'
|
190
|
-
MIN_GIT_VERSION = (1, 7, 2)
|
191
|
-
repodir = '.repo'
|
192
|
-
S_repo = 'repo'
|
193
|
-
S_manifests = 'manifests'
|
194
|
-
REPO_MAIN = S_repo + '/main.py'
|
195
|
-
MIN_PYTHON_VERSION = (2, 6)
|
234
|
+
GIT = 'git' # our git command
|
235
|
+
MIN_GIT_VERSION = (1, 7, 2) # minimum supported git version
|
236
|
+
repodir = '.repo' # name of repo's private directory
|
237
|
+
S_repo = 'repo' # special repo repository
|
238
|
+
S_manifests = 'manifests' # special manifest repository
|
239
|
+
REPO_MAIN = S_repo + '/main.py' # main script
|
240
|
+
MIN_PYTHON_VERSION = (2, 6) # minimum supported python version
|
241
|
+
GITC_CONFIG_FILE = '/gitc/.config'
|
242
|
+
GITC_FS_ROOT_DIR = '/gitc/manifest-rw/'
|
196
243
|
|
197
244
|
|
198
245
|
import errno
|
199
246
|
import optparse
|
200
|
-
import os
|
201
247
|
import re
|
248
|
+
import shutil
|
202
249
|
import stat
|
203
250
|
import subprocess
|
204
251
|
import sys
|
@@ -223,17 +270,13 @@ def _print(*objects, **kwargs):
|
|
223
270
|
|
224
271
|
# Python version check
|
225
272
|
ver = sys.version_info
|
226
|
-
if ver[0] == 3:
|
227
|
-
_print('warning: Python 3 support is currently experimental. YMMV.\n'
|
228
|
-
'Please use Python 2.6 - 2.7 instead.',
|
229
|
-
file=sys.stderr)
|
230
273
|
if (ver[0], ver[1]) < MIN_PYTHON_VERSION:
|
231
274
|
_print('error: Python version %s unsupported.\n'
|
232
275
|
'Please use Python 2.6 - 2.7 instead.'
|
233
276
|
% sys.version.split(' ')[0], file=sys.stderr)
|
234
277
|
sys.exit(1)
|
235
278
|
|
236
|
-
home_dot_repo = os.path.expanduser(
|
279
|
+
home_dot_repo = os.path.expanduser('~/.repoconfig')
|
237
280
|
gpg_dir = os.path.join(home_dot_repo, 'gnupg')
|
238
281
|
|
239
282
|
extra_args = []
|
@@ -280,6 +323,9 @@ group.add_option('-p', '--platform',
|
|
280
323
|
help='restrict manifest projects to ones with a specified '
|
281
324
|
'platform group [auto|all|none|linux|darwin|...]',
|
282
325
|
metavar='PLATFORM')
|
326
|
+
group.add_option('--no-clone-bundle',
|
327
|
+
dest='no_clone_bundle', action='store_true',
|
328
|
+
help='disable use of /clone.bundle on HTTP/HTTPS')
|
283
329
|
|
284
330
|
|
285
331
|
# Tool
|
@@ -300,14 +346,69 @@ group.add_option('--config-name',
|
|
300
346
|
dest='config_name', action="store_true", default=False,
|
301
347
|
help='Always prompt for name/e-mail')
|
302
348
|
|
349
|
+
|
350
|
+
def _GitcInitOptions(init_optparse_arg):
|
351
|
+
init_optparse_arg.set_usage("repo gitc-init -u url -c client [options]")
|
352
|
+
g = init_optparse_arg.add_option_group('GITC options')
|
353
|
+
g.add_option('-f', '--manifest-file',
|
354
|
+
dest='manifest_file',
|
355
|
+
help='Optional manifest file to use for this GITC client.')
|
356
|
+
g.add_option('-c', '--gitc-client',
|
357
|
+
dest='gitc_client',
|
358
|
+
help='The name of the gitc_client instance to create or modify.')
|
359
|
+
|
360
|
+
_gitc_manifest_dir = None
|
361
|
+
|
362
|
+
|
363
|
+
def get_gitc_manifest_dir():
|
364
|
+
global _gitc_manifest_dir
|
365
|
+
if _gitc_manifest_dir is None:
|
366
|
+
_gitc_manifest_dir = ''
|
367
|
+
try:
|
368
|
+
with open(GITC_CONFIG_FILE, 'r') as gitc_config:
|
369
|
+
for line in gitc_config:
|
370
|
+
match = re.match('gitc_dir=(?P<gitc_manifest_dir>.*)', line)
|
371
|
+
if match:
|
372
|
+
_gitc_manifest_dir = match.group('gitc_manifest_dir')
|
373
|
+
except IOError:
|
374
|
+
pass
|
375
|
+
return _gitc_manifest_dir
|
376
|
+
|
377
|
+
|
378
|
+
def gitc_parse_clientdir(gitc_fs_path):
|
379
|
+
"""Parse a path in the GITC FS and return its client name.
|
380
|
+
|
381
|
+
@param gitc_fs_path: A subdirectory path within the GITC_FS_ROOT_DIR.
|
382
|
+
|
383
|
+
@returns: The GITC client name
|
384
|
+
"""
|
385
|
+
if gitc_fs_path == GITC_FS_ROOT_DIR:
|
386
|
+
return None
|
387
|
+
if not gitc_fs_path.startswith(GITC_FS_ROOT_DIR):
|
388
|
+
manifest_dir = get_gitc_manifest_dir()
|
389
|
+
if manifest_dir == '':
|
390
|
+
return None
|
391
|
+
if manifest_dir[-1] != '/':
|
392
|
+
manifest_dir += '/'
|
393
|
+
if gitc_fs_path == manifest_dir:
|
394
|
+
return None
|
395
|
+
if not gitc_fs_path.startswith(manifest_dir):
|
396
|
+
return None
|
397
|
+
return gitc_fs_path.split(manifest_dir)[1].split('/')[0]
|
398
|
+
return gitc_fs_path.split(GITC_FS_ROOT_DIR)[1].split('/')[0]
|
399
|
+
|
400
|
+
|
303
401
|
class CloneFailure(Exception):
|
402
|
+
|
304
403
|
"""Indicate the remote clone of repo itself failed.
|
305
404
|
"""
|
306
405
|
|
307
406
|
|
308
|
-
def _Init(args):
|
407
|
+
def _Init(args, gitc_init=False):
|
309
408
|
"""Installs repo by cloning it over the network.
|
310
409
|
"""
|
410
|
+
if gitc_init:
|
411
|
+
_GitcInitOptions(init_optparse)
|
311
412
|
opt, args = init_optparse.parse_args(args)
|
312
413
|
if args:
|
313
414
|
init_optparse.print_usage()
|
@@ -330,6 +431,26 @@ def _Init(args):
|
|
330
431
|
raise CloneFailure()
|
331
432
|
|
332
433
|
try:
|
434
|
+
if gitc_init:
|
435
|
+
gitc_manifest_dir = get_gitc_manifest_dir()
|
436
|
+
if not gitc_manifest_dir:
|
437
|
+
_print('fatal: GITC filesystem is not available. Exiting...',
|
438
|
+
file=sys.stderr)
|
439
|
+
sys.exit(1)
|
440
|
+
gitc_client = opt.gitc_client
|
441
|
+
if not gitc_client:
|
442
|
+
gitc_client = gitc_parse_clientdir(os.getcwd())
|
443
|
+
if not gitc_client:
|
444
|
+
_print('fatal: GITC client (-c) is required.', file=sys.stderr)
|
445
|
+
sys.exit(1)
|
446
|
+
client_dir = os.path.join(gitc_manifest_dir, gitc_client)
|
447
|
+
if not os.path.exists(client_dir):
|
448
|
+
os.makedirs(client_dir)
|
449
|
+
os.chdir(client_dir)
|
450
|
+
if os.path.exists(repodir):
|
451
|
+
# This GITC Client has already initialized repo so continue.
|
452
|
+
return
|
453
|
+
|
333
454
|
os.mkdir(repodir)
|
334
455
|
except OSError as e:
|
335
456
|
if e.errno != errno.EEXIST:
|
@@ -348,7 +469,7 @@ def _Init(args):
|
|
348
469
|
can_verify = True
|
349
470
|
|
350
471
|
dst = os.path.abspath(os.path.join(repodir, S_repo))
|
351
|
-
_Clone(url, dst, opt.quiet)
|
472
|
+
_Clone(url, dst, opt.quiet, not opt.no_clone_bundle)
|
352
473
|
|
353
474
|
if can_verify and not opt.no_repo_verify:
|
354
475
|
rev = _Verify(dst, branch, opt.quiet)
|
@@ -441,13 +562,16 @@ def SetupGnuPG(quiet):
|
|
441
562
|
sys.exit(1)
|
442
563
|
|
443
564
|
env = os.environ.copy()
|
444
|
-
|
565
|
+
try:
|
566
|
+
env['GNUPGHOME'] = gpg_dir
|
567
|
+
except UnicodeEncodeError:
|
568
|
+
env['GNUPGHOME'] = gpg_dir.encode()
|
445
569
|
|
446
570
|
cmd = ['gpg', '--import']
|
447
571
|
try:
|
448
572
|
proc = subprocess.Popen(cmd,
|
449
|
-
env
|
450
|
-
stdin
|
573
|
+
env=env,
|
574
|
+
stdin=subprocess.PIPE)
|
451
575
|
except OSError as e:
|
452
576
|
if not quiet:
|
453
577
|
_print('warning: gpg (GnuPG) is not available.', file=sys.stderr)
|
@@ -473,7 +597,7 @@ def _SetConfig(local, name, value):
|
|
473
597
|
"""Set a git configuration option to the specified value.
|
474
598
|
"""
|
475
599
|
cmd = [GIT, 'config', name, value]
|
476
|
-
if subprocess.Popen(cmd, cwd
|
600
|
+
if subprocess.Popen(cmd, cwd=local).wait() != 0:
|
477
601
|
raise CloneFailure()
|
478
602
|
|
479
603
|
|
@@ -486,9 +610,9 @@ def _InitHttp():
|
|
486
610
|
n = netrc.netrc()
|
487
611
|
for host in n.hosts:
|
488
612
|
p = n.hosts[host]
|
489
|
-
mgr.add_password(p[1], 'http://%s/'
|
613
|
+
mgr.add_password(p[1], 'http://%s/' % host, p[0], p[2])
|
490
614
|
mgr.add_password(p[1], 'https://%s/' % host, p[0], p[2])
|
491
|
-
except:
|
615
|
+
except: # pylint: disable=bare-except
|
492
616
|
pass
|
493
617
|
handlers.append(urllib.request.HTTPBasicAuthHandler(mgr))
|
494
618
|
handlers.append(urllib.request.HTTPDigestAuthHandler(mgr))
|
@@ -501,6 +625,7 @@ def _InitHttp():
|
|
501
625
|
handlers.append(urllib.request.HTTPSHandler(debuglevel=1))
|
502
626
|
urllib.request.install_opener(urllib.request.build_opener(*handlers))
|
503
627
|
|
628
|
+
|
504
629
|
def _Fetch(url, local, src, quiet):
|
505
630
|
if not quiet:
|
506
631
|
_print('Get %s' % url, file=sys.stderr)
|
@@ -515,22 +640,23 @@ def _Fetch(url, local, src, quiet):
|
|
515
640
|
cmd.append('+refs/heads/*:refs/remotes/origin/*')
|
516
641
|
cmd.append('refs/tags/*:refs/tags/*')
|
517
642
|
|
518
|
-
proc = subprocess.Popen(cmd, cwd
|
643
|
+
proc = subprocess.Popen(cmd, cwd=local, stderr=err)
|
519
644
|
if err:
|
520
645
|
proc.stderr.read()
|
521
646
|
proc.stderr.close()
|
522
647
|
if proc.wait() != 0:
|
523
648
|
raise CloneFailure()
|
524
649
|
|
650
|
+
|
525
651
|
def _DownloadBundle(url, local, quiet):
|
526
652
|
if not url.endswith('/'):
|
527
653
|
url += '/'
|
528
654
|
url += 'clone.bundle'
|
529
655
|
|
530
656
|
proc = subprocess.Popen(
|
531
|
-
|
532
|
-
|
533
|
-
|
657
|
+
[GIT, 'config', '--get-regexp', 'url.*.insteadof'],
|
658
|
+
cwd=local,
|
659
|
+
stdout=subprocess.PIPE)
|
534
660
|
for line in proc.stdout:
|
535
661
|
m = re.compile(r'^url\.(.*)\.insteadof (.*)$').match(line)
|
536
662
|
if m:
|
@@ -550,7 +676,7 @@ def _DownloadBundle(url, local, quiet):
|
|
550
676
|
try:
|
551
677
|
r = urllib.request.urlopen(url)
|
552
678
|
except urllib.error.HTTPError as e:
|
553
|
-
if e.code in [403, 404]:
|
679
|
+
if e.code in [401, 403, 404, 501]:
|
554
680
|
return False
|
555
681
|
_print('fatal: Cannot get %s' % url, file=sys.stderr)
|
556
682
|
_print('fatal: HTTP error %s' % e.code, file=sys.stderr)
|
@@ -572,6 +698,7 @@ def _DownloadBundle(url, local, quiet):
|
|
572
698
|
finally:
|
573
699
|
dest.close()
|
574
700
|
|
701
|
+
|
575
702
|
def _ImportBundle(local):
|
576
703
|
path = os.path.join(local, '.git', 'clone.bundle')
|
577
704
|
try:
|
@@ -579,7 +706,8 @@ def _ImportBundle(local):
|
|
579
706
|
finally:
|
580
707
|
os.remove(path)
|
581
708
|
|
582
|
-
|
709
|
+
|
710
|
+
def _Clone(url, local, quiet, clone_bundle):
|
583
711
|
"""Clones a git repository to a new subdirectory of repodir
|
584
712
|
"""
|
585
713
|
try:
|
@@ -591,14 +719,14 @@ def _Clone(url, local, quiet):
|
|
591
719
|
|
592
720
|
cmd = [GIT, 'init', '--quiet']
|
593
721
|
try:
|
594
|
-
proc = subprocess.Popen(cmd, cwd
|
722
|
+
proc = subprocess.Popen(cmd, cwd=local)
|
595
723
|
except OSError as e:
|
596
724
|
_print(file=sys.stderr)
|
597
725
|
_print("fatal: '%s' is not available" % GIT, file=sys.stderr)
|
598
726
|
_print('fatal: %s' % e, file=sys.stderr)
|
599
727
|
_print(file=sys.stderr)
|
600
728
|
_print('Please make sure %s is installed and in your path.' % GIT,
|
601
|
-
|
729
|
+
file=sys.stderr)
|
602
730
|
raise CloneFailure()
|
603
731
|
if proc.wait() != 0:
|
604
732
|
_print('fatal: could not create %s' % local, file=sys.stderr)
|
@@ -606,12 +734,12 @@ def _Clone(url, local, quiet):
|
|
606
734
|
|
607
735
|
_InitHttp()
|
608
736
|
_SetConfig(local, 'remote.origin.url', url)
|
609
|
-
_SetConfig(local,
|
610
|
-
|
611
|
-
|
737
|
+
_SetConfig(local,
|
738
|
+
'remote.origin.fetch',
|
739
|
+
'+refs/heads/*:refs/remotes/origin/*')
|
740
|
+
if clone_bundle and _DownloadBundle(url, local, quiet):
|
612
741
|
_ImportBundle(local)
|
613
|
-
|
614
|
-
_Fetch(url, local, 'origin', quiet)
|
742
|
+
_Fetch(url, local, 'origin', quiet)
|
615
743
|
|
616
744
|
|
617
745
|
def _Verify(cwd, branch, quiet):
|
@@ -621,7 +749,7 @@ def _Verify(cwd, branch, quiet):
|
|
621
749
|
proc = subprocess.Popen(cmd,
|
622
750
|
stdout=subprocess.PIPE,
|
623
751
|
stderr=subprocess.PIPE,
|
624
|
-
cwd
|
752
|
+
cwd=cwd)
|
625
753
|
cur = proc.stdout.read().strip()
|
626
754
|
proc.stdout.close()
|
627
755
|
|
@@ -639,18 +767,21 @@ def _Verify(cwd, branch, quiet):
|
|
639
767
|
if not quiet:
|
640
768
|
_print(file=sys.stderr)
|
641
769
|
_print("info: Ignoring branch '%s'; using tagged release '%s'"
|
642
|
-
|
770
|
+
% (branch, cur), file=sys.stderr)
|
643
771
|
_print(file=sys.stderr)
|
644
772
|
|
645
773
|
env = os.environ.copy()
|
646
|
-
|
774
|
+
try:
|
775
|
+
env['GNUPGHOME'] = gpg_dir
|
776
|
+
except UnicodeEncodeError:
|
777
|
+
env['GNUPGHOME'] = gpg_dir.encode()
|
647
778
|
|
648
779
|
cmd = [GIT, 'tag', '-v', cur]
|
649
780
|
proc = subprocess.Popen(cmd,
|
650
|
-
stdout
|
651
|
-
stderr
|
652
|
-
cwd
|
653
|
-
env
|
781
|
+
stdout=subprocess.PIPE,
|
782
|
+
stderr=subprocess.PIPE,
|
783
|
+
cwd=cwd,
|
784
|
+
env=env)
|
654
785
|
out = proc.stdout.read()
|
655
786
|
proc.stdout.close()
|
656
787
|
|
@@ -670,21 +801,21 @@ def _Checkout(cwd, branch, rev, quiet):
|
|
670
801
|
"""Checkout an upstream branch into the repository and track it.
|
671
802
|
"""
|
672
803
|
cmd = [GIT, 'update-ref', 'refs/heads/default', rev]
|
673
|
-
if subprocess.Popen(cmd, cwd
|
804
|
+
if subprocess.Popen(cmd, cwd=cwd).wait() != 0:
|
674
805
|
raise CloneFailure()
|
675
806
|
|
676
807
|
_SetConfig(cwd, 'branch.default.remote', 'origin')
|
677
808
|
_SetConfig(cwd, 'branch.default.merge', 'refs/heads/%s' % branch)
|
678
809
|
|
679
810
|
cmd = [GIT, 'symbolic-ref', 'HEAD', 'refs/heads/default']
|
680
|
-
if subprocess.Popen(cmd, cwd
|
811
|
+
if subprocess.Popen(cmd, cwd=cwd).wait() != 0:
|
681
812
|
raise CloneFailure()
|
682
813
|
|
683
814
|
cmd = [GIT, 'read-tree', '--reset', '-u']
|
684
815
|
if not quiet:
|
685
816
|
cmd.append('-v')
|
686
817
|
cmd.append('HEAD')
|
687
|
-
if subprocess.Popen(cmd, cwd
|
818
|
+
if subprocess.Popen(cmd, cwd=cwd).wait() != 0:
|
688
819
|
raise CloneFailure()
|
689
820
|
|
690
821
|
|
@@ -696,8 +827,8 @@ def _FindRepo():
|
|
696
827
|
|
697
828
|
olddir = None
|
698
829
|
while curdir != '/' \
|
699
|
-
|
700
|
-
|
830
|
+
and curdir != olddir \
|
831
|
+
and not repo:
|
701
832
|
repo = os.path.join(curdir, repodir, REPO_MAIN)
|
702
833
|
if not os.path.isfile(repo):
|
703
834
|
repo = None
|
@@ -706,7 +837,7 @@ def _FindRepo():
|
|
706
837
|
return (repo, os.path.join(curdir, repodir))
|
707
838
|
|
708
839
|
|
709
|
-
class _Options:
|
840
|
+
class _Options(object):
|
710
841
|
help = False
|
711
842
|
|
712
843
|
|
@@ -728,15 +859,20 @@ def _ParseArguments(args):
|
|
728
859
|
|
729
860
|
|
730
861
|
def _Usage():
|
862
|
+
gitc_usage = ""
|
863
|
+
if get_gitc_manifest_dir():
|
864
|
+
gitc_usage = " gitc-init Initialize a GITC Client.\n"
|
865
|
+
|
731
866
|
_print(
|
732
|
-
"""usage: repo COMMAND [ARGS]
|
867
|
+
"""usage: repo COMMAND [ARGS]
|
733
868
|
|
734
869
|
repo is not yet installed. Use "repo init" to install it here.
|
735
870
|
|
736
871
|
The most commonly used repo commands are:
|
737
872
|
|
738
873
|
init Install repo in the current working directory
|
739
|
-
|
874
|
+
""" + gitc_usage +
|
875
|
+
""" help Display detailed help on a command
|
740
876
|
|
741
877
|
For access to the full online help, install repo ("repo init").
|
742
878
|
""", file=sys.stderr)
|
@@ -748,6 +884,10 @@ def _Help(args):
|
|
748
884
|
if args[0] == 'init':
|
749
885
|
init_optparse.print_help()
|
750
886
|
sys.exit(0)
|
887
|
+
elif args[0] == 'gitc-init':
|
888
|
+
_GitcInitOptions(init_optparse)
|
889
|
+
init_optparse.print_help()
|
890
|
+
sys.exit(0)
|
751
891
|
else:
|
752
892
|
_print("error: '%s' is not a bootstrap command.\n"
|
753
893
|
' For access to online help, install repo ("repo init").'
|
@@ -793,8 +933,8 @@ def _SetDefaultsTo(gitdir):
|
|
793
933
|
'--git-dir=%s' % gitdir,
|
794
934
|
'symbolic-ref',
|
795
935
|
'HEAD'],
|
796
|
-
stdout
|
797
|
-
stderr
|
936
|
+
stdout=subprocess.PIPE,
|
937
|
+
stderr=subprocess.PIPE)
|
798
938
|
REPO_REV = proc.stdout.read().strip()
|
799
939
|
proc.stdout.close()
|
800
940
|
|
@@ -807,12 +947,23 @@ def _SetDefaultsTo(gitdir):
|
|
807
947
|
|
808
948
|
|
809
949
|
def main(orig_args):
|
810
|
-
repo_main, rel_repo_dir = _FindRepo()
|
811
950
|
cmd, opt, args = _ParseArguments(orig_args)
|
812
951
|
|
952
|
+
repo_main, rel_repo_dir = None, None
|
953
|
+
# Don't use the local repo copy, make sure to switch to the gitc client first.
|
954
|
+
if cmd != 'gitc-init':
|
955
|
+
repo_main, rel_repo_dir = _FindRepo()
|
956
|
+
|
813
957
|
wrapper_path = os.path.abspath(__file__)
|
814
958
|
my_main, my_git = _RunSelf(wrapper_path)
|
815
959
|
|
960
|
+
cwd = os.getcwd()
|
961
|
+
if get_gitc_manifest_dir() and cwd.startswith(get_gitc_manifest_dir()):
|
962
|
+
_print('error: repo cannot be used in the GITC local manifest directory.'
|
963
|
+
'\nIf you want to work on this GITC client please rerun this '
|
964
|
+
'command from the corresponding client under /gitc/',
|
965
|
+
file=sys.stderr)
|
966
|
+
sys.exit(1)
|
816
967
|
if not repo_main:
|
817
968
|
if opt.help:
|
818
969
|
_Usage()
|
@@ -820,26 +971,18 @@ def main(orig_args):
|
|
820
971
|
_Help(args)
|
821
972
|
if not cmd:
|
822
973
|
_NotInstalled()
|
823
|
-
if cmd == 'init':
|
974
|
+
if cmd == 'init' or cmd == 'gitc-init':
|
824
975
|
if my_git:
|
825
976
|
_SetDefaultsTo(my_git)
|
826
977
|
try:
|
827
|
-
_Init(args)
|
978
|
+
_Init(args, gitc_init=(cmd == 'gitc-init'))
|
828
979
|
except CloneFailure:
|
829
|
-
|
830
|
-
for name in files:
|
831
|
-
os.remove(os.path.join(root, name))
|
832
|
-
for name in dirs:
|
833
|
-
os.rmdir(os.path.join(root, name))
|
834
|
-
os.rmdir(repodir)
|
980
|
+
shutil.rmtree(os.path.join(repodir, S_repo), ignore_errors=True)
|
835
981
|
sys.exit(1)
|
836
982
|
repo_main, rel_repo_dir = _FindRepo()
|
837
983
|
else:
|
838
984
|
_NoCommands(cmd)
|
839
985
|
|
840
|
-
if cmd == 'sync' and NeedSetupGnuPG():
|
841
|
-
SetupGnuPG(False)
|
842
|
-
|
843
986
|
if my_main:
|
844
987
|
repo_main = my_main
|
845
988
|
|
@@ -860,4 +1003,8 @@ def main(orig_args):
|
|
860
1003
|
|
861
1004
|
|
862
1005
|
if __name__ == '__main__':
|
1006
|
+
if ver[0] == 3:
|
1007
|
+
_print('warning: Python 3 support is currently experimental. YMMV.\n'
|
1008
|
+
'Please use Python 2.6 - 2.7 instead.',
|
1009
|
+
file=sys.stderr)
|
863
1010
|
main(sys.argv[1:])
|