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,7 +26,7 @@ Through a comedy of history, each binary is stored and retrieved differently.
|
|
26
26
|
|
27
27
|
### Git
|
28
28
|
|
29
|
-
Git installs are mirrored versions of the
|
29
|
+
Git installs are mirrored versions of the official Git-for-Windows Portable
|
30
30
|
releases.
|
31
31
|
* Original: `https://github.com/git-for-windows/git/releases`
|
32
32
|
* Mirror: `gs://chrome-infra/PortableGit*.7z.exe`
|
@@ -57,10 +57,3 @@ Python installs are sourced from gs://chrome-infra/python276_bin.zip .
|
|
57
57
|
|
58
58
|
The process to create them is sort-of-documented in the README of the python
|
59
59
|
zip file.
|
60
|
-
|
61
|
-
### Subversion
|
62
|
-
|
63
|
-
Subversion installs are sourced from gs://chrome-infra/svn_bin.zip .
|
64
|
-
|
65
|
-
There will likely never be an update to SVN in `depot_tools` from the current
|
66
|
-
version.
|
@@ -17,6 +17,8 @@ ROOT_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..'))
|
|
17
17
|
|
18
18
|
DEVNULL = open(os.devnull, 'w')
|
19
19
|
|
20
|
+
BAT_EXT = '.bat' if sys.platform.startswith('win') else ''
|
21
|
+
|
20
22
|
|
21
23
|
def _check_call(argv, **kwargs):
|
22
24
|
"""Wrapper for subprocess.check_call that adds logging."""
|
@@ -43,17 +45,6 @@ def clean_up_old_git_installations(git_directory):
|
|
43
45
|
shutil.rmtree(full_entry, ignore_errors=True)
|
44
46
|
|
45
47
|
|
46
|
-
def bootstrap_cipd(cipd_directory, cipd_platform):
|
47
|
-
"""Bootstraps CIPD client into |cipd_directory|."""
|
48
|
-
_check_call([
|
49
|
-
sys.executable,
|
50
|
-
os.path.join(ROOT_DIR, 'recipe_modules', 'cipd', 'resources',
|
51
|
-
'bootstrap.py'),
|
52
|
-
'--platform', cipd_platform,
|
53
|
-
'--dest-directory', cipd_directory
|
54
|
-
])
|
55
|
-
|
56
|
-
|
57
48
|
def cipd_install(args, dest_directory, package, version):
|
58
49
|
"""Installs CIPD |package| at |version| into |dest_directory|."""
|
59
50
|
manifest_file = tempfile.mktemp()
|
@@ -104,9 +95,6 @@ def need_to_install_git(args, git_directory):
|
|
104
95
|
def install_git(args, git_version, git_directory):
|
105
96
|
"""Installs |git_version| into |git_directory|."""
|
106
97
|
cipd_platform = 'windows-%s' % ('amd64' if args.bits == 64 else '386')
|
107
|
-
if not args.cipd_client:
|
108
|
-
bootstrap_cipd(ROOT_DIR, cipd_platform)
|
109
|
-
args.cipd_client = os.path.join(ROOT_DIR, 'cipd')
|
110
98
|
temp_dir = tempfile.mkdtemp()
|
111
99
|
try:
|
112
100
|
cipd_install(args,
|
@@ -172,7 +160,9 @@ def main(argv):
|
|
172
160
|
parser = argparse.ArgumentParser()
|
173
161
|
parser.add_argument('--bits', type=int, choices=(32,64), default=64,
|
174
162
|
help='Bitness of the client to install.')
|
175
|
-
parser.add_argument('--cipd-client',
|
163
|
+
parser.add_argument('--cipd-client',
|
164
|
+
help='Path to CIPD client binary. default: %(default)s',
|
165
|
+
default=os.path.join(ROOT_DIR, 'cipd'+BAT_EXT))
|
176
166
|
parser.add_argument('--cipd-cache-directory',
|
177
167
|
help='Path to CIPD cache directory.')
|
178
168
|
parser.add_argument('--force', action='store_true',
|
@@ -200,4 +190,4 @@ def main(argv):
|
|
200
190
|
|
201
191
|
|
202
192
|
if __name__ == '__main__':
|
203
|
-
sys.exit(main(sys.argv[1:]))
|
193
|
+
sys.exit(main(sys.argv[1:]))
|
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.10.0
|
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.10.0
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# found in the LICENSE file.
|
5
5
|
"""Manages a project checkout.
|
6
6
|
|
7
|
-
Includes support for
|
7
|
+
Includes support only for git.
|
8
8
|
"""
|
9
9
|
|
10
10
|
import fnmatch
|
@@ -77,24 +77,21 @@ def align_stdout(stdout):
|
|
77
77
|
|
78
78
|
class PatchApplicationFailed(Exception):
|
79
79
|
"""Patch failed to be applied."""
|
80
|
-
def __init__(self,
|
81
|
-
super(PatchApplicationFailed, self).__init__(
|
82
|
-
self.
|
83
|
-
self.
|
84
|
-
|
85
|
-
@property
|
86
|
-
def filename(self):
|
87
|
-
if self.patch:
|
88
|
-
return self.patch.filename
|
80
|
+
def __init__(self, errors, verbose):
|
81
|
+
super(PatchApplicationFailed, self).__init__(errors, verbose)
|
82
|
+
self.errors = errors
|
83
|
+
self.verbose = verbose
|
89
84
|
|
90
85
|
def __str__(self):
|
91
86
|
out = []
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
87
|
+
for e in self.errors:
|
88
|
+
p, status = e
|
89
|
+
if p and p.filename:
|
90
|
+
out.append('Failed to apply patch for %s:' % p.filename)
|
91
|
+
if status:
|
92
|
+
out.append(status)
|
93
|
+
if p and self.verbose:
|
94
|
+
out.append('Patch: %s' % p.dump())
|
98
95
|
return '\n'.join(out)
|
99
96
|
|
100
97
|
|
@@ -161,403 +158,6 @@ class CheckoutBase(object):
|
|
161
158
|
raise NotImplementedError()
|
162
159
|
|
163
160
|
|
164
|
-
class RawCheckout(CheckoutBase):
|
165
|
-
"""Used to apply a patch locally without any intent to commit it.
|
166
|
-
|
167
|
-
To be used by the try server.
|
168
|
-
"""
|
169
|
-
def prepare(self, revision):
|
170
|
-
"""Stubbed out."""
|
171
|
-
pass
|
172
|
-
|
173
|
-
def apply_patch(self, patches, post_processors=None, verbose=False):
|
174
|
-
"""Ignores svn properties."""
|
175
|
-
post_processors = post_processors or self.post_processors or []
|
176
|
-
for p in patches:
|
177
|
-
stdout = []
|
178
|
-
try:
|
179
|
-
filepath = os.path.join(self.project_path, p.filename)
|
180
|
-
if p.is_delete:
|
181
|
-
os.remove(filepath)
|
182
|
-
assert(not os.path.exists(filepath))
|
183
|
-
stdout.append('Deleted.')
|
184
|
-
else:
|
185
|
-
dirname = os.path.dirname(p.filename)
|
186
|
-
full_dir = os.path.join(self.project_path, dirname)
|
187
|
-
if dirname and not os.path.isdir(full_dir):
|
188
|
-
os.makedirs(full_dir)
|
189
|
-
stdout.append('Created missing directory %s.' % dirname)
|
190
|
-
|
191
|
-
if p.is_binary:
|
192
|
-
content = p.get()
|
193
|
-
with open(filepath, 'wb') as f:
|
194
|
-
f.write(content)
|
195
|
-
stdout.append('Added binary file %d bytes.' % len(content))
|
196
|
-
else:
|
197
|
-
if p.source_filename:
|
198
|
-
if not p.is_new:
|
199
|
-
raise PatchApplicationFailed(
|
200
|
-
p,
|
201
|
-
'File has a source filename specified but is not new')
|
202
|
-
# Copy the file first.
|
203
|
-
if os.path.isfile(filepath):
|
204
|
-
raise PatchApplicationFailed(
|
205
|
-
p, 'File exist but was about to be overwriten')
|
206
|
-
shutil.copy2(
|
207
|
-
os.path.join(self.project_path, p.source_filename), filepath)
|
208
|
-
stdout.append('Copied %s -> %s' % (p.source_filename, p.filename))
|
209
|
-
if p.diff_hunks:
|
210
|
-
cmd = ['patch', '-u', '--binary', '-p%s' % p.patchlevel]
|
211
|
-
if verbose:
|
212
|
-
cmd.append('--verbose')
|
213
|
-
env = os.environ.copy()
|
214
|
-
env['TMPDIR'] = tempfile.mkdtemp(prefix='crpatch')
|
215
|
-
try:
|
216
|
-
stdout.append(
|
217
|
-
subprocess2.check_output(
|
218
|
-
cmd,
|
219
|
-
stdin=p.get(False),
|
220
|
-
stderr=subprocess2.STDOUT,
|
221
|
-
cwd=self.project_path,
|
222
|
-
timeout=GLOBAL_TIMEOUT,
|
223
|
-
env=env))
|
224
|
-
finally:
|
225
|
-
shutil.rmtree(env['TMPDIR'])
|
226
|
-
elif p.is_new and not os.path.exists(filepath):
|
227
|
-
# There is only a header. Just create the file.
|
228
|
-
open(filepath, 'w').close()
|
229
|
-
stdout.append('Created an empty file.')
|
230
|
-
for post in post_processors:
|
231
|
-
post(self, p)
|
232
|
-
if verbose:
|
233
|
-
print p.filename
|
234
|
-
print align_stdout(stdout)
|
235
|
-
except OSError, e:
|
236
|
-
raise PatchApplicationFailed(p, '%s%s' % (align_stdout(stdout), e))
|
237
|
-
except subprocess.CalledProcessError, e:
|
238
|
-
raise PatchApplicationFailed(
|
239
|
-
p,
|
240
|
-
'While running %s;\n%s%s' % (
|
241
|
-
' '.join(e.cmd),
|
242
|
-
align_stdout(stdout),
|
243
|
-
align_stdout([getattr(e, 'stdout', '')])))
|
244
|
-
|
245
|
-
def commit(self, commit_message, user):
|
246
|
-
"""Stubbed out."""
|
247
|
-
raise NotImplementedError('RawCheckout can\'t commit')
|
248
|
-
|
249
|
-
def revisions(self, _rev1, _rev2):
|
250
|
-
return None
|
251
|
-
|
252
|
-
|
253
|
-
class SvnConfig(object):
|
254
|
-
"""Parses a svn configuration file."""
|
255
|
-
def __init__(self, svn_config_dir=None):
|
256
|
-
super(SvnConfig, self).__init__()
|
257
|
-
self.svn_config_dir = svn_config_dir
|
258
|
-
self.default = not bool(self.svn_config_dir)
|
259
|
-
if not self.svn_config_dir:
|
260
|
-
if sys.platform == 'win32':
|
261
|
-
self.svn_config_dir = os.path.join(os.environ['APPDATA'], 'Subversion')
|
262
|
-
else:
|
263
|
-
self.svn_config_dir = os.path.expanduser(
|
264
|
-
os.path.join('~', '.subversion'))
|
265
|
-
svn_config_file = os.path.join(self.svn_config_dir, 'config')
|
266
|
-
parser = configparser.SafeConfigParser()
|
267
|
-
if os.path.isfile(svn_config_file):
|
268
|
-
parser.read(svn_config_file)
|
269
|
-
else:
|
270
|
-
parser.add_section('auto-props')
|
271
|
-
self.auto_props = dict(parser.items('auto-props'))
|
272
|
-
|
273
|
-
|
274
|
-
class SvnMixIn(object):
|
275
|
-
"""MixIn class to add svn commands common to both svn and git-svn clients."""
|
276
|
-
# These members need to be set by the subclass.
|
277
|
-
commit_user = None
|
278
|
-
commit_pwd = None
|
279
|
-
svn_url = None
|
280
|
-
project_path = None
|
281
|
-
# Override at class level when necessary. If used, --non-interactive is
|
282
|
-
# implied.
|
283
|
-
svn_config = SvnConfig()
|
284
|
-
# Set to True when non-interactivity is necessary but a custom subversion
|
285
|
-
# configuration directory is not necessary.
|
286
|
-
non_interactive = False
|
287
|
-
|
288
|
-
def _add_svn_flags(self, args, non_interactive, credentials=True):
|
289
|
-
args = ['svn'] + args
|
290
|
-
if not self.svn_config.default:
|
291
|
-
args.extend(['--config-dir', self.svn_config.svn_config_dir])
|
292
|
-
if not self.svn_config.default or self.non_interactive or non_interactive:
|
293
|
-
args.append('--non-interactive')
|
294
|
-
if credentials:
|
295
|
-
if self.commit_user:
|
296
|
-
args.extend(['--username', self.commit_user])
|
297
|
-
if self.commit_pwd:
|
298
|
-
args.extend(['--password', self.commit_pwd])
|
299
|
-
return args
|
300
|
-
|
301
|
-
def _check_call_svn(self, args, **kwargs):
|
302
|
-
"""Runs svn and throws an exception if the command failed."""
|
303
|
-
kwargs.setdefault('cwd', self.project_path)
|
304
|
-
kwargs.setdefault('stdout', self.VOID)
|
305
|
-
kwargs.setdefault('timeout', GLOBAL_TIMEOUT)
|
306
|
-
return subprocess2.check_call_out(
|
307
|
-
self._add_svn_flags(args, False), **kwargs)
|
308
|
-
|
309
|
-
def _check_output_svn(self, args, credentials=True, **kwargs):
|
310
|
-
"""Runs svn and throws an exception if the command failed.
|
311
|
-
|
312
|
-
Returns the output.
|
313
|
-
"""
|
314
|
-
kwargs.setdefault('cwd', self.project_path)
|
315
|
-
return subprocess2.check_output(
|
316
|
-
self._add_svn_flags(args, True, credentials),
|
317
|
-
stderr=subprocess2.STDOUT,
|
318
|
-
timeout=GLOBAL_TIMEOUT,
|
319
|
-
**kwargs)
|
320
|
-
|
321
|
-
@staticmethod
|
322
|
-
def _parse_svn_info(output, key):
|
323
|
-
"""Returns value for key from svn info output.
|
324
|
-
|
325
|
-
Case insensitive.
|
326
|
-
"""
|
327
|
-
values = {}
|
328
|
-
key = key.lower()
|
329
|
-
for line in output.splitlines(False):
|
330
|
-
if not line:
|
331
|
-
continue
|
332
|
-
k, v = line.split(':', 1)
|
333
|
-
k = k.strip().lower()
|
334
|
-
v = v.strip()
|
335
|
-
assert not k in values
|
336
|
-
values[k] = v
|
337
|
-
return values.get(key, None)
|
338
|
-
|
339
|
-
|
340
|
-
class SvnCheckout(CheckoutBase, SvnMixIn):
|
341
|
-
"""Manages a subversion checkout."""
|
342
|
-
def __init__(self, root_dir, project_name, commit_user, commit_pwd, svn_url,
|
343
|
-
post_processors=None):
|
344
|
-
CheckoutBase.__init__(self, root_dir, project_name, post_processors)
|
345
|
-
SvnMixIn.__init__(self)
|
346
|
-
self.commit_user = commit_user
|
347
|
-
self.commit_pwd = commit_pwd
|
348
|
-
self.svn_url = svn_url
|
349
|
-
assert bool(self.commit_user) >= bool(self.commit_pwd)
|
350
|
-
|
351
|
-
def prepare(self, revision):
|
352
|
-
# Will checkout if the directory is not present.
|
353
|
-
assert self.svn_url
|
354
|
-
if not os.path.isdir(self.project_path):
|
355
|
-
logging.info('Checking out %s in %s' %
|
356
|
-
(self.project_name, self.project_path))
|
357
|
-
return self._revert(revision)
|
358
|
-
|
359
|
-
def apply_patch(self, patches, post_processors=None, verbose=False):
|
360
|
-
post_processors = post_processors or self.post_processors or []
|
361
|
-
for p in patches:
|
362
|
-
stdout = []
|
363
|
-
try:
|
364
|
-
filepath = os.path.join(self.project_path, p.filename)
|
365
|
-
# It is important to use credentials=False otherwise credentials could
|
366
|
-
# leak in the error message. Credentials are not necessary here for the
|
367
|
-
# following commands anyway.
|
368
|
-
if p.is_delete:
|
369
|
-
stdout.append(self._check_output_svn(
|
370
|
-
['delete', p.filename, '--force'], credentials=False))
|
371
|
-
assert(not os.path.exists(filepath))
|
372
|
-
stdout.append('Deleted.')
|
373
|
-
else:
|
374
|
-
# svn add while creating directories otherwise svn add on the
|
375
|
-
# contained files will silently fail.
|
376
|
-
# First, find the root directory that exists.
|
377
|
-
dirname = os.path.dirname(p.filename)
|
378
|
-
dirs_to_create = []
|
379
|
-
while (dirname and
|
380
|
-
not os.path.isdir(os.path.join(self.project_path, dirname))):
|
381
|
-
dirs_to_create.append(dirname)
|
382
|
-
dirname = os.path.dirname(dirname)
|
383
|
-
for dir_to_create in reversed(dirs_to_create):
|
384
|
-
os.mkdir(os.path.join(self.project_path, dir_to_create))
|
385
|
-
stdout.append(
|
386
|
-
self._check_output_svn(
|
387
|
-
['add', dir_to_create, '--force'], credentials=False))
|
388
|
-
stdout.append('Created missing directory %s.' % dir_to_create)
|
389
|
-
|
390
|
-
if p.is_binary:
|
391
|
-
content = p.get()
|
392
|
-
with open(filepath, 'wb') as f:
|
393
|
-
f.write(content)
|
394
|
-
stdout.append('Added binary file %d bytes.' % len(content))
|
395
|
-
else:
|
396
|
-
if p.source_filename:
|
397
|
-
if not p.is_new:
|
398
|
-
raise PatchApplicationFailed(
|
399
|
-
p,
|
400
|
-
'File has a source filename specified but is not new')
|
401
|
-
# Copy the file first.
|
402
|
-
if os.path.isfile(filepath):
|
403
|
-
raise PatchApplicationFailed(
|
404
|
-
p, 'File exist but was about to be overwriten')
|
405
|
-
stdout.append(
|
406
|
-
self._check_output_svn(
|
407
|
-
['copy', p.source_filename, p.filename]))
|
408
|
-
stdout.append('Copied %s -> %s' % (p.source_filename, p.filename))
|
409
|
-
if p.diff_hunks:
|
410
|
-
cmd = [
|
411
|
-
'patch',
|
412
|
-
'-p%s' % p.patchlevel,
|
413
|
-
'--forward',
|
414
|
-
'--force',
|
415
|
-
'--no-backup-if-mismatch',
|
416
|
-
]
|
417
|
-
env = os.environ.copy()
|
418
|
-
env['TMPDIR'] = tempfile.mkdtemp(prefix='crpatch')
|
419
|
-
try:
|
420
|
-
stdout.append(
|
421
|
-
subprocess2.check_output(
|
422
|
-
cmd,
|
423
|
-
stdin=p.get(False),
|
424
|
-
cwd=self.project_path,
|
425
|
-
timeout=GLOBAL_TIMEOUT,
|
426
|
-
env=env))
|
427
|
-
finally:
|
428
|
-
shutil.rmtree(env['TMPDIR'])
|
429
|
-
|
430
|
-
elif p.is_new and not os.path.exists(filepath):
|
431
|
-
# There is only a header. Just create the file if it doesn't
|
432
|
-
# exist.
|
433
|
-
open(filepath, 'w').close()
|
434
|
-
stdout.append('Created an empty file.')
|
435
|
-
if p.is_new and not p.source_filename:
|
436
|
-
# Do not run it if p.source_filename is defined, since svn copy was
|
437
|
-
# using above.
|
438
|
-
stdout.append(
|
439
|
-
self._check_output_svn(
|
440
|
-
['add', p.filename, '--force'], credentials=False))
|
441
|
-
for name, value in p.svn_properties:
|
442
|
-
if value is None:
|
443
|
-
stdout.append(
|
444
|
-
self._check_output_svn(
|
445
|
-
['propdel', '--quiet', name, p.filename],
|
446
|
-
credentials=False))
|
447
|
-
stdout.append('Property %s deleted.' % name)
|
448
|
-
else:
|
449
|
-
stdout.append(
|
450
|
-
self._check_output_svn(
|
451
|
-
['propset', name, value, p.filename], credentials=False))
|
452
|
-
stdout.append('Property %s=%s' % (name, value))
|
453
|
-
for prop, values in self.svn_config.auto_props.iteritems():
|
454
|
-
if fnmatch.fnmatch(p.filename, prop):
|
455
|
-
for value in values.split(';'):
|
456
|
-
if '=' not in value:
|
457
|
-
params = [value, '.']
|
458
|
-
else:
|
459
|
-
params = value.split('=', 1)
|
460
|
-
if params[1] == '*':
|
461
|
-
# Works around crbug.com/150960 on Windows.
|
462
|
-
params[1] = '.'
|
463
|
-
stdout.append(
|
464
|
-
self._check_output_svn(
|
465
|
-
['propset'] + params + [p.filename], credentials=False))
|
466
|
-
stdout.append('Property (auto) %s' % '='.join(params))
|
467
|
-
for post in post_processors:
|
468
|
-
post(self, p)
|
469
|
-
if verbose:
|
470
|
-
print p.filename
|
471
|
-
print align_stdout(stdout)
|
472
|
-
except OSError, e:
|
473
|
-
raise PatchApplicationFailed(p, '%s%s' % (align_stdout(stdout), e))
|
474
|
-
except subprocess.CalledProcessError, e:
|
475
|
-
raise PatchApplicationFailed(
|
476
|
-
p,
|
477
|
-
'While running %s;\n%s%s' % (
|
478
|
-
' '.join(e.cmd),
|
479
|
-
align_stdout(stdout),
|
480
|
-
align_stdout([getattr(e, 'stdout', '')])))
|
481
|
-
|
482
|
-
def commit(self, commit_message, user):
|
483
|
-
logging.info('Committing patch for %s' % user)
|
484
|
-
assert self.commit_user
|
485
|
-
assert isinstance(commit_message, unicode)
|
486
|
-
handle, commit_filename = tempfile.mkstemp(text=True)
|
487
|
-
try:
|
488
|
-
# Shouldn't assume default encoding is UTF-8. But really, if you are using
|
489
|
-
# anything else, you are living in another world.
|
490
|
-
os.write(handle, commit_message.encode('utf-8'))
|
491
|
-
os.close(handle)
|
492
|
-
# When committing, svn won't update the Revision metadata of the checkout,
|
493
|
-
# so if svn commit returns "Committed revision 3.", svn info will still
|
494
|
-
# return "Revision: 2". Since running svn update right after svn commit
|
495
|
-
# creates a race condition with other committers, this code _must_ parse
|
496
|
-
# the output of svn commit and use a regexp to grab the revision number.
|
497
|
-
# Note that "Committed revision N." is localized but subprocess2 forces
|
498
|
-
# LANGUAGE=en.
|
499
|
-
args = ['commit', '--file', commit_filename]
|
500
|
-
# realauthor is parsed by a server-side hook.
|
501
|
-
if user and user != self.commit_user:
|
502
|
-
args.extend(['--with-revprop', 'realauthor=%s' % user])
|
503
|
-
out = self._check_output_svn(args)
|
504
|
-
finally:
|
505
|
-
os.remove(commit_filename)
|
506
|
-
lines = filter(None, out.splitlines())
|
507
|
-
match = re.match(r'^Committed revision (\d+).$', lines[-1])
|
508
|
-
if not match:
|
509
|
-
raise PatchApplicationFailed(
|
510
|
-
None,
|
511
|
-
'Couldn\'t make sense out of svn commit message:\n' + out)
|
512
|
-
return int(match.group(1))
|
513
|
-
|
514
|
-
def _revert(self, revision):
|
515
|
-
"""Reverts local modifications or checks out if the directory is not
|
516
|
-
present. Use depot_tools's functionality to do this.
|
517
|
-
"""
|
518
|
-
flags = ['--ignore-externals']
|
519
|
-
if revision:
|
520
|
-
flags.extend(['--revision', str(revision)])
|
521
|
-
if os.path.isdir(self.project_path):
|
522
|
-
# This may remove any part (or all) of the checkout.
|
523
|
-
scm.SVN.Revert(self.project_path, no_ignore=True)
|
524
|
-
|
525
|
-
if os.path.isdir(self.project_path):
|
526
|
-
# Revive files that were deleted in scm.SVN.Revert().
|
527
|
-
self._check_call_svn(['update', '--force'] + flags,
|
528
|
-
timeout=FETCH_TIMEOUT)
|
529
|
-
else:
|
530
|
-
logging.info(
|
531
|
-
'Directory %s is not present, checking it out.' % self.project_path)
|
532
|
-
self._check_call_svn(
|
533
|
-
['checkout', self.svn_url, self.project_path] + flags, cwd=None,
|
534
|
-
timeout=FETCH_TIMEOUT)
|
535
|
-
return self._get_revision()
|
536
|
-
|
537
|
-
def _get_revision(self):
|
538
|
-
out = self._check_output_svn(['info', '.'])
|
539
|
-
revision = int(self._parse_svn_info(out, 'revision'))
|
540
|
-
if revision != self._last_seen_revision:
|
541
|
-
logging.info('Updated to revision %d' % revision)
|
542
|
-
self._last_seen_revision = revision
|
543
|
-
return revision
|
544
|
-
|
545
|
-
def revisions(self, rev1, rev2):
|
546
|
-
"""Returns the number of actual commits, not just the difference between
|
547
|
-
numbers.
|
548
|
-
"""
|
549
|
-
rev2 = rev2 or 'HEAD'
|
550
|
-
# Revision range is inclusive and ordering doesn't matter, they'll appear in
|
551
|
-
# the order specified.
|
552
|
-
try:
|
553
|
-
out = self._check_output_svn(
|
554
|
-
['log', '-q', self.svn_url, '-r', '%s:%s' % (rev1, rev2)])
|
555
|
-
except subprocess.CalledProcessError:
|
556
|
-
return None
|
557
|
-
# Ignore the '----' lines.
|
558
|
-
return len([l for l in out.splitlines() if l.startswith('r')]) - 1
|
559
|
-
|
560
|
-
|
561
161
|
class GitCheckout(CheckoutBase):
|
562
162
|
"""Manages a git checkout."""
|
563
163
|
def __init__(self, root_dir, project_name, remote_branch, git_url,
|
@@ -639,8 +239,6 @@ class GitCheckout(CheckoutBase):
|
|
639
239
|
"""Applies a patch on 'working_branch' and switches to it.
|
640
240
|
|
641
241
|
The changes remain staged on the current branch.
|
642
|
-
|
643
|
-
Ignores svn properties and raise an exception on unexpected ones.
|
644
242
|
"""
|
645
243
|
post_processors = post_processors or self.post_processors or []
|
646
244
|
# It this throws, the checkout is corrupted. Maybe worth deleting it and
|
@@ -650,6 +248,7 @@ class GitCheckout(CheckoutBase):
|
|
650
248
|
['checkout', '-b', self.working_branch, '-t', self.remote_branch,
|
651
249
|
'--quiet'])
|
652
250
|
|
251
|
+
errors = []
|
653
252
|
for index, p in enumerate(patches):
|
654
253
|
stdout = []
|
655
254
|
try:
|
@@ -686,33 +285,21 @@ class GitCheckout(CheckoutBase):
|
|
686
285
|
if verbose:
|
687
286
|
cmd.append('--verbose')
|
688
287
|
stdout.append(self._check_output_git(cmd, stdin=p.get(True)))
|
689
|
-
for key, value in p.svn_properties:
|
690
|
-
# Ignore some known auto-props flags through .subversion/config,
|
691
|
-
# bails out on the other ones.
|
692
|
-
# TODO(maruel): Read ~/.subversion/config and detect the rules that
|
693
|
-
# applies here to figure out if the property will be correctly
|
694
|
-
# handled.
|
695
|
-
stdout.append('Property %s=%s' % (key, value))
|
696
|
-
if not key in (
|
697
|
-
'svn:eol-style', 'svn:executable', 'svn:mime-type'):
|
698
|
-
raise patch.UnsupportedPatchFormat(
|
699
|
-
p.filename,
|
700
|
-
'Cannot apply svn property %s to file %s.' % (
|
701
|
-
key, p.filename))
|
702
288
|
for post in post_processors:
|
703
289
|
post(self, p)
|
704
290
|
if verbose:
|
705
291
|
print p.filename
|
706
292
|
print align_stdout(stdout)
|
707
293
|
except OSError, e:
|
708
|
-
|
294
|
+
errors.append((p, '%s%s' % (align_stdout(stdout), e)))
|
709
295
|
except subprocess.CalledProcessError, e:
|
710
|
-
|
711
|
-
p,
|
296
|
+
errors.append((p,
|
712
297
|
'While running %s;\n%s%s' % (
|
713
298
|
' '.join(e.cmd),
|
714
299
|
align_stdout(stdout),
|
715
|
-
align_stdout([getattr(e, 'stdout', '')])))
|
300
|
+
align_stdout([getattr(e, 'stdout', '')]))))
|
301
|
+
if errors:
|
302
|
+
raise PatchApplicationFailed(errors, verbose)
|
716
303
|
found_files = self._check_output_git(
|
717
304
|
['diff', '--ignore-submodules',
|
718
305
|
'--name-only', '--staged']).splitlines(False)
|
@@ -827,7 +414,7 @@ class ReadOnlyCheckout(object):
|
|
827
414
|
return self.checkout.apply_patch(
|
828
415
|
patches, post_processors or self.post_processors, verbose)
|
829
416
|
|
830
|
-
def commit(self, message, user): # pylint: disable=
|
417
|
+
def commit(self, message, user): # pylint: disable=no-self-use
|
831
418
|
logging.info('Would have committed for %s with message: %s' % (
|
832
419
|
user, message))
|
833
420
|
return 'FAKE'
|