libv8 5.2.361.43.1 → 5.3.332.38.0beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGELOG.md +4 -0
  4. data/README.md +1 -0
  5. data/Rakefile +4 -4
  6. data/ext/libv8/paths.rb +1 -1
  7. data/lib/libv8/version.rb +1 -1
  8. data/libv8.gemspec +1 -1
  9. data/patches/0001-Build-a-standalone-static-library.patch +4 -4
  10. data/patches/0002-Don-t-compile-unnecessary-stuff.patch +4 -4
  11. data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +4 -4
  12. data/patches/0004-Reinterpret-thread-hash-for-FreeBSD-too.patch +8 -8
  13. data/spec/location_spec.rb +1 -1
  14. data/vendor/depot_tools/README.gclient.md +67 -0
  15. data/vendor/depot_tools/README.git-cl.md +112 -0
  16. data/vendor/depot_tools/README.md +50 -36
  17. data/vendor/depot_tools/bootstrap/win/README.md +5 -5
  18. data/vendor/depot_tools/bootstrap/win/git_bootstrap.py +203 -0
  19. data/vendor/depot_tools/bootstrap/win/git_version.txt +1 -0
  20. data/vendor/depot_tools/bootstrap/win/git_version_bleeding_edge.txt +1 -0
  21. data/vendor/depot_tools/bootstrap/win/win_tools.bat +1 -148
  22. data/vendor/depot_tools/cit.py +27 -21
  23. data/vendor/depot_tools/codereview.settings +1 -1
  24. data/vendor/depot_tools/cpplint.py +1 -1
  25. data/vendor/depot_tools/fix_encoding.py +1 -1
  26. data/vendor/depot_tools/gclient.py +4 -3
  27. data/vendor/depot_tools/gclient_scm.py +20 -9
  28. data/vendor/depot_tools/gclient_utils.py +84 -13
  29. data/vendor/depot_tools/gerrit_util.py +1 -1
  30. data/vendor/depot_tools/git_cl.py +374 -218
  31. data/vendor/depot_tools/git_cl_completion.sh +34 -0
  32. data/vendor/depot_tools/git_common.py +11 -7
  33. data/vendor/depot_tools/infra/config/OWNERS +1 -0
  34. data/vendor/depot_tools/infra/config/cq.cfg +3 -12
  35. data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
  36. data/vendor/depot_tools/presubmit_canned_checks.py +4 -2
  37. data/vendor/depot_tools/presubmit_support.py +26 -40
  38. data/vendor/depot_tools/recipe_modules/bot_update/api.py +31 -11
  39. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/apply_gerrit_ref.json +26 -0
  40. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +1 -1
  41. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +1 -1
  42. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +1 -1
  43. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +1 -1
  44. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/forced.json +1 -1
  45. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +44 -0
  46. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +1 -1
  47. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +1 -1
  48. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +1 -1
  49. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +1 -1
  50. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +1 -1
  51. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +1 -1
  52. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +1 -1
  53. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +1 -1
  54. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +1 -1
  55. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +3 -3
  56. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +1 -1
  57. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +1 -1
  58. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +1 -1
  59. data/vendor/depot_tools/recipe_modules/bot_update/example.py +35 -18
  60. data/vendor/depot_tools/recipe_modules/bot_update/resources/apply_gerrit.py +33 -0
  61. data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +45 -76
  62. data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +13 -18
  63. data/vendor/depot_tools/recipe_modules/cipd/__init__.py +10 -0
  64. data/vendor/depot_tools/recipe_modules/cipd/api.py +244 -0
  65. data/vendor/depot_tools/recipe_modules/cipd/example.expected/basic.json +445 -0
  66. data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-failed.json +128 -0
  67. data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-many-instances.json +453 -0
  68. data/vendor/depot_tools/recipe_modules/cipd/example.expected/install-failed.json +31 -0
  69. data/vendor/depot_tools/recipe_modules/cipd/example.expected/mac64.json +445 -0
  70. data/vendor/depot_tools/recipe_modules/cipd/example.expected/win64.json +445 -0
  71. data/vendor/depot_tools/recipe_modules/cipd/example.py +115 -0
  72. data/vendor/depot_tools/recipe_modules/cipd/resources/bootstrap.py +218 -0
  73. data/vendor/depot_tools/recipe_modules/cipd/test_api.py +102 -0
  74. data/vendor/depot_tools/recipe_modules/gclient/api.py +34 -53
  75. data/vendor/depot_tools/recipe_modules/gclient/config.py +22 -128
  76. data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +44 -6
  77. data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +44 -6
  78. data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +44 -17
  79. data/vendor/depot_tools/recipe_modules/gclient/example.py +1 -1
  80. data/vendor/depot_tools/recipe_modules/gclient/test_api.py +4 -9
  81. data/vendor/depot_tools/recipe_modules/git/api.py +25 -7
  82. data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +3 -0
  83. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +3 -0
  84. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +3 -0
  85. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +3 -0
  86. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +3 -0
  87. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +3 -0
  88. data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +3 -0
  89. data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +3 -0
  90. data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +3 -0
  91. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +3 -0
  92. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +3 -0
  93. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +3 -0
  94. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +3 -0
  95. data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +2 -1
  96. data/vendor/depot_tools/recipe_modules/git/example.expected/git-cache-checkout.json +41 -3
  97. data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +7 -1
  98. data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +3 -0
  99. data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +3 -0
  100. data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +3 -0
  101. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +4 -1
  102. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +4 -1
  103. data/vendor/depot_tools/recipes.py +8 -2
  104. data/vendor/depot_tools/roll-dep-svn.bat +10 -10
  105. data/vendor/depot_tools/roll_dep.py +0 -1
  106. data/vendor/depot_tools/third_party/upload.py +1 -25
  107. data/vendor/depot_tools/upload_to_google_storage.py +1 -1
  108. metadata +24 -32
  109. data/release/armhf-linux/Vagrantfile +0 -97
  110. data/release/armhf-linux/initrd.img +0 -0
  111. data/release/armhf-linux/vmlinuz +0 -0
  112. data/release/x86-linux/Vagrantfile +0 -85
  113. data/release/x86_64-freebsd-10/Vagrantfile +0 -88
  114. data/release/x86_64-linux/Vagrantfile +0 -85
  115. data/vendor/depot_tools/README.codereview +0 -99
  116. data/vendor/depot_tools/README.gclient +0 -82
  117. data/vendor/depot_tools/README.git-cl +0 -52
  118. data/vendor/depot_tools/chrome-update-create-task.bat +0 -52
  119. data/vendor/depot_tools/chrome-update.bat +0 -5
  120. data/vendor/depot_tools/chrome-update.py +0 -91
  121. data/vendor/depot_tools/create-chromium-git-src +0 -200
  122. data/vendor/depot_tools/drover +0 -25
  123. data/vendor/depot_tools/drover.bat +0 -9
  124. data/vendor/depot_tools/drover.py +0 -648
  125. data/vendor/depot_tools/gcl +0 -8
  126. data/vendor/depot_tools/gcl.bat +0 -6
  127. data/vendor/depot_tools/gcl.py +0 -1523
  128. data/vendor/depot_tools/git-try +0 -9
  129. data/vendor/depot_tools/git_try.py +0 -76
  130. data/vendor/depot_tools/luci_hacks/README.md +0 -35
  131. data/vendor/depot_tools/luci_hacks/__init__.py +0 -0
  132. data/vendor/depot_tools/luci_hacks/luci_recipe_run.isolate +0 -12
  133. data/vendor/depot_tools/luci_hacks/luci_recipe_run.py +0 -81
  134. data/vendor/depot_tools/luci_hacks/trigger_luci_job.py +0 -128
  135. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/svn_mode.json +0 -59
  136. data/vendor/depot_tools/trychange.py +0 -1265
@@ -0,0 +1,44 @@
1
+ [
2
+ {
3
+ "cmd": [
4
+ "python",
5
+ "-u",
6
+ "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
7
+ "--master",
8
+ "experimental",
9
+ "--builder",
10
+ "Experimental Builder",
11
+ "--slave",
12
+ "somehost",
13
+ "--spec",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
+ "--root",
16
+ "src",
17
+ "--revision_mapping_file",
18
+ "{\"src\": \"got_cr_revision\"}",
19
+ "--git-cache-dir",
20
+ "[GIT_CACHE]",
21
+ "--output_json",
22
+ "/path/to/tmp/json",
23
+ "--revision",
24
+ "src@HEAD",
25
+ "--gerrit_no_rebase_patch_ref"
26
+ ],
27
+ "env": {
28
+ "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
29
+ },
30
+ "name": "bot_update",
31
+ "~followup_annotations": [
32
+ "@@@STEP_LOG_LINE@json.output@{@@@",
33
+ "@@@STEP_LOG_LINE@json.output@ \"did_run\": false, @@@",
34
+ "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false@@@",
35
+ "@@@STEP_LOG_LINE@json.output@}@@@",
36
+ "@@@STEP_LOG_END@json.output@@@"
37
+ ]
38
+ },
39
+ {
40
+ "name": "$result",
41
+ "recipe_result": null,
42
+ "status_code": 0
43
+ }
44
+ ]
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "somehost",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "somehost",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "somehost",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "somehost",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "totallyaslave-c4",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "totallyaslave-c4",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "totallyaslave-c4",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "totallyaslave-c4",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "totallyaslave-c4",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "totallyaslave-c4",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src",
17
17
  "--revision_mapping_file",
@@ -65,7 +65,7 @@
65
65
  "-u",
66
66
  "import sys;print \"Patch download failed. See bot_update step for details\";sys.exit(1)"
67
67
  ],
68
- "name": "Patch failure",
68
+ "name": "Patch failure - Try Rebasing",
69
69
  "~followup_annotations": [
70
70
  "step returned non-zero exit code: 1",
71
71
  "@@@STEP_LOG_LINE@python.inline@import sys;print \"Patch download failed. See bot_update step for details\";sys.exit(1)@@@",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  {
77
77
  "name": "$result",
78
- "reason": "Infra Failure: Step('Patch failure') returned 1",
78
+ "reason": "Infra Failure: Step('Patch failure - Try Rebasing') returned 1",
79
79
  "recipe_result": null,
80
80
  "status_code": 1
81
81
  }
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "TestSlavename",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src/third_party/angle",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "totallyaslave-c4",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src/v8",
17
17
  "--revision_mapping_file",
@@ -11,7 +11,7 @@
11
11
  "--slave",
12
12
  "TestSlavename",
13
13
  "--spec",
14
- "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'svn://svn.chromium.org/chrome/trunk/src'}]",
14
+ "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
15
15
  "--root",
16
16
  "src/v8",
17
17
  "--revision_mapping_file",
@@ -12,10 +12,10 @@ DEPS = [
12
12
  def RunSteps(api):
13
13
  api.gclient.use_mirror = True
14
14
 
15
- src_cfg = api.gclient.make_config(GIT_MODE=True, CACHE_DIR='[GIT_CACHE]')
15
+ src_cfg = api.gclient.make_config(CACHE_DIR='[GIT_CACHE]')
16
16
  soln = src_cfg.solutions.add()
17
17
  soln.name = 'src'
18
- soln.url = 'svn://svn.chromium.org/chrome/trunk/src'
18
+ soln.url = 'https://chromium.googlesource.com/chromium/src.git'
19
19
  soln.revision = api.properties.get('revision')
20
20
  api.gclient.c = src_cfg
21
21
  api.gclient.c.revisions.update(api.properties.get('revisions', {}))
@@ -34,16 +34,27 @@ def RunSteps(api):
34
34
  root_solution_revision = api.properties.get('root_solution_revision')
35
35
  suffix = api.properties.get('suffix')
36
36
  gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False
37
- api.bot_update.ensure_checkout(force=force,
38
- no_shallow=no_shallow,
39
- patch=patch,
40
- with_branch_heads=with_branch_heads,
41
- output_manifest=output_manifest,
42
- refs=refs, patch_oauth2=oauth2,
43
- clobber=clobber,
44
- root_solution_revision=root_solution_revision,
45
- suffix=suffix,
46
- gerrit_no_reset=gerrit_no_reset)
37
+ gerrit_no_rebase_patch_ref = bool(
38
+ api.properties.get('gerrit_no_rebase_patch_ref'))
39
+
40
+ if api.properties.get('test_apply_gerrit_ref'):
41
+ api.bot_update.apply_gerrit_ref(
42
+ root='/tmp/test/root',
43
+ gerrit_no_reset=gerrit_no_reset,
44
+ gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref)
45
+ else:
46
+ api.bot_update.ensure_checkout(
47
+ force=force,
48
+ no_shallow=no_shallow,
49
+ patch=patch,
50
+ with_branch_heads=with_branch_heads,
51
+ output_manifest=output_manifest,
52
+ refs=refs, patch_oauth2=oauth2,
53
+ clobber=clobber,
54
+ root_solution_revision=root_solution_revision,
55
+ suffix=suffix,
56
+ gerrit_no_reset=gerrit_no_reset,
57
+ gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref)
47
58
 
48
59
 
49
60
  def GenTests(api):
@@ -130,12 +141,6 @@ def GenTests(api):
130
141
  buildername='Experimental Builder',
131
142
  slavename='somehost',
132
143
  )
133
- yield api.test('svn_mode') + api.properties(
134
- mastername='experimental.svn',
135
- buildername='Experimental SVN Builder',
136
- slavename='somehost',
137
- force=1
138
- )
139
144
  yield api.test('clobber') + api.properties(
140
145
  mastername='experimental',
141
146
  buildername='Experimental Builder',
@@ -154,6 +159,18 @@ def GenTests(api):
154
159
  slavename='somehost',
155
160
  gerrit_no_reset=1
156
161
  )
162
+ yield api.test('gerrit_no_rebase_patch_ref') + api.properties(
163
+ mastername='experimental',
164
+ buildername='Experimental Builder',
165
+ slavename='somehost',
166
+ gerrit_no_rebase_patch_ref=True
167
+ )
168
+ yield api.test('apply_gerrit_ref') + api.properties(
169
+ repository='chromium',
170
+ gerrit_no_rebase_patch_ref=True,
171
+ gerrit_no_reset=1,
172
+ test_apply_gerrit_ref=True,
173
+ )
157
174
  yield api.test('tryjob_v8') + api.properties(
158
175
  mastername='tryserver.chromium.linux',
159
176
  buildername='linux_rel',
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env python
2
+ # Copyright 2016 The Chromium Authors. All rights reserved.
3
+ # Use of this source code is governed by a BSD-style license that can be
4
+ # found in the LICENSE file.
5
+
6
+ import optparse
7
+ import sys
8
+
9
+ import bot_update # pylint: disable=relative-import
10
+
11
+
12
+ if __name__ == '__main__':
13
+ parse = optparse.OptionParser()
14
+
15
+ parse.add_option('--gerrit_repo',
16
+ help='Gerrit repository to pull the ref from.')
17
+ parse.add_option('--gerrit_ref', help='Gerrit ref to apply.')
18
+ parse.add_option('--root', help='The location of the checkout.')
19
+ parse.add_option('--gerrit_no_reset', action='store_true',
20
+ help='Bypass calling reset after applying a gerrit ref.')
21
+ parse.add_option('--gerrit_no_rebase_patch_ref', action='store_true',
22
+ help='Bypass rebase of Gerrit patch ref after checkout.')
23
+
24
+ options, _ = parse.parse_args()
25
+
26
+ sys.exit(
27
+ bot_update.apply_gerrit_ref(
28
+ options.gerrit_repo,
29
+ options.gerrit_ref,
30
+ options.root,
31
+ not options.gerrit_no_reset,
32
+ not options.gerrit_no_rebase_patch_ref)
33
+ )
@@ -351,11 +351,6 @@ GIT_MASTERS += internal_data.get('GIT_MASTERS', [])
351
351
  # How many times to try before giving up.
352
352
  ATTEMPTS = 5
353
353
 
354
- # Find deps2git
355
- DEPS2GIT_DIR_PATH = path.join(SCRIPTS_DIR, 'tools', 'deps2git')
356
- DEPS2GIT_PATH = path.join(DEPS2GIT_DIR_PATH, 'deps2git.py')
357
- S2G_INTERNAL_PATH = path.join(SCRIPTS_DIR, 'tools', 'deps2git_internal',
358
- 'svn_to_git_internal.py')
359
354
  GIT_CACHE_PATH = path.join(DEPOT_TOOLS_DIR, 'git_cache.py')
360
355
 
361
356
  # Find the patch tool.
@@ -811,59 +806,6 @@ def get_git_hash(revision, branch, sln_dir):
811
806
  (revision, sln_dir))
812
807
 
813
808
 
814
- def _last_commit_for_file(filename, repo_base):
815
- cmd = ['log', '--format=%H', '--max-count=1', '--', filename]
816
- return git(*cmd, cwd=repo_base).strip()
817
-
818
-
819
- def need_to_run_deps2git(repo_base, deps_file, deps_git_file):
820
- """Checks to see if we need to run deps2git.
821
-
822
- Returns True if there was a DEPS change after the last .DEPS.git update
823
- or if DEPS has local modifications.
824
- """
825
- # See if DEPS is dirty
826
- deps_file_status = git(
827
- 'status', '--porcelain', deps_file, cwd=repo_base).strip()
828
- if deps_file_status and deps_file_status.startswith('M '):
829
- return True
830
-
831
- last_known_deps_ref = _last_commit_for_file(deps_file, repo_base)
832
- last_known_deps_git_ref = _last_commit_for_file(deps_git_file, repo_base)
833
- merge_base_ref = git('merge-base', last_known_deps_ref,
834
- last_known_deps_git_ref, cwd=repo_base).strip()
835
-
836
- # If the merge base of the last DEPS and last .DEPS.git file is not
837
- # equivilent to the hash of the last DEPS file, that means the DEPS file
838
- # was committed after the last .DEPS.git file.
839
- return last_known_deps_ref != merge_base_ref
840
-
841
-
842
- def ensure_deps2git(solution, shallow, git_cache_dir):
843
- repo_base = path.join(os.getcwd(), solution['name'])
844
- deps_file = path.join(repo_base, 'DEPS')
845
- deps_git_file = path.join(repo_base, '.DEPS.git')
846
- if (not git('ls-files', 'DEPS', cwd=repo_base).strip() or
847
- not git('ls-files', '.DEPS.git', cwd=repo_base).strip()):
848
- return
849
-
850
- print 'Checking if %s is newer than %s' % (deps_file, deps_git_file)
851
- if not need_to_run_deps2git(repo_base, deps_file, deps_git_file):
852
- return
853
-
854
- print '===DEPS file modified, need to run deps2git==='
855
- cmd = [sys.executable, DEPS2GIT_PATH,
856
- '--workspace', os.getcwd(),
857
- '--cache_dir', git_cache_dir,
858
- '--deps', deps_file,
859
- '--out', deps_git_file]
860
- if 'chrome-internal.googlesource' in solution['url']:
861
- cmd.extend(['--extra-rules', S2G_INTERNAL_PATH])
862
- if shallow:
863
- cmd.append('--shallow')
864
- call(*cmd)
865
-
866
-
867
809
  def emit_log_lines(name, lines):
868
810
  for line in lines.splitlines():
869
811
  print '@@@STEP_LOG_LINE@%s@%s@@@' % (name, line)
@@ -1108,10 +1050,6 @@ def apply_rietveld_issue(issue, patchset, root, server, _rev_map, _revision,
1108
1050
  '--force',
1109
1051
  # Don't run gclient sync when it sees a DEPS change.
1110
1052
  '--ignore_deps',
1111
- # TODO(tandrii): remove after http://crbug.com/537417 is resolved.
1112
- # Temporary enable verbosity to see if Rietveld requests are actually
1113
- # retried.
1114
- '-v', '-v', # = logging.DEBUG level.
1115
1053
  ]
1116
1054
  # Use an oauth key file if specified.
1117
1055
  if email_file and key_file:
@@ -1138,15 +1076,39 @@ def apply_rietveld_issue(issue, patchset, root, server, _rev_map, _revision,
1138
1076
  except SubprocessFailed as e:
1139
1077
  raise PatchFailed(e.message, e.code, e.output)
1140
1078
 
1141
- def apply_gerrit_ref(gerrit_repo, gerrit_ref, root, gerrit_reset):
1079
+ def apply_gerrit_ref(gerrit_repo, gerrit_ref, root, gerrit_reset,
1080
+ gerrit_rebase_patch_ref):
1142
1081
  gerrit_repo = gerrit_repo or 'origin'
1143
1082
  assert gerrit_ref
1083
+ base_rev = git('rev-parse', 'HEAD', cwd=root).strip()
1084
+
1144
1085
  print '===Applying gerrit ref==='
1145
- print 'Repo is %r, ref is %r, root is %r' % (gerrit_repo, gerrit_ref, root)
1086
+ print 'Repo is %r @ %r, ref is %r, root is %r' % (
1087
+ gerrit_repo, base_rev, gerrit_ref, root)
1146
1088
  try:
1147
- base_rev = git('rev-parse', 'HEAD', cwd=root).strip()
1148
1089
  git('retry', 'fetch', gerrit_repo, gerrit_ref, cwd=root, tries=1)
1149
1090
  git('checkout', 'FETCH_HEAD', cwd=root)
1091
+
1092
+ if gerrit_rebase_patch_ref:
1093
+ print '===Rebasing==='
1094
+ # git rebase requires a branch to operate on.
1095
+ temp_branch_name = 'tmp/' + uuid.uuid4().hex
1096
+ try:
1097
+ ok = False
1098
+ git('checkout', '-b', temp_branch_name, cwd=root)
1099
+ git('rebase', base_rev, cwd=root)
1100
+
1101
+ # Get off of the temporary branch since it can't be deleted otherwise.
1102
+ cur_rev = git('rev-parse', 'HEAD', cwd=root).strip()
1103
+ git('checkout', cur_rev, cwd=root)
1104
+ git('branch', '-D', temp_branch_name, cwd=root)
1105
+ ok = True
1106
+ finally:
1107
+ if not ok:
1108
+ # Get off of the temporary branch since it can't be deleted otherwise.
1109
+ git('checkout', base_rev, cwd=root)
1110
+ git('branch', '-D', temp_branch_name, cwd=root)
1111
+
1150
1112
  if gerrit_reset:
1151
1113
  git('reset', '--soft', base_rev, cwd=root)
1152
1114
  except SubprocessFailed as e:
@@ -1304,10 +1266,10 @@ def ensure_deps_revisions(deps_url_mapping, solutions, revisions):
1304
1266
 
1305
1267
  def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only,
1306
1268
  patch_root, issue, patchset, patch_url, rietveld_server,
1307
- gerrit_repo, gerrit_ref, revision_mapping,
1308
- apply_issue_email_file, apply_issue_key_file, buildspec,
1309
- gyp_env, shallow, runhooks, refs, git_cache_dir,
1310
- gerrit_reset):
1269
+ gerrit_repo, gerrit_ref, gerrit_rebase_patch_ref,
1270
+ revision_mapping, apply_issue_email_file,
1271
+ apply_issue_key_file, buildspec, gyp_env, shallow, runhooks,
1272
+ refs, git_cache_dir, gerrit_reset):
1311
1273
  # Get a checkout of each solution, without DEPS or hooks.
1312
1274
  # Calling git directly because there is no way to run Gclient without
1313
1275
  # invoking DEPS.
@@ -1322,6 +1284,7 @@ def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only,
1322
1284
  print '===Processing patch solutions==='
1323
1285
  already_patched = []
1324
1286
  patch_root = patch_root or ''
1287
+ applied_gerrit_patch = False
1325
1288
  print 'Patch root is %r' % patch_root
1326
1289
  for solution in solutions:
1327
1290
  print 'Processing solution %r' % solution['name']
@@ -1338,11 +1301,10 @@ def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only,
1338
1301
  revision_mapping, git_ref, apply_issue_email_file,
1339
1302
  apply_issue_key_file, whitelist=[target])
1340
1303
  already_patched.append(target)
1341
-
1342
- if not buildspec:
1343
- # Run deps2git if there is a DEPS change after the last .DEPS.git commit.
1344
- for solution in solutions:
1345
- ensure_deps2git(solution, shallow, git_cache_dir)
1304
+ elif gerrit_ref:
1305
+ apply_gerrit_ref(gerrit_repo, gerrit_ref, patch_root, gerrit_reset,
1306
+ gerrit_rebase_patch_ref)
1307
+ applied_gerrit_patch = True
1346
1308
 
1347
1309
  # Ensure our build/ directory is set up with the correct .gclient file.
1348
1310
  gclient_configure(solutions, target_os, target_os_only, git_cache_dir)
@@ -1376,8 +1338,12 @@ def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only,
1376
1338
  apply_rietveld_issue(issue, patchset, patch_root, rietveld_server,
1377
1339
  revision_mapping, git_ref, apply_issue_email_file,
1378
1340
  apply_issue_key_file, blacklist=already_patched)
1379
- elif gerrit_ref:
1380
- apply_gerrit_ref(gerrit_repo, gerrit_ref, patch_root, gerrit_reset)
1341
+ elif gerrit_ref and not applied_gerrit_patch:
1342
+ # If gerrit_ref was for solution's main repository, it has already been
1343
+ # applied above. This chunk is executed only for patches to DEPS-ed in
1344
+ # git repositories.
1345
+ apply_gerrit_ref(gerrit_repo, gerrit_ref, patch_root, gerrit_reset,
1346
+ gerrit_rebase_patch_ref)
1381
1347
 
1382
1348
  # Reset the deps_file point in the solutions so that hooks get run properly.
1383
1349
  for sln in solutions:
@@ -1456,6 +1422,8 @@ def parse_args():
1456
1422
  parse.add_option('--gerrit_repo',
1457
1423
  help='Gerrit repository to pull the ref from.')
1458
1424
  parse.add_option('--gerrit_ref', help='Gerrit ref to apply.')
1425
+ parse.add_option('--gerrit_no_rebase_patch_ref', action='store_true',
1426
+ help='Bypass rebase of Gerrit patch ref after checkout.')
1459
1427
  parse.add_option('--gerrit_no_reset', action='store_true',
1460
1428
  help='Bypass calling reset after applying a gerrit ref.')
1461
1429
  parse.add_option('--specs', help='Gcilent spec.')
@@ -1617,6 +1585,7 @@ def checkout(options, git_slns, specs, buildspec, master,
1617
1585
  rietveld_server=options.rietveld_server,
1618
1586
  gerrit_repo=options.gerrit_repo,
1619
1587
  gerrit_ref=options.gerrit_ref,
1588
+ gerrit_rebase_patch_ref=not options.gerrit_no_rebase_patch_ref,
1620
1589
  revision_mapping=options.revision_mapping,
1621
1590
  apply_issue_email_file=options.apply_issue_email_file,
1622
1591
  apply_issue_key_file=options.apply_issue_key_file,