libv8 7.3.492.27.3beta1 → 7.4.288.28.0beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1 -0
  3. data/lib/libv8/version.rb +1 -1
  4. data/vendor/depot_tools/annotated_gclient.py +4 -2
  5. data/vendor/depot_tools/auth.py +2 -0
  6. data/vendor/depot_tools/autoninja +3 -1
  7. data/vendor/depot_tools/autoninja.bat +1 -1
  8. data/vendor/depot_tools/autoninja.py +3 -1
  9. data/vendor/depot_tools/bb +1 -1
  10. data/vendor/depot_tools/bootstrap/win/manifest.txt +1 -1
  11. data/vendor/depot_tools/buildbucket.py +8 -6
  12. data/vendor/depot_tools/checkout.py +7 -5
  13. data/vendor/depot_tools/cipd +1 -1
  14. data/vendor/depot_tools/cipd_manifest.txt +4 -4
  15. data/vendor/depot_tools/cipd_manifest.versions +80 -80
  16. data/vendor/depot_tools/cit.py +9 -7
  17. data/vendor/depot_tools/clang_format.py +4 -1
  18. data/vendor/depot_tools/clang_format_merge_driver.py +9 -7
  19. data/vendor/depot_tools/compile_single_file.py +3 -1
  20. data/vendor/depot_tools/dart_format.py +4 -2
  21. data/vendor/depot_tools/depot-tools-auth.py +10 -8
  22. data/vendor/depot_tools/fix_encoding.py +5 -2
  23. data/vendor/depot_tools/gclient-new-workdir.py +2 -0
  24. data/vendor/depot_tools/gclient.py +8 -9
  25. data/vendor/depot_tools/gclient_scm.py +54 -28
  26. data/vendor/depot_tools/gclient_utils.py +14 -4
  27. data/vendor/depot_tools/gerrit_util.py +8 -6
  28. data/vendor/depot_tools/git_cache.py +53 -37
  29. data/vendor/depot_tools/git_cl.py +115 -42
  30. data/vendor/depot_tools/git_drover.py +3 -1
  31. data/vendor/depot_tools/git_find_releases.py +8 -6
  32. data/vendor/depot_tools/git_footers.py +7 -5
  33. data/vendor/depot_tools/git_freezer.py +3 -1
  34. data/vendor/depot_tools/git_map_branches.py +7 -5
  35. data/vendor/depot_tools/git_mark_merge_base.py +8 -6
  36. data/vendor/depot_tools/git_nav_downstream.py +7 -5
  37. data/vendor/depot_tools/git_number.py +3 -1
  38. data/vendor/depot_tools/git_rebase_update.py +38 -43
  39. data/vendor/depot_tools/git_reparent_branch.py +8 -6
  40. data/vendor/depot_tools/git_upstream_diff.py +4 -2
  41. data/vendor/depot_tools/gn.py +6 -4
  42. data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
  43. data/vendor/depot_tools/led +1 -1
  44. data/vendor/depot_tools/luci-auth +1 -1
  45. data/vendor/depot_tools/lucicfg +1 -1
  46. data/vendor/depot_tools/mac_toolchain +1 -1
  47. data/vendor/depot_tools/man/html/depot_tools.html +1 -1
  48. data/vendor/depot_tools/man/html/depot_tools_tutorial.html +28 -22
  49. data/vendor/depot_tools/man/html/git-cl.html +1 -1
  50. data/vendor/depot_tools/man/html/git-drover.html +18 -18
  51. data/vendor/depot_tools/man/html/git-footers.html +1 -1
  52. data/vendor/depot_tools/man/html/git-freeze.html +3 -3
  53. data/vendor/depot_tools/man/html/git-hyper-blame.html +1 -1
  54. data/vendor/depot_tools/man/html/git-map-branches.html +2 -2
  55. data/vendor/depot_tools/man/html/git-map.html +1 -1
  56. data/vendor/depot_tools/man/html/git-mark-merge-base.html +1 -1
  57. data/vendor/depot_tools/man/html/git-nav-downstream.html +3 -3
  58. data/vendor/depot_tools/man/html/git-nav-upstream.html +12 -6
  59. data/vendor/depot_tools/man/html/git-new-branch.html +1 -1
  60. data/vendor/depot_tools/man/html/git-rebase-update.html +20 -1
  61. data/vendor/depot_tools/man/html/git-rename-branch.html +1 -1
  62. data/vendor/depot_tools/man/html/git-reparent-branch.html +1 -1
  63. data/vendor/depot_tools/man/html/git-retry.html +1 -1
  64. data/vendor/depot_tools/man/html/git-squash-branch.html +1 -1
  65. data/vendor/depot_tools/man/html/git-thaw.html +1 -1
  66. data/vendor/depot_tools/man/html/git-upstream-diff.html +10 -6
  67. data/vendor/depot_tools/man/man1/git-cl.1 +4 -4
  68. data/vendor/depot_tools/man/man1/git-drover.1 +21 -21
  69. data/vendor/depot_tools/man/man1/git-footers.1 +4 -4
  70. data/vendor/depot_tools/man/man1/git-freeze.1 +6 -6
  71. data/vendor/depot_tools/man/man1/git-hyper-blame.1 +4 -4
  72. data/vendor/depot_tools/man/man1/git-map-branches.1 +4 -4
  73. data/vendor/depot_tools/man/man1/git-map.1 +4 -4
  74. data/vendor/depot_tools/man/man1/git-mark-merge-base.1 +4 -4
  75. data/vendor/depot_tools/man/man1/git-nav-downstream.1 +6 -6
  76. data/vendor/depot_tools/man/man1/git-nav-upstream.1 +15 -9
  77. data/vendor/depot_tools/man/man1/git-new-branch.1 +3 -3
  78. data/vendor/depot_tools/man/man1/git-rebase-update.1 +14 -4
  79. data/vendor/depot_tools/man/man1/git-rename-branch.1 +4 -4
  80. data/vendor/depot_tools/man/man1/git-reparent-branch.1 +4 -4
  81. data/vendor/depot_tools/man/man1/git-retry.1 +4 -4
  82. data/vendor/depot_tools/man/man1/git-squash-branch.1 +4 -4
  83. data/vendor/depot_tools/man/man1/git-thaw.1 +4 -4
  84. data/vendor/depot_tools/man/man1/git-upstream-diff.1 +7 -13
  85. data/vendor/depot_tools/man/man7/depot_tools.7 +4 -4
  86. data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +33 -27
  87. data/vendor/depot_tools/man/src/filter_demo_output.py +3 -1
  88. data/vendor/depot_tools/man/src/git-rebase-update.txt +7 -0
  89. data/vendor/depot_tools/my_activity.py +13 -11
  90. data/vendor/depot_tools/my_reviews.py +34 -29
  91. data/vendor/depot_tools/ninjalog_uploader_wrapper.py +4 -2
  92. data/vendor/depot_tools/owners_finder.py +3 -1
  93. data/vendor/depot_tools/patch.py +1 -1
  94. data/vendor/depot_tools/post_build_ninja_summary.py +17 -15
  95. data/vendor/depot_tools/presubmit_canned_checks.py +3 -1
  96. data/vendor/depot_tools/presubmit_support.py +10 -5
  97. data/vendor/depot_tools/prpc +1 -1
  98. data/vendor/depot_tools/recipes/README.recipes.md +17 -17
  99. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +1 -6
  100. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +2 -4
  101. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +1 -6
  102. data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/unrecognized_commit_repo.json +0 -5
  103. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/describe-failed.json +2 -4
  104. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_file.json +25 -5
  105. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_mode.json +23 -5
  106. data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_verfile.json +23 -5
  107. data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +0 -6
  108. data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.py +0 -1
  109. data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +1 -5
  110. data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json +1 -6
  111. data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json +0 -5
  112. data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json +1 -6
  113. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/set_failure_hash_with_no_steps.json +1 -3
  114. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json +4 -6
  115. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json +4 -6
  116. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_git_patch.json +4 -6
  117. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_git_patch_luci.json +4 -6
  118. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +4 -6
  119. data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch_new.json +4 -6
  120. data/vendor/depot_tools/rietveld.py +3 -1
  121. data/vendor/depot_tools/roll_dep.py +2 -0
  122. data/vendor/depot_tools/roll_dep_svn.py +14 -11
  123. data/vendor/depot_tools/scm.py +10 -5
  124. data/vendor/depot_tools/split_cl.py +13 -11
  125. data/vendor/depot_tools/subprocess2.py +1 -1
  126. data/vendor/depot_tools/third_party/colorama/LICENSE.txt +0 -1
  127. data/vendor/depot_tools/third_party/colorama/README.chromium +4 -5
  128. data/vendor/depot_tools/third_party/colorama/README.rst +346 -0
  129. data/vendor/depot_tools/third_party/colorama/__init__.py +3 -4
  130. data/vendor/depot_tools/third_party/colorama/ansi.py +82 -30
  131. data/vendor/depot_tools/third_party/colorama/ansitowin32.py +105 -37
  132. data/vendor/depot_tools/third_party/colorama/initialise.py +39 -15
  133. data/vendor/depot_tools/third_party/colorama/win32.py +46 -28
  134. data/vendor/depot_tools/third_party/colorama/winterm.py +80 -31
  135. data/vendor/depot_tools/third_party/upload.py +1 -1
  136. data/vendor/depot_tools/upload_to_google_storage.py +8 -6
  137. data/vendor/depot_tools/vpython +1 -1
  138. data/vendor/depot_tools/watchlists.py +5 -3
  139. data/vendor/depot_tools/weekly +4 -2
  140. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +38 -36
  141. data/vendor/depot_tools/win_toolchain/package_from_installed.py +10 -8
  142. data/vendor/depot_tools/wtf +5 -3
  143. metadata +3 -3
  144. data/vendor/depot_tools/third_party/colorama/README.txt +0 -304
@@ -24,6 +24,8 @@ Branches are colorized as follows:
24
24
  upstream, then you will see this.
25
25
  """
26
26
 
27
+ from __future__ import print_function
28
+
27
29
  import argparse
28
30
  import collections
29
31
  import os
@@ -185,8 +187,8 @@ class BranchMapper(object):
185
187
  parent = self.__branches_info[cycle[-1]].upstream
186
188
  cycle.append(parent)
187
189
  if parent == branch:
188
- print >> sys.stderr, 'Warning: Detected cycle in branches: {}'.format(
189
- ' -> '.join(cycle))
190
+ print('Warning: Detected cycle in branches: {}'.format(
191
+ ' -> '.join(cycle)), file=sys.stderr)
190
192
  return True
191
193
  return False
192
194
 
@@ -312,11 +314,11 @@ def print_desc():
312
314
  def main(argv):
313
315
  setup_color.init()
314
316
  if get_git_version() < MIN_UPSTREAM_TRACK_GIT_VERSION:
315
- print >> sys.stderr, (
317
+ print(
316
318
  'This tool will not show all tracking information for git version '
317
319
  'earlier than ' +
318
320
  '.'.join(str(x) for x in MIN_UPSTREAM_TRACK_GIT_VERSION) +
319
- '. Please consider upgrading.')
321
+ '. Please consider upgrading.', file=sys.stderr)
320
322
 
321
323
  if '-h' in argv:
322
324
  print_desc()
@@ -342,7 +344,7 @@ def main(argv):
342
344
  mapper.maxjobs = opts.maxjobs
343
345
  mapper.show_subject = opts.show_subject
344
346
  mapper.start()
345
- print mapper.output.as_formatted_string()
347
+ print(mapper.output.as_formatted_string())
346
348
  return 0
347
349
 
348
350
  if __name__ == '__main__':
@@ -11,6 +11,8 @@ purposes of the chromium depot_tools git extensions. Passing no arguments will
11
11
  just print the effective merge base for the current branch.
12
12
  """
13
13
 
14
+ from __future__ import print_function
15
+
14
16
  import argparse
15
17
  import sys
16
18
 
@@ -39,16 +41,16 @@ def main(argv):
39
41
  try:
40
42
  remove_merge_base(cur)
41
43
  except CalledProcessError:
42
- print 'No merge base currently exists for %s.' % cur
44
+ print('No merge base currently exists for %s.' % cur)
43
45
  return 0
44
46
 
45
47
  if opts.merge_base:
46
48
  try:
47
49
  opts.merge_base = hash_one(opts.merge_base)
48
50
  except CalledProcessError:
49
- print >> sys.stderr, (
50
- 'fatal: could not resolve %s as a commit' % (opts.merge_base)
51
- )
51
+ print(
52
+ 'fatal: could not resolve %s as a commit' % opts.merge_base,
53
+ file=sys.stderr)
52
54
  return 1
53
55
 
54
56
  manual_merge_base(cur, opts.merge_base, upstream(cur))
@@ -57,9 +59,9 @@ def main(argv):
57
59
  actual = get_or_create_merge_base(cur)
58
60
  if opts.merge_base and opts.merge_base != actual:
59
61
  ret = 1
60
- print "Invalid merge_base %s" % opts.merge_base
62
+ print("Invalid merge_base %s" % opts.merge_base)
61
63
 
62
- print "merge_base(%s): %s" % (cur, actual)
64
+ print("merge_base(%s): %s" % (cur, actual))
63
65
  return ret
64
66
 
65
67
 
@@ -9,6 +9,8 @@ is more than one downstream branch, then this script will prompt you to select
9
9
  which branch.
10
10
  """
11
11
 
12
+ from __future__ import print_function
13
+
12
14
  import argparse
13
15
  import sys
14
16
 
@@ -36,24 +38,24 @@ def main(args):
36
38
  cur = hash_one(cur)
37
39
  downstreams = [b for b in branches() if upfn(b) == cur]
38
40
  if not downstreams:
39
- print "No downstream branches"
41
+ print("No downstream branches")
40
42
  return 1
41
43
  elif len(downstreams) == 1:
42
44
  run('checkout', downstreams[0], stdout=sys.stdout, stderr=sys.stderr)
43
45
  else:
44
46
  high = len(downstreams) - 1
45
47
  while True:
46
- print "Please select a downstream branch"
48
+ print("Please select a downstream branch")
47
49
  for i, b in enumerate(downstreams):
48
- print " %d. %s" % (i, b)
50
+ print(" %d. %s" % (i, b))
49
51
  prompt = "Selection (0-%d)[0]: " % high
50
52
  r = opts.pick
51
53
  if r:
52
- print prompt + r
54
+ print(prompt + r)
53
55
  else:
54
56
  r = raw_input(prompt).strip() or '0'
55
57
  if not r.isdigit() or (0 > int(r) > high):
56
- print "Invalid choice."
58
+ print("Invalid choice.")
57
59
  else:
58
60
  run('checkout', downstreams[int(r)], stdout=sys.stdout,
59
61
  stderr=sys.stderr)
@@ -21,6 +21,8 @@ commit's entire history, this script caches all calculated data inside the git
21
21
  repo that it operates on in the ref 'refs/number/commits'.
22
22
  """
23
23
 
24
+ from __future__ import print_function
25
+
24
26
  import binascii
25
27
  import collections
26
28
  import logging
@@ -278,7 +280,7 @@ def main(): # pragma: no cover
278
280
  if not opts.no_cache:
279
281
  finalize(targets)
280
282
 
281
- print '\n'.join(map(str, map(get_num, targets)))
283
+ print('\n'.join(map(str, map(get_num, targets))))
282
284
  return 0
283
285
 
284
286
 
@@ -7,6 +7,8 @@
7
7
  Tool to update all branches to have the latest changes from their upstreams.
8
8
  """
9
9
 
10
+ from __future__ import print_function
11
+
10
12
  import argparse
11
13
  import collections
12
14
  import logging
@@ -76,7 +78,7 @@ def fetch_remotes(branch_tree):
76
78
  # TODO(iannucci): Should we fetch git-svn?
77
79
 
78
80
  if not fetch_args: # pragma: no cover
79
- print 'Nothing to fetch.'
81
+ print('Nothing to fetch.')
80
82
  else:
81
83
  git.run_with_stderr('fetch', *fetch_args, stdout=sys.stdout,
82
84
  stderr=sys.stderr)
@@ -124,16 +126,16 @@ def remove_empty_branches(branch_tree):
124
126
  if parent in tag_set:
125
127
  git.set_branch_config(branch, 'remote', '.')
126
128
  git.set_branch_config(branch, 'merge', 'refs/tags/%s' % parent)
127
- print ('Reparented %s to track %s [tag] (was tracking %s)'
128
- % (branch, parent, old_parent))
129
+ print('Reparented %s to track %s [tag] (was tracking %s)' %
130
+ (branch, parent, old_parent))
129
131
  else:
130
132
  git.run('branch', '--set-upstream-to', parent, branch)
131
- print ('Reparented %s to track %s (was tracking %s)'
132
- % (branch, parent, old_parent))
133
+ print('Reparented %s to track %s (was tracking %s)' % (branch, parent,
134
+ old_parent))
133
135
 
134
136
  # Apply all deletions recorded, in order.
135
137
  for branch, _ in sorted(deletions.iteritems(), key=lambda x: x[1]):
136
- print git.run('branch', '-d', branch)
138
+ print(git.run('branch', '-d', branch))
137
139
 
138
140
 
139
141
  def rebase_branch(branch, parent, start_hash):
@@ -156,11 +158,11 @@ def rebase_branch(branch, parent, start_hash):
156
158
 
157
159
  if git.hash_one(parent) != start_hash:
158
160
  # Try a plain rebase first
159
- print 'Rebasing:', branch
161
+ print('Rebasing:', branch)
160
162
  rebase_ret = git.rebase(parent, start_hash, branch, abort=True)
161
163
  if not rebase_ret.success:
162
164
  # TODO(iannucci): Find collapsible branches in a smarter way?
163
- print "Failed! Attempting to squash", branch, "...",
165
+ print("Failed! Attempting to squash", branch, "...", end=' ')
164
166
  sys.stdout.flush()
165
167
  squash_branch = branch+"_squash_attempt"
166
168
  git.run('checkout', '-b', squash_branch)
@@ -172,12 +174,12 @@ def rebase_branch(branch, parent, start_hash):
172
174
  git.run('checkout', branch)
173
175
  git.run('branch', '-D', squash_branch)
174
176
  if squash_ret.success and empty_rebase:
175
- print 'Success!'
177
+ print('Success!')
176
178
  git.squash_current_branch(merge_base=start_hash)
177
179
  git.rebase(parent, start_hash, branch)
178
180
  else:
179
- print "Failed!"
180
- print
181
+ print("Failed!")
182
+ print()
181
183
 
182
184
  # rebase and leave in mid-rebase state.
183
185
  # This second rebase attempt should always fail in the same
@@ -185,17 +187,16 @@ def rebase_branch(branch, parent, start_hash):
185
187
  # something very strange has happened.
186
188
  second_rebase_ret = git.rebase(parent, start_hash, branch)
187
189
  if second_rebase_ret.success: # pragma: no cover
188
- print "Second rebase succeeded unexpectedly!"
189
- print "Please see: http://crbug.com/425696"
190
- print "First rebased failed with:"
191
- print rebase_ret.stderr
190
+ print("Second rebase succeeded unexpectedly!")
191
+ print("Please see: http://crbug.com/425696")
192
+ print("First rebased failed with:")
193
+ print(rebase_ret.stderr)
192
194
  else:
193
- print "Here's what git-rebase (squashed) had to say:"
194
- print
195
- print squash_ret.stdout
196
- print squash_ret.stderr
197
- print textwrap.dedent(
198
- """\
195
+ print("Here's what git-rebase (squashed) had to say:")
196
+ print()
197
+ print(squash_ret.stdout)
198
+ print(squash_ret.stderr)
199
+ print(textwrap.dedent("""\
199
200
  Squashing failed. You probably have a real merge conflict.
200
201
 
201
202
  Your working copy is in mid-rebase. Either:
@@ -204,10 +205,10 @@ def rebase_branch(branch, parent, start_hash):
204
205
  git config branch.%s.dormant true
205
206
 
206
207
  And then run `git rebase-update` again to resume.
207
- """ % branch)
208
+ """ % branch))
208
209
  return False
209
210
  else:
210
- print '%s up-to-date' % branch
211
+ print('%s up-to-date' % branch)
211
212
 
212
213
  git.remove_merge_base(branch)
213
214
  git.get_or_create_merge_base(branch)
@@ -243,10 +244,8 @@ def main(args=None):
243
244
  if git.in_rebase():
244
245
  # TODO(iannucci): Be able to resume rebase with flags like --continue,
245
246
  # etc.
246
- print (
247
- 'Rebase in progress. Please complete the rebase before running '
248
- '`git rebase-update`.'
249
- )
247
+ print('Rebase in progress. Please complete the rebase before running '
248
+ '`git rebase-update`.')
250
249
  return 1
251
250
 
252
251
  return_branch, return_workdir = find_return_branch_workdir()
@@ -254,7 +253,7 @@ def main(args=None):
254
253
 
255
254
  if git.current_branch() == 'HEAD':
256
255
  if git.run('status', '--porcelain'):
257
- print 'Cannot rebase-update with detached head + uncommitted changes.'
256
+ print('Cannot rebase-update with detached head + uncommitted changes.')
258
257
  return 1
259
258
  else:
260
259
  git.freeze() # just in case there are any local changes.
@@ -267,7 +266,7 @@ def main(args=None):
267
266
  if branches_to_rebase:
268
267
  skipped = set(skipped).intersection(branches_to_rebase)
269
268
  for branch in skipped:
270
- print 'Skipping %s: No upstream specified' % branch
269
+ print('Skipping %s: No upstream specified' % branch)
271
270
 
272
271
  if not opts.no_fetch:
273
272
  fetch_remotes(branch_tree)
@@ -288,28 +287,28 @@ def main(args=None):
288
287
  if branches_to_rebase and branch not in branches_to_rebase:
289
288
  continue
290
289
  if git.is_dormant(branch):
291
- print 'Skipping dormant branch', branch
290
+ print('Skipping dormant branch', branch)
292
291
  else:
293
292
  ret = rebase_branch(branch, parent, merge_base[branch])
294
293
  if not ret:
295
294
  retcode = 1
296
295
 
297
296
  if opts.keep_going:
298
- print '--keep-going set, continuing with next branch.'
297
+ print('--keep-going set, continuing with next branch.')
299
298
  unrebased_branches.append(branch)
300
299
  if git.in_rebase():
301
300
  git.run_with_retcode('rebase', '--abort')
302
301
  if git.in_rebase(): # pragma: no cover
303
- print 'Failed to abort rebase. Something is really wrong.'
302
+ print('Failed to abort rebase. Something is really wrong.')
304
303
  break
305
304
  else:
306
305
  break
307
306
 
308
307
  if unrebased_branches:
309
- print
310
- print 'The following branches could not be cleanly rebased:'
308
+ print()
309
+ print('The following branches could not be cleanly rebased:')
311
310
  for branch in unrebased_branches:
312
- print ' %s' % branch
311
+ print(' %s' % branch)
313
312
 
314
313
  if not retcode:
315
314
  remove_empty_branches(branch_tree)
@@ -321,10 +320,8 @@ def main(args=None):
321
320
  else:
322
321
  root_branch = git.root()
323
322
  if return_branch != 'HEAD':
324
- print (
325
- "%r was merged with its parent, checking out %r instead."
326
- % (return_branch, root_branch)
327
- )
323
+ print("%r was merged with its parent, checking out %r instead." %
324
+ (return_branch, root_branch))
328
325
  git.run('checkout', root_branch)
329
326
 
330
327
  # return_workdir may also not be there any more.
@@ -332,10 +329,8 @@ def main(args=None):
332
329
  try:
333
330
  os.chdir(return_workdir)
334
331
  except OSError as e:
335
- print (
336
- "Unable to return to original workdir %r: %s"
337
- % (return_workdir, e)
338
- )
332
+ print(
333
+ "Unable to return to original workdir %r: %s" % (return_workdir, e))
339
334
  git.set_config(STARTING_BRANCH_KEY, '')
340
335
  git.set_config(STARTING_WORKDIR_KEY, '')
341
336
 
@@ -5,6 +5,8 @@
5
5
 
6
6
  """Change the upstream of the current branch."""
7
7
 
8
+ from __future__ import print_function
9
+
8
10
  import argparse
9
11
  import sys
10
12
 
@@ -55,7 +57,7 @@ def main(args):
55
57
  "`git branch --set-upstream-to` to assign it one.\n\nPlease assign an "
56
58
  "upstream branch and then run this command again."
57
59
  )
58
- print >> sys.stderr, msg % branch
60
+ print(msg % branch, file=sys.stderr)
59
61
  return 1
60
62
 
61
63
  mbase = get_or_create_merge_base(branch, cur_parent)
@@ -67,17 +69,17 @@ def main(args):
67
69
  try:
68
70
  run('show-ref', new_parent)
69
71
  except subprocess2.CalledProcessError:
70
- print >> sys.stderr, 'fatal: invalid reference: %s' % new_parent
72
+ print('fatal: invalid reference: %s' % new_parent, file=sys.stderr)
71
73
  return 1
72
74
 
73
75
  if new_parent in all_tags:
74
- print ("Reparenting %s to track %s [tag] (was %s)"
75
- % (branch, new_parent, cur_parent))
76
+ print("Reparenting %s to track %s [tag] (was %s)" % (branch, new_parent,
77
+ cur_parent))
76
78
  set_branch_config(branch, 'remote', '.')
77
79
  set_branch_config(branch, 'merge', new_parent)
78
80
  else:
79
- print ("Reparenting %s to track %s (was %s)"
80
- % (branch, new_parent, cur_parent))
81
+ print("Reparenting %s to track %s (was %s)" % (branch, new_parent,
82
+ cur_parent))
81
83
  run('branch', '--set-upstream-to', new_parent, branch)
82
84
 
83
85
  manual_merge_base(branch, mbase, new_parent)
@@ -3,6 +3,8 @@
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
5
 
6
+ from __future__ import print_function
7
+
6
8
  import argparse
7
9
  import sys
8
10
 
@@ -31,12 +33,12 @@ def main(args):
31
33
  opts.branch = current_branch
32
34
 
33
35
  if not opts.branch or opts.branch == 'HEAD':
34
- print 'fatal: Cannot perform git-upstream-diff while not on a branch'
36
+ print('fatal: Cannot perform git-upstream-diff while not on a branch')
35
37
  return 1
36
38
 
37
39
  par = git.upstream(opts.branch)
38
40
  if not par:
39
- print 'fatal: No upstream configured for branch \'%s\'' % opts.branch
41
+ print('fatal: No upstream configured for branch \'%s\'' % opts.branch)
40
42
  return 1
41
43
 
42
44
  cmd = [git.GIT_EXE, '-c', 'core.quotePath=false',
@@ -12,6 +12,8 @@ binary. It will also automatically try to find the gn binary when run inside
12
12
  the chrome source tree, so users can just type "gn" on the command line
13
13
  (normally depot_tools is on the path)."""
14
14
 
15
+ from __future__ import print_function
16
+
15
17
  import gclient_paths
16
18
  import os
17
19
  import subprocess
@@ -56,13 +58,13 @@ def main(args):
56
58
  # inside of buildtools.
57
59
  bin_path = gclient_paths.GetBuildtoolsPlatformBinaryPath()
58
60
  if not bin_path:
59
- print >> sys.stderr, ('gn.py: Could not find checkout in any parent of '
60
- 'the current path.\nThis must be run inside a '
61
- 'checkout.')
61
+ print('gn.py: Could not find checkout in any parent of the current path.\n'
62
+ 'This must be run inside a checkout.', file=sys.stderr)
62
63
  return 1
63
64
  gn_path = os.path.join(bin_path, 'gn' + gclient_paths.GetExeSuffix())
64
65
  if not os.path.exists(gn_path):
65
- print >> sys.stderr, 'gn.py: Could not find gn executable at: %s' % gn_path
66
+ print(
67
+ 'gn.py: Could not find gn executable at: %s' % gn_path, file=sys.stderr)
66
68
  return 2
67
69
  else:
68
70
  return subprocess.call([gn_path] + args[1:])
@@ -15,7 +15,7 @@
15
15
  "deps": {
16
16
  "recipe_engine": {
17
17
  "branch": "master",
18
- "revision": "0589a429cf3c164004dae4ced4c75784a50afd81",
18
+ "revision": "e7498a59f81c8fad2caf7e3d7c8ca072ec0e2494",
19
19
  "url": "https://chromium.googlesource.com/infra/luci/recipes-py.git"
20
20
  }
21
21
  },
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
 
3
3
  # Copyright 2017 The Chromium Authors. All rights reserved.
4
4
  # Use of this source code is governed by a BSD-style license that can be
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
 
3
3
  # Copyright 2018 The Chromium Authors. All rights reserved.
4
4
  # Use of this source code is governed by a BSD-style license that can be