libv8 6.3.292.48.1 → 6.7.288.46.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +10 -34
  3. data/CHANGELOG.md +16 -0
  4. data/README.md +9 -63
  5. data/Rakefile +2 -2
  6. data/ext/libv8/builder.rb +22 -87
  7. data/ext/libv8/extconf.rb +1 -1
  8. data/ext/libv8/paths.rb +5 -18
  9. data/lib/libv8/version.rb +1 -1
  10. data/spec/location_spec.rb +1 -2
  11. data/spec/spec_helper.rb +0 -1
  12. data/vendor/depot_tools/.gitattributes +1 -2
  13. data/vendor/depot_tools/OWNERS +0 -1
  14. data/vendor/depot_tools/PRESUBMIT.py +11 -6
  15. data/vendor/depot_tools/README.md +0 -1
  16. data/vendor/depot_tools/WATCHLISTS +0 -6
  17. data/vendor/depot_tools/auth.py +129 -87
  18. data/vendor/depot_tools/autoninja +11 -1
  19. data/vendor/depot_tools/autoninja.bat +7 -1
  20. data/vendor/depot_tools/autoninja.py +14 -6
  21. data/vendor/depot_tools/bootstrap/win/manifest.txt +1 -1
  22. data/vendor/depot_tools/bootstrap/win/manifest_bleeding_edge.txt +1 -1
  23. data/vendor/depot_tools/cipd +23 -2
  24. data/vendor/depot_tools/cipd.bat +2 -2
  25. data/vendor/depot_tools/cipd_client_version +1 -1
  26. data/vendor/depot_tools/cipd_manifest.txt +17 -7
  27. data/vendor/depot_tools/cit.py +7 -6
  28. data/vendor/depot_tools/cpplint.py +195 -35
  29. data/vendor/depot_tools/detect_host_arch.py +51 -0
  30. data/vendor/depot_tools/download_from_google_storage.py +85 -26
  31. data/vendor/depot_tools/fetch.py +11 -6
  32. data/vendor/depot_tools/fetch_configs/chromium.py +0 -1
  33. data/vendor/depot_tools/fetch_configs/goma_client.py +41 -0
  34. data/vendor/depot_tools/fetch_configs/infra.py +0 -1
  35. data/vendor/depot_tools/fetch_configs/infra_internal.py +0 -1
  36. data/vendor/depot_tools/gclient-new-workdir.py +4 -0
  37. data/vendor/depot_tools/gclient.py +732 -476
  38. data/vendor/depot_tools/gclient_eval.py +569 -58
  39. data/vendor/depot_tools/gclient_scm.py +258 -46
  40. data/vendor/depot_tools/gclient_utils.py +17 -1
  41. data/vendor/depot_tools/gerrit_util.py +46 -13
  42. data/vendor/depot_tools/git_cache.py +0 -2
  43. data/vendor/depot_tools/git_cl.py +176 -335
  44. data/vendor/depot_tools/git_common.py +19 -16
  45. data/vendor/depot_tools/git_footers.py +19 -5
  46. data/vendor/depot_tools/git_hyper_blame.py +9 -3
  47. data/vendor/depot_tools/git_new_branch.py +15 -3
  48. data/vendor/depot_tools/git_upstream_diff.py +7 -2
  49. data/vendor/depot_tools/gsutil.py +1 -1
  50. data/vendor/depot_tools/infra/config/cq.cfg +1 -2
  51. data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
  52. data/vendor/depot_tools/luci-auth +13 -0
  53. data/vendor/depot_tools/luci-auth.bat +8 -0
  54. data/vendor/depot_tools/man/html/depot_tools.html +0 -8
  55. data/vendor/depot_tools/man/html/git-upstream-diff.html +20 -3
  56. data/vendor/depot_tools/man/man1/git-upstream-diff.1 +27 -6
  57. data/vendor/depot_tools/man/man7/depot_tools.7 +0 -5
  58. data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +2 -2
  59. data/vendor/depot_tools/man/src/git-upstream-diff.txt +21 -3
  60. data/vendor/depot_tools/man/src/make_docs.sh +6 -0
  61. data/vendor/depot_tools/my_activity.py +283 -93
  62. data/vendor/depot_tools/owners.py +9 -4
  63. data/vendor/depot_tools/owners_finder.py +7 -3
  64. data/vendor/depot_tools/post_build_ninja_summary.py +322 -0
  65. data/vendor/depot_tools/presubmit_canned_checks.py +91 -106
  66. data/vendor/depot_tools/presubmit_support.py +219 -157
  67. data/vendor/depot_tools/prpc +13 -0
  68. data/vendor/depot_tools/prpc.bat +8 -0
  69. data/vendor/depot_tools/recipes/OWNERS +3 -1
  70. data/vendor/depot_tools/recipes/README.recipes.md +70 -111
  71. data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +12 -5
  72. data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +36 -68
  73. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +0 -8
  74. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{trychange_oauth2_json.json → no_apply_patch_on_gclient.json} +64 -10
  75. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{no_shallow.json → shallow.json} +1 -1
  76. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob.json +0 -8
  77. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_empty_revision.json +0 -8
  78. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +0 -6
  79. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +0 -7
  80. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +0 -6
  81. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle_deprecated.json +44 -0
  82. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{trychange_oauth2_buildbot.json → tryjob_gerrit_branch_heads.json} +51 -5
  83. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +0 -8
  84. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +48 -8
  85. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.py +19 -26
  86. data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/bot_update.py +193 -155
  87. data/vendor/depot_tools/recipes/recipe_modules/bot_update/test_api.py +9 -0
  88. data/vendor/depot_tools/recipes/recipe_modules/gclient/api.py +2 -7
  89. data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +31 -5
  90. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/basic.json +37 -19
  91. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/buildbot.json +37 -19
  92. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/revision.json +37 -19
  93. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/tryserver.json +37 -23
  94. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.py +4 -0
  95. data/vendor/depot_tools/recipes/recipe_modules/gerrit/api.py +40 -8
  96. data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +3 -3
  97. data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.py +6 -3
  98. data/vendor/depot_tools/recipes/recipe_modules/gitiles/OWNERS +0 -1
  99. data/vendor/depot_tools/recipes/recipe_modules/tryserver/__init__.py +0 -1
  100. data/vendor/depot_tools/recipes/recipe_modules/tryserver/api.py +7 -56
  101. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +0 -1
  102. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.py +15 -16
  103. data/vendor/depot_tools/recipes/recipes.py +4 -2
  104. data/vendor/depot_tools/recipes/trigger_recipe_roller.txt +12 -0
  105. data/vendor/depot_tools/roll_dep.py +35 -37
  106. data/vendor/depot_tools/support/chromite_wrapper +1 -1
  107. data/vendor/depot_tools/third_party/logilab/astroid/README.chromium +3 -3
  108. data/vendor/depot_tools/third_party/logilab/astroid/__pkginfo__.py +2 -2
  109. data/vendor/depot_tools/third_party/logilab/astroid/astpeephole.py +86 -0
  110. data/vendor/depot_tools/third_party/logilab/astroid/bases.py +53 -66
  111. data/vendor/depot_tools/third_party/logilab/astroid/brain/py2pytest.py +31 -31
  112. data/vendor/depot_tools/third_party/logilab/astroid/brain/pynose.py +39 -16
  113. data/vendor/depot_tools/third_party/logilab/astroid/brain/pysix_moves.py +225 -189
  114. data/vendor/depot_tools/third_party/logilab/astroid/inference.py +45 -41
  115. data/vendor/depot_tools/third_party/logilab/astroid/manager.py +1 -0
  116. data/vendor/depot_tools/third_party/logilab/astroid/modutils.py +2 -2
  117. data/vendor/depot_tools/third_party/logilab/astroid/node_classes.py +3 -2
  118. data/vendor/depot_tools/third_party/logilab/astroid/nodes.py +1 -0
  119. data/vendor/depot_tools/third_party/logilab/astroid/protocols.py +57 -3
  120. data/vendor/depot_tools/third_party/logilab/astroid/raw_building.py +1 -1
  121. data/vendor/depot_tools/third_party/logilab/astroid/rebuilder.py +21 -1
  122. data/vendor/depot_tools/third_party/logilab/astroid/scoped_nodes.py +58 -33
  123. data/vendor/depot_tools/third_party/pylint/README.chromium +2 -2
  124. data/vendor/depot_tools/third_party/pylint/__pkginfo__.py +3 -3
  125. data/vendor/depot_tools/third_party/pylint/checkers/base.py +6 -18
  126. data/vendor/depot_tools/third_party/pylint/checkers/classes.py +64 -63
  127. data/vendor/depot_tools/third_party/pylint/checkers/design_analysis.py +25 -57
  128. data/vendor/depot_tools/third_party/pylint/checkers/format.py +14 -10
  129. data/vendor/depot_tools/third_party/pylint/checkers/python3.py +142 -37
  130. data/vendor/depot_tools/third_party/pylint/checkers/spelling.py +10 -1
  131. data/vendor/depot_tools/third_party/pylint/checkers/stdlib.py +50 -7
  132. data/vendor/depot_tools/third_party/pylint/checkers/strings.py +1 -1
  133. data/vendor/depot_tools/third_party/pylint/epylint.py +2 -1
  134. data/vendor/depot_tools/third_party/pylint/gui.py +1 -1
  135. data/vendor/depot_tools/third_party/pylint/lint.py +88 -23
  136. data/vendor/depot_tools/third_party/pylint/reporters/html.py +37 -5
  137. data/vendor/depot_tools/third_party/pylint/testutils.py +1 -1
  138. data/vendor/depot_tools/third_party/pylint/utils.py +5 -0
  139. data/vendor/depot_tools/vpython +31 -1
  140. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +35 -2
  141. data/vendor/depot_tools/win_toolchain/package_from_installed.py +0 -15
  142. data/vendor/depot_tools/yapf +17 -0
  143. data/vendor/depot_tools/{apply_issue.bat → yapf.bat} +2 -2
  144. metadata +16 -58
  145. data/ext/libv8/compiler.rb +0 -39
  146. data/ext/libv8/compiler/apple_llvm.rb +0 -22
  147. data/ext/libv8/compiler/clang.rb +0 -22
  148. data/ext/libv8/compiler/gcc.rb +0 -22
  149. data/ext/libv8/compiler/generic_compiler.rb +0 -66
  150. data/ext/libv8/make.rb +0 -13
  151. data/ext/libv8/patcher.rb +0 -21
  152. data/patches/0001-Build-a-standalone-static-library.patch +0 -26
  153. data/patches/0002-Don-t-compile-unnecessary-stuff.patch +0 -85
  154. data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +0 -25
  155. data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +0 -25
  156. data/patches/0005-Remove-TryInstallOptimizedCode.patch +0 -321
  157. data/patches/mingw-generate-makefiles.sh +0 -97
  158. data/spec/compiler/apple_llvm_spec.rb +0 -37
  159. data/spec/compiler/clang_spec.rb +0 -37
  160. data/spec/compiler/gcc_spec.rb +0 -37
  161. data/spec/compiler/generic_compiler_spec.rb +0 -50
  162. data/spec/compiler_spec.rb +0 -45
  163. data/spec/support/compiler_helpers.rb +0 -47
  164. data/vendor/depot_tools/apply_issue +0 -8
  165. data/vendor/depot_tools/apply_issue.py +0 -315
  166. data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +0 -815
  167. data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +0 -80
  168. data/vendor/depot_tools/man/src/_git-cherry-pick-upload_desc.helper.txt +0 -1
  169. data/vendor/depot_tools/man/src/git-cherry-pick-upload.demo.1.sh +0 -17
  170. data/vendor/depot_tools/man/src/git-cherry-pick-upload.txt +0 -35
  171. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2.json +0 -8
  172. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json_win.json +0 -196
  173. data/vendor/depot_tools/recipes/recipe_modules/rietveld/__init__.py +0 -6
  174. data/vendor/depot_tools/recipes/recipe_modules/rietveld/api.py +0 -97
  175. data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/basic.json +0 -8
  176. data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/buildbot.json +0 -30
  177. data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/no_auth.json +0 -27
  178. data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.py +0 -38
  179. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_rietveld_patch.json +0 -69
  180. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_rietveld_patch_new.json +0 -69
  181. data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -2
  182. data/vendor/depot_tools/third_party/cq_client/README.depot_tools.md +0 -2
  183. data/vendor/depot_tools/third_party/cq_client/README.md +0 -59
  184. data/vendor/depot_tools/third_party/cq_client/__init__.py +0 -3
  185. data/vendor/depot_tools/third_party/cq_client/v1/__init__.py +0 -3
  186. data/vendor/depot_tools/third_party/cq_client/v1/cq.pb.go +0 -810
  187. data/vendor/depot_tools/third_party/cq_client/v1/cq.proto +0 -281
  188. data/vendor/depot_tools/third_party/cq_client/v1/cq_pb2.py +0 -794
  189. data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_both.cfg +0 -71
  190. data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_gerrit.cfg +0 -58
  191. data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_rietveld.cfg +0 -60
  192. data/vendor/depot_tools/third_party/cq_client/v2/__init__.py +0 -3
  193. data/vendor/depot_tools/third_party/cq_client/v2/cq.pb.go +0 -792
  194. data/vendor/depot_tools/third_party/cq_client/v2/cq.proto +0 -270
  195. data/vendor/depot_tools/third_party/cq_client/v2/cq_pb2.py +0 -841
@@ -435,25 +435,25 @@ def freeze():
435
435
  if limit_mb > 0:
436
436
  if s.lstat == '?':
437
437
  untracked_bytes += os.stat(os.path.join(root_path, f)).st_size
438
- if untracked_bytes > limit_mb * MB:
439
- die("""\
440
- You appear to have too much untracked+unignored data in your git
441
- checkout: %.1f / %d MB.
438
+ if limit_mb > 0 and untracked_bytes > limit_mb * MB:
439
+ die("""\
440
+ You appear to have too much untracked+unignored data in your git
441
+ checkout: %.1f / %d MB.
442
442
 
443
- Run `git status` to see what it is.
443
+ Run `git status` to see what it is.
444
444
 
445
- In addition to making many git commands slower, this will prevent
446
- depot_tools from freezing your in-progress changes.
445
+ In addition to making many git commands slower, this will prevent
446
+ depot_tools from freezing your in-progress changes.
447
447
 
448
- You should add untracked data that you want to ignore to your repo's
449
- .git/info/exclude
450
- file. See `git help ignore` for the format of this file.
448
+ You should add untracked data that you want to ignore to your repo's
449
+ .git/info/exclude
450
+ file. See `git help ignore` for the format of this file.
451
451
 
452
- If this data is indended as part of your commit, you may adjust the
453
- freeze limit by running:
454
- git config %s <new_limit>
455
- Where <new_limit> is an integer threshold in megabytes.""",
456
- untracked_bytes / (MB * 1.0), limit_mb, key)
452
+ If this data is indended as part of your commit, you may adjust the
453
+ freeze limit by running:
454
+ git config %s <new_limit>
455
+ Where <new_limit> is an integer threshold in megabytes.""",
456
+ untracked_bytes / (MB * 1.0), limit_mb, key)
457
457
 
458
458
  try:
459
459
  run('commit', '--no-verify', '-m', FREEZE + '.indexed')
@@ -1047,4 +1047,7 @@ def clone_file(repository, new_workdir, link, operation):
1047
1047
  link_dir = os.path.dirname(os.path.join(new_workdir, link))
1048
1048
  if not os.path.exists(link_dir):
1049
1049
  os.makedirs(link_dir)
1050
- operation(os.path.join(repository, link), os.path.join(new_workdir, link))
1050
+ src = os.path.join(repository, link)
1051
+ if os.path.islink(src):
1052
+ src = os.path.realpath(src)
1053
+ operation(src, os.path.join(new_workdir, link))
@@ -15,6 +15,7 @@ import git_common as git
15
15
 
16
16
  FOOTER_PATTERN = re.compile(r'^\s*([\w-]+): *(.*)$')
17
17
  CHROME_COMMIT_POSITION_PATTERN = re.compile(r'^([\w/\-\.]+)@{#(\d+)}$')
18
+ FOOTER_KEY_BLACKLIST = set(['http', 'https'])
18
19
 
19
20
 
20
21
  def normalize_name(header):
@@ -24,10 +25,9 @@ def normalize_name(header):
24
25
  def parse_footer(line):
25
26
  """Returns footer's (key, value) if footer is valid, else None."""
26
27
  match = FOOTER_PATTERN.match(line)
27
- if match:
28
+ if match and match.group(1) not in FOOTER_KEY_BLACKLIST:
28
29
  return (match.group(1), match.group(2))
29
- else:
30
- return None
30
+ return None
31
31
 
32
32
 
33
33
  def parse_footers(message):
@@ -57,17 +57,27 @@ def split_footers(message):
57
57
  """Returns (non_footer_lines, footer_lines, parsed footers).
58
58
 
59
59
  Guarantees that:
60
- (non_footer_lines + footer_lines) == message.splitlines().
60
+ (non_footer_lines + footer_lines) ~= message.splitlines(), with at
61
+ most one new newline, if the last paragraph is text followed by footers.
61
62
  parsed_footers is parse_footer applied on each line of footer_lines.
62
63
  There could be fewer parsed_footers than footer lines if some lines in
63
64
  last paragraph are malformed.
64
65
  """
65
66
  message_lines = list(message.splitlines())
66
67
  footer_lines = []
68
+ maybe_footer_lines = []
67
69
  for line in reversed(message_lines):
68
70
  if line == '' or line.isspace():
69
71
  break
70
- footer_lines.append(line)
72
+ elif parse_footer(line):
73
+ footer_lines.extend(maybe_footer_lines)
74
+ maybe_footer_lines = []
75
+ footer_lines.append(line)
76
+ else:
77
+ # We only want to include malformed lines if they are preceeded by
78
+ # well-formed lines. So keep them in holding until we see a well-formed
79
+ # line (case above).
80
+ maybe_footer_lines.append(line)
71
81
  else:
72
82
  # The whole description was consisting of footers,
73
83
  # which means those aren't footers.
@@ -77,6 +87,10 @@ def split_footers(message):
77
87
  footers = filter(None, map(parse_footer, footer_lines))
78
88
  if not footers:
79
89
  return message_lines, [], []
90
+ if maybe_footer_lines:
91
+ # If some malformed lines were left over, add a newline to split them
92
+ # from the well-formed ones.
93
+ return message_lines[:-len(footer_lines)] + [''], footer_lines, footers
80
94
  return message_lines[:-len(footer_lines)], footer_lines, footers
81
95
 
82
96
 
@@ -94,6 +94,11 @@ def parse_blame(blameoutput):
94
94
  yield BlameLine(commit, context, lineno_then, lineno_now, False)
95
95
 
96
96
 
97
+ def num_codepoints(s):
98
+ """Gets the length of a UTF-8 byte string, in Unicode codepoints."""
99
+ return len(s.decode('utf-8', errors='replace'))
100
+
101
+
97
102
  def print_table(table, colsep=' ', rowsep='\n', align=None, out=sys.stdout):
98
103
  """Print a 2D rectangular array, aligning columns with spaces.
99
104
 
@@ -107,9 +112,10 @@ def print_table(table, colsep=' ', rowsep='\n', align=None, out=sys.stdout):
107
112
  colwidths = None
108
113
  for row in table:
109
114
  if colwidths is None:
110
- colwidths = [len(x) for x in row]
115
+ colwidths = [num_codepoints(x) for x in row]
111
116
  else:
112
- colwidths = [max(colwidths[i], len(x)) for i, x in enumerate(row)]
117
+ colwidths = [max(colwidths[i], num_codepoints(x))
118
+ for i, x in enumerate(row)]
113
119
 
114
120
  if align is None: # pragma: no cover
115
121
  align = 'l' * len(colwidths)
@@ -117,7 +123,7 @@ def print_table(table, colsep=' ', rowsep='\n', align=None, out=sys.stdout):
117
123
  for row in table:
118
124
  cells = []
119
125
  for i, cell in enumerate(row):
120
- padding = ' ' * (colwidths[i] - len(cell))
126
+ padding = ' ' * (colwidths[i] - num_codepoints(cell))
121
127
  if align[i] == 'r':
122
128
  cell = padding + cell
123
129
  elif i < len(row) - 1:
@@ -2,7 +2,6 @@
2
2
  # Copyright 2014 The Chromium Authors. All rights reserved.
3
3
  # Use of this source code is governed by a BSD-style license that can be
4
4
  # found in the LICENSE file.
5
-
6
5
  """
7
6
  Create new branch tracking origin/master by default.
8
7
  """
@@ -13,7 +12,7 @@ import sys
13
12
  import subprocess2
14
13
 
15
14
  from git_common import run, root, set_config, get_or_create_merge_base, tags
16
- from git_common import hash_one
15
+ from git_common import hash_one, upstream, set_branch_config, current_branch
17
16
 
18
17
 
19
18
  def main(args):
@@ -28,13 +27,26 @@ def main(args):
28
27
  help='set upstream branch to current branch.')
29
28
  g.add_argument('--upstream', metavar='REF', default=root(),
30
29
  help='upstream branch (or tag) to track.')
30
+ g.add_argument('--inject-current', '--inject_current',
31
+ action='store_true',
32
+ help='new branch adopts current branch\'s upstream,' +
33
+ ' and new branch becomes current branch\'s upstream.')
31
34
  g.add_argument('--lkgr', action='store_const', const='lkgr', dest='upstream',
32
35
  help='set basis ref for new branch to lkgr.')
33
36
 
34
37
  opts = parser.parse_args(args)
35
38
 
36
39
  try:
37
- if opts.upstream_current:
40
+ if opts.inject_current:
41
+ below = current_branch()
42
+ if below is None:
43
+ raise Exception('no current branch')
44
+ above = upstream(below)
45
+ if above is None:
46
+ raise Exception('branch %s has no upstream' % (below))
47
+ run('checkout', '--track', above, '-b', opts.branch_name)
48
+ run('branch', '--set-upstream-to', opts.branch_name, below)
49
+ elif opts.upstream_current:
38
50
  run('checkout', '--track', '-b', opts.branch_name)
39
51
  else:
40
52
  if opts.upstream in tags():
@@ -21,10 +21,15 @@ def main(args):
21
21
  help=(
22
22
  'Print a colorized wordwise diff '
23
23
  'instead of line-wise diff'))
24
- parser.add_argument('branch', nargs='?', default=current_branch,
25
- help='Show changes from a different branch')
24
+ parser.add_argument('--branch', default=current_branch,
25
+ help='Show changes from a different branch. Passing '
26
+ '"HEAD" is the same as omitting this option (it '
27
+ 'diffs against the current branch)')
26
28
  opts, extra_args = parser.parse_known_args(args)
27
29
 
30
+ if opts.branch == 'HEAD':
31
+ opts.branch = current_branch
32
+
28
33
  if not opts.branch or opts.branch == 'HEAD':
29
34
  print 'fatal: Cannot perform git-upstream-diff while not on a branch'
30
35
  return 1
@@ -156,7 +156,7 @@ def parse_args():
156
156
  bin_dir = os.environ.get('DEPOT_TOOLS_GSUTIL_BIN_DIR', DEFAULT_BIN_DIR)
157
157
 
158
158
  parser = argparse.ArgumentParser()
159
- parser.add_argument('--force-version', default='4.28')
159
+ parser.add_argument('--force-version', default='4.30')
160
160
  parser.add_argument('--clean', action='store_true',
161
161
  help='Clear any existing gsutil package, forcing a new download.')
162
162
  parser.add_argument('--fallback', default=DEFAULT_FALLBACK_GSUTIL)
@@ -23,9 +23,8 @@ verifiers {
23
23
  builders { name: "Skia downstream Recipe Roll tester from Depot Tools" }
24
24
  builders { name: "Skia Buildbot downstream Recipe Roll tester from Depot Tools" }
25
25
  }
26
-
27
26
  buckets {
28
- name: "master.internal.infra.try"
27
+ name: "luci.infra-internal.try"
29
28
  builders { name: "build_limited Roll Tester (depot_tools)" }
30
29
  builders { name: "release_scripts Roll Tester (depot_tools)" }
31
30
  }
@@ -15,7 +15,7 @@
15
15
  "deps": {
16
16
  "recipe_engine": {
17
17
  "branch": "master",
18
- "revision": "32e6ba22dd1c75f8b3276bb86112d10542d5e32b",
18
+ "revision": "94bb0a758456a5df6891677a8cf2876c07ea5f0c",
19
19
  "url": "https://chromium.googlesource.com/infra/luci/recipes-py.git"
20
20
  }
21
21
  },
@@ -0,0 +1,13 @@
1
+ #!/bin/bash
2
+
3
+ # Copyright 2018 The Chromium Authors. All rights reserved.
4
+ # Use of this source code is governed by a BSD-style license that can be
5
+ # found in the LICENSE file.
6
+
7
+ MYPATH=$(dirname "${BASH_SOURCE[0]}")
8
+
9
+ source "$MYPATH/cipd_bin_setup.sh"
10
+ cipd_bin_setup &> /dev/null
11
+
12
+ exec "$MYPATH/.cipd_bin/luci-auth" "$@"
13
+
@@ -0,0 +1,8 @@
1
+ @echo off
2
+ :: Copyright 2018 The Chromium Authors. All rights reserved.
3
+ :: Use of this source code is governed by a BSD-style license that can be
4
+ :: found in the LICENSE file.
5
+
6
+ call "%~dp0\cipd_bin_setup.bat" > nul 2>&1
7
+ "%~dp0\.cipd_bin\luci-auth.exe" %*
8
+
@@ -771,14 +771,6 @@ ease the development workflow.</p></div>
771
771
  <div class="paragraph"><p>A tutorial for these tools can be found at <a href="depot_tools_tutorial.html">depot_tools_tutorial(7)</a>.</p></div>
772
772
  <div class="dlist"><dl>
773
773
  <dt class="hdlist1">
774
- <a href="git-cherry-pick-upload.html">git-cherry-pick-upload(1)</a>
775
- </dt>
776
- <dd>
777
- <p>
778
- Upload the diff between a revision and its parent to rietveld.
779
- </p>
780
- </dd>
781
- <dt class="hdlist1">
782
774
  <a href="git-cl.html">git-cl(1)</a>
783
775
  </dt>
784
776
  <dd>
@@ -755,7 +755,7 @@ git-upstream-diff(1) Manual Page
755
755
  <h2 id="_synopsis">SYNOPSIS</h2>
756
756
  <div class="sectionbody">
757
757
  <div class="verseblock">
758
- <pre class="content"><em>git upstream-diff</em> [--wordwise] [branch] [&lt;extra args for git-diff&gt;*]</pre>
758
+ <pre class="content"><em>git upstream-diff</em> [--wordwise] [--branch branch] [&lt;extra args for git-diff&gt;*]</pre>
759
759
  <div class="attribution">
760
760
  </div></div>
761
761
  </div>
@@ -763,7 +763,10 @@ git-upstream-diff(1) Manual Page
763
763
  <div class="sect1">
764
764
  <h2 id="_description">DESCRIPTION</h2>
765
765
  <div class="sectionbody">
766
- <div class="paragraph"><p>Shows a diff between a branch and its upstream. If the branch is omitted, the tool shows the diff for the current branch. This is <em>roughly</em> the same as:</p></div>
766
+ <div class="paragraph"><p>Shows a diff between a branch and its upstream. If the --branch option is
767
+ omitted or "HEAD", the tool shows the diff for the current branch. Any
768
+ additional arguments are passed through to the underlying git-diff command. This
769
+ is <em>roughly</em> the same as:</p></div>
767
770
  <div class="listingblock">
768
771
  <div class="content">
769
772
  <pre><code>git diff --patience -C -C branch@{upstream} <b>&lt;1&gt;</b> <b>&lt;2&gt;</b></code></pre>
@@ -789,6 +792,20 @@ you&#8217;ll still see an accurate diff compared to just diffing against
789
792
  <div class="paragraph"><p>The <code>--wordwise</code> option also allows <code>git-diff</code> to do word-by-word comparison
790
793
  in a semi-intelligent way. However, sometimes it can produce surprising results,
791
794
  so it is disabled by default.</p></div>
795
+ <div class="paragraph"><p>Since any additional options are passed through to git-diff unchanged, you can
796
+ use this as a general replacement for <code>git diff</code> for things like:</p></div>
797
+ <div class="listingblock">
798
+ <div class="content">
799
+ <pre><code>$ # See what changed in a file on the current branch
800
+ $ git upstream-diff some/file.py
801
+ ...
802
+
803
+ $ # Omit deleted files from the diff
804
+ $ git upstream-diff --diff-filter d
805
+ ...
806
+
807
+ $ # etc.</code></pre>
808
+ </div></div>
792
809
  </div>
793
810
  </div>
794
811
  <div class="sect1">
@@ -895,7 +912,7 @@ from <a href="https://chromium.googlesource.com/chromium/tools/depot_tools.git">
895
912
  <div id="footnotes"><hr /></div>
896
913
  <div id="footer">
897
914
  <div id="footer-text">
898
- Last updated 2017-11-03 14:35:37 PDT
915
+ Last updated 2018-06-20 00:12:01 PDT
899
916
  </div>
900
917
  </div>
901
918
  </body>
@@ -1,13 +1,13 @@
1
1
  '\" t
2
2
  .\" Title: git-upstream-diff
3
3
  .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
- .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5
- .\" Date: 11/03/2017
4
+ .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
+ .\" Date: 06/20/2018
6
6
  .\" Manual: Chromium depot_tools Manual
7
- .\" Source: depot_tools 9c2758a5
7
+ .\" Source: depot_tools 79d42dfb
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "GIT\-UPSTREAM\-DIFF" "1" "11/03/2017" "depot_tools 9c2758a5" "Chromium depot_tools Manual"
10
+ .TH "GIT\-UPSTREAM\-DIFF" "1" "06/20/2018" "depot_tools 79d42dfb" "Chromium depot_tools Manual"
11
11
  .\" -----------------------------------------------------------------
12
12
  .\" * Define some portability stuff
13
13
  .\" -----------------------------------------------------------------
@@ -32,12 +32,12 @@ git-upstream-diff \- Print a diff of the current branch, compared to its upstrea
32
32
  .SH "SYNOPSIS"
33
33
  .sp
34
34
  .nf
35
- \fIgit upstream\-diff\fR [\-\-wordwise] [branch] [<extra args for git\-diff>*]
35
+ \fIgit upstream\-diff\fR [\-\-wordwise] [\-\-branch branch] [<extra args for git\-diff>*]
36
36
  .fi
37
37
  .sp
38
38
  .SH "DESCRIPTION"
39
39
  .sp
40
- Shows a diff between a branch and its upstream\&. If the branch is omitted, the tool shows the diff for the current branch\&. This is \fIroughly\fR the same as:
40
+ Shows a diff between a branch and its upstream\&. If the \-\-branch option is omitted or "HEAD", the tool shows the diff for the current branch\&. Any additional arguments are passed through to the underlying git\-diff command\&. This is \fIroughly\fR the same as:
41
41
  .sp
42
42
  .if n \{\
43
43
  .RS 4
@@ -60,6 +60,27 @@ uses the patience\-diff algorithm, which tends to produce nicer diffs in many ca
60
60
  The difference is that branch@{upstream} is actually the tagged merge base of your branch (See \fBgit-rebase-update\fR(1))\&. This means that if your upstream branch was rebased, but you haven\(cqt yet rebased the current branch on top of it, you\(cqll still see an accurate diff compared to just diffing against @{upstream}\&.
61
61
  .sp
62
62
  The \-\-wordwise option also allows git\-diff to do word\-by\-word comparison in a semi\-intelligent way\&. However, sometimes it can produce surprising results, so it is disabled by default\&.
63
+ .sp
64
+ Since any additional options are passed through to git\-diff unchanged, you can use this as a general replacement for git diff for things like:
65
+ .sp
66
+ .if n \{\
67
+ .RS 4
68
+ .\}
69
+ .nf
70
+ $ # See what changed in a file on the current branch
71
+ $ git upstream\-diff some/file\&.py
72
+ \&.\&.\&.
73
+
74
+ $ # Omit deleted files from the diff
75
+ $ git upstream\-diff \-\-diff\-filter d
76
+ \&.\&.\&.
77
+
78
+ $ # etc\&.
79
+ .fi
80
+ .if n \{\
81
+ .RE
82
+ .\}
83
+ .sp
63
84
  .SH "OPTIONS"
64
85
  .PP
65
86
  \-\-wordwise
@@ -42,11 +42,6 @@ A listing of both categories of tools follows\&.
42
42
  .sp
43
43
  A tutorial for these tools can be found at \fBdepot_tools_tutorial\fR(7)\&.
44
44
  .PP
45
- \fBgit-cherry-pick-upload\fR(1)
46
- .RS 4
47
- Upload the diff between a revision and its parent to rietveld\&.
48
- .RE
49
- .PP
50
45
  \fBgit-cl\fR(1)
51
46
  .RS 4
52
47
  Interact with code reviews on Gerrit and Rietveld
@@ -222,13 +222,13 @@ Clone the \fIdepot_tools\fR repository:
222
222
  .\}
223
223
  .sp
224
224
  .sp
225
- Add \fIdepot_tools\fR to the \fIend\fR of your PATH (you will probably want to put this in your ~/\&.bashrc or ~/\&.zshrc)\&. Assuming you cloned \fIdepot_tools\fR to /path/to/depot_tools:
225
+ Add \fIdepot_tools\fR to the \fIfront\fR of your PATH (you will probably want to put this in your ~/\&.bashrc or ~/\&.zshrc)\&. Assuming you cloned \fIdepot_tools\fR to /path/to/depot_tools:
226
226
  .sp
227
227
  .if n \{\
228
228
  .RS 4
229
229
  .\}
230
230
  .nf
231
- \fB$ export PATH=$PATH:/path/to/depot_tools\fR
231
+ \fB$ export PATH=/path/to/depot_tools:$PATH\fR
232
232
  .fi
233
233
  .if n \{\
234
234
  .RE
@@ -9,12 +9,15 @@ include::_git-upstream-diff_desc.helper.txt[]
9
9
  SYNOPSIS
10
10
  --------
11
11
  [verse]
12
- 'git upstream-diff' [--wordwise] [branch] [<extra args for git-diff>*]
12
+ 'git upstream-diff' [--wordwise] [--branch branch] [<extra args for git-diff>*]
13
13
 
14
14
  DESCRIPTION
15
15
  -----------
16
16
 
17
- Shows a diff between a branch and its upstream. If the branch is omitted, the tool shows the diff for the current branch. This is 'roughly' the same as:
17
+ Shows a diff between a branch and its upstream. If the --branch option is
18
+ omitted or "HEAD", the tool shows the diff for the current branch. Any
19
+ additional arguments are passed through to the underlying git-diff command. This
20
+ is 'roughly' the same as:
18
21
 
19
22
  ----
20
23
  git diff --patience -C -C branch@{upstream} <1> <2>
@@ -33,6 +36,21 @@ The `--wordwise` option also allows `git-diff` to do word-by-word comparison
33
36
  in a semi-intelligent way. However, sometimes it can produce surprising results,
34
37
  so it is disabled by default.
35
38
 
39
+ Since any additional options are passed through to git-diff unchanged, you can
40
+ use this as a general replacement for `git diff` for things like:
41
+
42
+ ----
43
+ $ # See what changed in a file on the current branch
44
+ $ git upstream-diff some/file.py
45
+ ...
46
+
47
+ $ # Omit deleted files from the diff
48
+ $ git upstream-diff --diff-filter d
49
+ ...
50
+
51
+ $ # etc.
52
+ ----
53
+
36
54
 
37
55
  OPTIONS
38
56
  -------
@@ -40,7 +58,7 @@ OPTIONS
40
58
  --wordwise::
41
59
  Print a colorized word-wise diff instead of a line-wise diff.
42
60
 
43
- [branch]
61
+ --branch branch::
44
62
  Show a diff between the specified branch and its upstream, instead of using
45
63
  the current branch.
46
64