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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/lib/libv8/version.rb +1 -1
- data/vendor/depot_tools/annotated_gclient.py +4 -2
- data/vendor/depot_tools/auth.py +2 -0
- data/vendor/depot_tools/autoninja +3 -1
- data/vendor/depot_tools/autoninja.bat +1 -1
- data/vendor/depot_tools/autoninja.py +3 -1
- data/vendor/depot_tools/bb +1 -1
- data/vendor/depot_tools/bootstrap/win/manifest.txt +1 -1
- data/vendor/depot_tools/buildbucket.py +8 -6
- data/vendor/depot_tools/checkout.py +7 -5
- data/vendor/depot_tools/cipd +1 -1
- data/vendor/depot_tools/cipd_manifest.txt +4 -4
- data/vendor/depot_tools/cipd_manifest.versions +80 -80
- data/vendor/depot_tools/cit.py +9 -7
- data/vendor/depot_tools/clang_format.py +4 -1
- data/vendor/depot_tools/clang_format_merge_driver.py +9 -7
- data/vendor/depot_tools/compile_single_file.py +3 -1
- data/vendor/depot_tools/dart_format.py +4 -2
- data/vendor/depot_tools/depot-tools-auth.py +10 -8
- data/vendor/depot_tools/fix_encoding.py +5 -2
- data/vendor/depot_tools/gclient-new-workdir.py +2 -0
- data/vendor/depot_tools/gclient.py +8 -9
- data/vendor/depot_tools/gclient_scm.py +54 -28
- data/vendor/depot_tools/gclient_utils.py +14 -4
- data/vendor/depot_tools/gerrit_util.py +8 -6
- data/vendor/depot_tools/git_cache.py +53 -37
- data/vendor/depot_tools/git_cl.py +115 -42
- data/vendor/depot_tools/git_drover.py +3 -1
- data/vendor/depot_tools/git_find_releases.py +8 -6
- data/vendor/depot_tools/git_footers.py +7 -5
- data/vendor/depot_tools/git_freezer.py +3 -1
- data/vendor/depot_tools/git_map_branches.py +7 -5
- data/vendor/depot_tools/git_mark_merge_base.py +8 -6
- data/vendor/depot_tools/git_nav_downstream.py +7 -5
- data/vendor/depot_tools/git_number.py +3 -1
- data/vendor/depot_tools/git_rebase_update.py +38 -43
- data/vendor/depot_tools/git_reparent_branch.py +8 -6
- data/vendor/depot_tools/git_upstream_diff.py +4 -2
- data/vendor/depot_tools/gn.py +6 -4
- data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
- data/vendor/depot_tools/led +1 -1
- data/vendor/depot_tools/luci-auth +1 -1
- data/vendor/depot_tools/lucicfg +1 -1
- data/vendor/depot_tools/mac_toolchain +1 -1
- data/vendor/depot_tools/man/html/depot_tools.html +1 -1
- data/vendor/depot_tools/man/html/depot_tools_tutorial.html +28 -22
- data/vendor/depot_tools/man/html/git-cl.html +1 -1
- data/vendor/depot_tools/man/html/git-drover.html +18 -18
- data/vendor/depot_tools/man/html/git-footers.html +1 -1
- data/vendor/depot_tools/man/html/git-freeze.html +3 -3
- data/vendor/depot_tools/man/html/git-hyper-blame.html +1 -1
- data/vendor/depot_tools/man/html/git-map-branches.html +2 -2
- data/vendor/depot_tools/man/html/git-map.html +1 -1
- data/vendor/depot_tools/man/html/git-mark-merge-base.html +1 -1
- data/vendor/depot_tools/man/html/git-nav-downstream.html +3 -3
- data/vendor/depot_tools/man/html/git-nav-upstream.html +12 -6
- data/vendor/depot_tools/man/html/git-new-branch.html +1 -1
- data/vendor/depot_tools/man/html/git-rebase-update.html +20 -1
- data/vendor/depot_tools/man/html/git-rename-branch.html +1 -1
- data/vendor/depot_tools/man/html/git-reparent-branch.html +1 -1
- data/vendor/depot_tools/man/html/git-retry.html +1 -1
- data/vendor/depot_tools/man/html/git-squash-branch.html +1 -1
- data/vendor/depot_tools/man/html/git-thaw.html +1 -1
- data/vendor/depot_tools/man/html/git-upstream-diff.html +10 -6
- data/vendor/depot_tools/man/man1/git-cl.1 +4 -4
- data/vendor/depot_tools/man/man1/git-drover.1 +21 -21
- 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 +6 -6
- data/vendor/depot_tools/man/man1/git-nav-upstream.1 +15 -9
- data/vendor/depot_tools/man/man1/git-new-branch.1 +3 -3
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +14 -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 +4 -4
- data/vendor/depot_tools/man/man1/git-squash-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-thaw.1 +4 -4
- data/vendor/depot_tools/man/man1/git-upstream-diff.1 +7 -13
- data/vendor/depot_tools/man/man7/depot_tools.7 +4 -4
- data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +33 -27
- data/vendor/depot_tools/man/src/filter_demo_output.py +3 -1
- data/vendor/depot_tools/man/src/git-rebase-update.txt +7 -0
- data/vendor/depot_tools/my_activity.py +13 -11
- data/vendor/depot_tools/my_reviews.py +34 -29
- data/vendor/depot_tools/ninjalog_uploader_wrapper.py +4 -2
- data/vendor/depot_tools/owners_finder.py +3 -1
- data/vendor/depot_tools/patch.py +1 -1
- data/vendor/depot_tools/post_build_ninja_summary.py +17 -15
- data/vendor/depot_tools/presubmit_canned_checks.py +3 -1
- data/vendor/depot_tools/presubmit_support.py +10 -5
- data/vendor/depot_tools/prpc +1 -1
- data/vendor/depot_tools/recipes/README.recipes.md +17 -17
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +1 -6
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +2 -4
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +1 -6
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/unrecognized_commit_repo.json +0 -5
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/describe-failed.json +2 -4
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_file.json +25 -5
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_mode.json +23 -5
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_verfile.json +23 -5
- data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +0 -6
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.py +0 -1
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +1 -5
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json +1 -6
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json +0 -5
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json +1 -6
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/set_failure_hash_with_no_steps.json +1 -3
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json +4 -6
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json +4 -6
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_git_patch.json +4 -6
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_git_patch_luci.json +4 -6
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +4 -6
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch_new.json +4 -6
- data/vendor/depot_tools/rietveld.py +3 -1
- data/vendor/depot_tools/roll_dep.py +2 -0
- data/vendor/depot_tools/roll_dep_svn.py +14 -11
- data/vendor/depot_tools/scm.py +10 -5
- data/vendor/depot_tools/split_cl.py +13 -11
- data/vendor/depot_tools/subprocess2.py +1 -1
- data/vendor/depot_tools/third_party/colorama/LICENSE.txt +0 -1
- data/vendor/depot_tools/third_party/colorama/README.chromium +4 -5
- data/vendor/depot_tools/third_party/colorama/README.rst +346 -0
- data/vendor/depot_tools/third_party/colorama/__init__.py +3 -4
- data/vendor/depot_tools/third_party/colorama/ansi.py +82 -30
- data/vendor/depot_tools/third_party/colorama/ansitowin32.py +105 -37
- data/vendor/depot_tools/third_party/colorama/initialise.py +39 -15
- data/vendor/depot_tools/third_party/colorama/win32.py +46 -28
- data/vendor/depot_tools/third_party/colorama/winterm.py +80 -31
- data/vendor/depot_tools/third_party/upload.py +1 -1
- data/vendor/depot_tools/upload_to_google_storage.py +8 -6
- data/vendor/depot_tools/vpython +1 -1
- data/vendor/depot_tools/watchlists.py +5 -3
- data/vendor/depot_tools/weekly +4 -2
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +38 -36
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +10 -8
- data/vendor/depot_tools/wtf +5 -3
- metadata +3 -3
- data/vendor/depot_tools/third_party/colorama/README.txt +0 -304
@@ -277,11 +277,7 @@
|
|
277
277
|
},
|
278
278
|
{
|
279
279
|
"failure": {
|
280
|
-
"
|
281
|
-
"traceback": [
|
282
|
-
"<omitted by recipe engine>"
|
283
|
-
]
|
284
|
-
},
|
280
|
+
"failure": {},
|
285
281
|
"humanReason": "1 out of 1 aggregated steps failed: Error querying for CL description: host:'https://chromium-review.googlesource.com' change:122; patchset:3"
|
286
282
|
},
|
287
283
|
"name": "$result"
|
data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json
CHANGED
@@ -162,12 +162,7 @@
|
|
162
162
|
},
|
163
163
|
{
|
164
164
|
"failure": {
|
165
|
-
"
|
166
|
-
"traceback": [
|
167
|
-
"<omitted by recipe engine>"
|
168
|
-
]
|
169
|
-
},
|
170
|
-
"humanReason": "Infra Failure: Step('git status can_fail_build') returned 1"
|
165
|
+
"humanReason": "Infra Failure: Step('git status can_fail_build') (retcode: 1)"
|
171
166
|
},
|
172
167
|
"name": "$result"
|
173
168
|
}
|
data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json
CHANGED
@@ -219,12 +219,7 @@
|
|
219
219
|
},
|
220
220
|
{
|
221
221
|
"failure": {
|
222
|
-
"
|
223
|
-
"traceback": [
|
224
|
-
"<omitted by recipe engine>"
|
225
|
-
]
|
226
|
-
},
|
227
|
-
"humanReason": "Infra Failure: Step('my repo rebase') returned 1"
|
222
|
+
"humanReason": "Infra Failure: Step('my repo rebase') (retcode: 1)"
|
228
223
|
},
|
229
224
|
"name": "$result"
|
230
225
|
}
|
@@ -131,16 +131,14 @@
|
|
131
131
|
"name": "fail",
|
132
132
|
"~followup_annotations": [
|
133
133
|
"@@@STEP_TEXT@foo@@@",
|
134
|
-
"@@@
|
135
|
-
"@@@
|
134
|
+
"@@@SET_BUILD_PROPERTY@failure_hash@\"622c0c52e65e6d0dc78957dd113ad343e57ae6d2\"@@@",
|
135
|
+
"@@@STEP_FAILURE@@@"
|
136
136
|
]
|
137
137
|
},
|
138
138
|
{
|
139
139
|
"failure": {
|
140
|
-
"failure": {
|
141
|
-
|
142
|
-
},
|
143
|
-
"humanReason": "Step('fail') failed with return_code 1"
|
140
|
+
"failure": {},
|
141
|
+
"humanReason": "Step('fail') (retcode: 1)"
|
144
142
|
},
|
145
143
|
"name": "$result"
|
146
144
|
}
|
@@ -131,16 +131,14 @@
|
|
131
131
|
"name": "fail",
|
132
132
|
"~followup_annotations": [
|
133
133
|
"@@@STEP_TEXT@foo@@@",
|
134
|
-
"@@@
|
135
|
-
"@@@
|
134
|
+
"@@@SET_BUILD_PROPERTY@failure_hash@\"622c0c52e65e6d0dc78957dd113ad343e57ae6d2\"@@@",
|
135
|
+
"@@@STEP_FAILURE@@@"
|
136
136
|
]
|
137
137
|
},
|
138
138
|
{
|
139
139
|
"failure": {
|
140
|
-
"failure": {
|
141
|
-
|
142
|
-
},
|
143
|
-
"humanReason": "Step('fail') failed with return_code 1"
|
140
|
+
"failure": {},
|
141
|
+
"humanReason": "Step('fail') (retcode: 1)"
|
144
142
|
},
|
145
143
|
"name": "$result"
|
146
144
|
}
|
data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_git_patch.json
CHANGED
@@ -29,16 +29,14 @@
|
|
29
29
|
"name": "fail",
|
30
30
|
"~followup_annotations": [
|
31
31
|
"@@@STEP_TEXT@foo@@@",
|
32
|
-
"@@@
|
33
|
-
"@@@
|
32
|
+
"@@@SET_BUILD_PROPERTY@failure_hash@\"622c0c52e65e6d0dc78957dd113ad343e57ae6d2\"@@@",
|
33
|
+
"@@@STEP_FAILURE@@@"
|
34
34
|
]
|
35
35
|
},
|
36
36
|
{
|
37
37
|
"failure": {
|
38
|
-
"failure": {
|
39
|
-
|
40
|
-
},
|
41
|
-
"humanReason": "Step('fail') failed with return_code 1"
|
38
|
+
"failure": {},
|
39
|
+
"humanReason": "Step('fail') (retcode: 1)"
|
42
40
|
},
|
43
41
|
"name": "$result"
|
44
42
|
}
|
@@ -29,16 +29,14 @@
|
|
29
29
|
"name": "fail",
|
30
30
|
"~followup_annotations": [
|
31
31
|
"@@@STEP_TEXT@foo@@@",
|
32
|
-
"@@@
|
33
|
-
"@@@
|
32
|
+
"@@@SET_BUILD_PROPERTY@failure_hash@\"622c0c52e65e6d0dc78957dd113ad343e57ae6d2\"@@@",
|
33
|
+
"@@@STEP_FAILURE@@@"
|
34
34
|
]
|
35
35
|
},
|
36
36
|
{
|
37
37
|
"failure": {
|
38
|
-
"failure": {
|
39
|
-
|
40
|
-
},
|
41
|
-
"humanReason": "Step('fail') failed with return_code 1"
|
38
|
+
"failure": {},
|
39
|
+
"humanReason": "Step('fail') (retcode: 1)"
|
42
40
|
},
|
43
41
|
"name": "$result"
|
44
42
|
}
|
@@ -26,16 +26,14 @@
|
|
26
26
|
"name": "fail",
|
27
27
|
"~followup_annotations": [
|
28
28
|
"@@@STEP_TEXT@foo@@@",
|
29
|
-
"@@@
|
30
|
-
"@@@
|
29
|
+
"@@@SET_BUILD_PROPERTY@failure_hash@\"622c0c52e65e6d0dc78957dd113ad343e57ae6d2\"@@@",
|
30
|
+
"@@@STEP_FAILURE@@@"
|
31
31
|
]
|
32
32
|
},
|
33
33
|
{
|
34
34
|
"failure": {
|
35
|
-
"failure": {
|
36
|
-
|
37
|
-
},
|
38
|
-
"humanReason": "Step('fail') failed with return_code 1"
|
35
|
+
"failure": {},
|
36
|
+
"humanReason": "Step('fail') (retcode: 1)"
|
39
37
|
},
|
40
38
|
"name": "$result"
|
41
39
|
}
|
@@ -27,16 +27,14 @@
|
|
27
27
|
"name": "fail",
|
28
28
|
"~followup_annotations": [
|
29
29
|
"@@@STEP_TEXT@foo@@@",
|
30
|
-
"@@@
|
31
|
-
"@@@
|
30
|
+
"@@@SET_BUILD_PROPERTY@failure_hash@\"622c0c52e65e6d0dc78957dd113ad343e57ae6d2\"@@@",
|
31
|
+
"@@@STEP_FAILURE@@@"
|
32
32
|
]
|
33
33
|
},
|
34
34
|
{
|
35
35
|
"failure": {
|
36
|
-
"failure": {
|
37
|
-
|
38
|
-
},
|
39
|
-
"humanReason": "Step('fail') failed with return_code 1"
|
36
|
+
"failure": {},
|
37
|
+
"humanReason": "Step('fail') (retcode: 1)"
|
40
38
|
},
|
41
39
|
"name": "$result"
|
42
40
|
}
|
@@ -14,6 +14,8 @@ The following hypothesis are made:
|
|
14
14
|
- A patch set cannot be modified
|
15
15
|
"""
|
16
16
|
|
17
|
+
from __future__ import print_function
|
18
|
+
|
17
19
|
import copy
|
18
20
|
import errno
|
19
21
|
import json
|
@@ -474,7 +476,7 @@ class Rietveld(object):
|
|
474
476
|
# If reaching this line, loop again. Uses a small backoff.
|
475
477
|
time.sleep(min(10, 1+retry*2))
|
476
478
|
except urllib2.HTTPError as e:
|
477
|
-
print
|
479
|
+
print('Request to %s failed: %s' % (e.geturl(), e.read()))
|
478
480
|
raise
|
479
481
|
finally:
|
480
482
|
upload.ErrorExit = old_error_exit
|
@@ -19,6 +19,8 @@ $ git add DEPS
|
|
19
19
|
$ git commit
|
20
20
|
"""
|
21
21
|
|
22
|
+
from __future__ import print_function
|
23
|
+
|
22
24
|
import ast
|
23
25
|
import optparse
|
24
26
|
import os
|
@@ -134,8 +136,8 @@ def convert_svn_revision(dep_path, revision):
|
|
134
136
|
try:
|
135
137
|
svn_rev = int(line.split()[1].partition('@')[2])
|
136
138
|
except (IndexError, ValueError):
|
137
|
-
print
|
138
|
-
|
139
|
+
print('WARNING: Could not parse svn revision out of "%s"' % line,
|
140
|
+
file=sys.stderr)
|
139
141
|
continue
|
140
142
|
if not latest_svn_rev or int(svn_rev) > int(latest_svn_rev):
|
141
143
|
latest_svn_rev = svn_rev
|
@@ -357,15 +359,15 @@ def update_deps(deps_file, dep_path, dep_name, new_rev, comment):
|
|
357
359
|
commit_msg = generate_commit_message(
|
358
360
|
deps_locals['deps_os'][os_name.s], dep_path, dep_name, new_rev)
|
359
361
|
if not commit_msg:
|
360
|
-
print
|
362
|
+
print('Could not find an entry in %s to update.' % deps_file)
|
361
363
|
return 1
|
362
364
|
|
363
|
-
print
|
364
|
-
print
|
365
|
-
print
|
365
|
+
print('Pinning %s' % dep_name)
|
366
|
+
print('to revision %s' % new_rev)
|
367
|
+
print('in %s' % deps_file)
|
366
368
|
with open(deps_file, 'w') as fh:
|
367
369
|
for line in deps_lines:
|
368
|
-
print
|
370
|
+
print(line, file=fh)
|
369
371
|
deps_file_dir = os.path.normpath(os.path.dirname(deps_file))
|
370
372
|
deps_file_root = Popen(
|
371
373
|
['git', 'rev-parse', '--show-toplevel'],
|
@@ -396,7 +398,7 @@ def main(argv):
|
|
396
398
|
# Only require the path to exist if the revision should be verified. A path
|
397
399
|
# to e.g. os deps might not be checked out.
|
398
400
|
if not os.path.isdir(dep_path):
|
399
|
-
print
|
401
|
+
print('No such directory: %s' % arg_dep_path, file=sys.stderr)
|
400
402
|
return 1
|
401
403
|
if len(args) > 2:
|
402
404
|
deps_file = args[2]
|
@@ -407,9 +409,9 @@ def main(argv):
|
|
407
409
|
dep_name = posix_path(os.path.relpath(dep_path, gclient_root))
|
408
410
|
if options.no_verify_revision:
|
409
411
|
if not is_git_hash(revision):
|
410
|
-
print
|
412
|
+
print(
|
411
413
|
'The passed revision %s must be a git hash when skipping revision '
|
412
|
-
'verification.' % revision)
|
414
|
+
'verification.' % revision, file=sys.stderr)
|
413
415
|
return 1
|
414
416
|
git_rev = revision
|
415
417
|
comment = None
|
@@ -417,7 +419,8 @@ def main(argv):
|
|
417
419
|
git_rev, svn_rev = get_git_revision(dep_path, revision)
|
418
420
|
comment = ('from svn revision %s' % svn_rev) if svn_rev else None
|
419
421
|
if not git_rev:
|
420
|
-
print
|
422
|
+
print('Could not find git revision matching %s.' % revision,
|
423
|
+
file=sys.stderr)
|
421
424
|
return 1
|
422
425
|
return update_deps(deps_file, dep_path, dep_name, git_rev, comment)
|
423
426
|
|
data/vendor/depot_tools/scm.py
CHANGED
@@ -117,8 +117,8 @@ class GIT(object):
|
|
117
117
|
def Capture(args, cwd, strip_out=True, **kwargs):
|
118
118
|
env = GIT.ApplyEnvVars(kwargs)
|
119
119
|
output = subprocess2.check_output(
|
120
|
-
['git'] + args,
|
121
|
-
|
120
|
+
['git'] + args, cwd=cwd, stderr=subprocess2.PIPE, env=env,
|
121
|
+
**kwargs).decode('utf-8', 'replace')
|
122
122
|
return output.strip() if strip_out else output
|
123
123
|
|
124
124
|
@staticmethod
|
@@ -369,9 +369,14 @@ class GIT(object):
|
|
369
369
|
|
370
370
|
sha_only: Fail unless rev is a sha hash.
|
371
371
|
"""
|
372
|
+
if sys.platform.startswith('win'):
|
373
|
+
# Windows .bat scripts use ^ as escape sequence, which means we have to
|
374
|
+
# escape it with itself for every .bat invocation.
|
375
|
+
needle = '%s^^^^{commit}' % rev
|
376
|
+
else:
|
377
|
+
needle = '%s^{commit}' % rev
|
372
378
|
try:
|
373
|
-
sha = GIT.Capture(['rev-parse', '--verify',
|
374
|
-
cwd=cwd)
|
379
|
+
sha = GIT.Capture(['rev-parse', '--verify', needle], cwd=cwd)
|
375
380
|
if sha_only:
|
376
381
|
return sha == rev.lower()
|
377
382
|
return True
|
@@ -383,7 +388,7 @@ class GIT(object):
|
|
383
388
|
"""Asserts git's version is at least min_version."""
|
384
389
|
if cls.current_version is None:
|
385
390
|
current_version = cls.Capture(['--version'], '.')
|
386
|
-
matched = re.search(r'version ([0-9\.]+)', current_version
|
391
|
+
matched = re.search(r'version ([0-9\.]+)', current_version)
|
387
392
|
cls.current_version = matched.group(1)
|
388
393
|
current_version_list = list(map(only_int, cls.current_version.split('.')))
|
389
394
|
for min_ver in map(int, min_version.split('.')):
|
@@ -5,6 +5,8 @@
|
|
5
5
|
|
6
6
|
"""Splits a branch into smaller branches and uploads CLs."""
|
7
7
|
|
8
|
+
from __future__ import print_function
|
9
|
+
|
8
10
|
import collections
|
9
11
|
import os
|
10
12
|
import re
|
@@ -95,7 +97,7 @@ def UploadCl(refactor_branch, refactor_branch_upstream, directory, files,
|
|
95
97
|
# Create a branch.
|
96
98
|
if not CreateBranchForDirectory(
|
97
99
|
refactor_branch, directory, refactor_branch_upstream):
|
98
|
-
print
|
100
|
+
print('Skipping ' + directory + ' for which a branch already exists.')
|
99
101
|
return
|
100
102
|
|
101
103
|
# Checkout all changes to files in |files|.
|
@@ -124,7 +126,7 @@ def UploadCl(refactor_branch, refactor_branch_upstream, directory, files,
|
|
124
126
|
upload_args.append('--send-mail')
|
125
127
|
if enable_auto_submit:
|
126
128
|
upload_args.append('--enable-auto-submit')
|
127
|
-
print
|
129
|
+
print('Uploading CL for ' + directory + '.')
|
128
130
|
cmd_upload(upload_args)
|
129
131
|
if comment:
|
130
132
|
changelist().AddComment(FormatDescriptionOrComment(comment, directory),
|
@@ -162,12 +164,12 @@ def PrintClInfo(cl_index, num_cls, directory, file_paths, description,
|
|
162
164
|
directory).splitlines()
|
163
165
|
indented_description = '\n'.join([' ' + l for l in description_lines])
|
164
166
|
|
165
|
-
print
|
166
|
-
print
|
167
|
-
print
|
168
|
-
print
|
169
|
-
print
|
170
|
-
print
|
167
|
+
print('CL {}/{}'.format(cl_index, num_cls))
|
168
|
+
print('Path: {}'.format(directory))
|
169
|
+
print('Reviewers: {}'.format(', '.join(reviewers)))
|
170
|
+
print('\n' + indented_description + '\n')
|
171
|
+
print('\n'.join(file_paths))
|
172
|
+
print()
|
171
173
|
|
172
174
|
|
173
175
|
def SplitCl(description_file, comment_file, changelist, cmd_upload, dry_run,
|
@@ -197,7 +199,7 @@ def SplitCl(description_file, comment_file, changelist, cmd_upload, dry_run,
|
|
197
199
|
files = change.AffectedFiles()
|
198
200
|
|
199
201
|
if not files:
|
200
|
-
print
|
202
|
+
print('Cannot split an empty CL.')
|
201
203
|
return 1
|
202
204
|
|
203
205
|
author = git.run('config', 'user.email').strip() or None
|
@@ -216,12 +218,12 @@ def SplitCl(description_file, comment_file, changelist, cmd_upload, dry_run,
|
|
216
218
|
print('Will split current branch (' + refactor_branch + ') into ' +
|
217
219
|
str(num_cls) + ' CLs.\n')
|
218
220
|
if cq_dry_run and num_cls > CL_SPLIT_FORCE_LIMIT:
|
219
|
-
print
|
221
|
+
print(
|
220
222
|
'This will generate "%r" CLs. This many CLs can potentially generate'
|
221
223
|
' too much load on the build infrastructure. Please email'
|
222
224
|
' infra-dev@chromium.org to ensure that this won\'t break anything.'
|
223
225
|
' The infra team reserves the right to cancel your jobs if they are'
|
224
|
-
' overloading the CQ.'
|
226
|
+
' overloading the CQ.' % num_cls)
|
225
227
|
answer = raw_input('Proceed? (y/n):')
|
226
228
|
if answer.lower() != 'y':
|
227
229
|
return 0
|
@@ -25,4 +25,3 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
25
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
26
26
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
27
27
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
-
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Name: colorama
|
2
|
-
URL:
|
3
|
-
Version:
|
4
|
-
Revision:
|
2
|
+
URL: https://github.com/tartley/colorama
|
3
|
+
Version: b71bec90d4770d4124ad95d70cc6a4c9289bbadf (0.4.1)
|
4
|
+
Revision: b71bec90d4770d4124ad95d70cc6a4c9289bbadf
|
5
5
|
|
6
6
|
Description:
|
7
7
|
Provides a simple cross-platform API to print colored terminal text from Python
|
@@ -9,5 +9,4 @@ applications.
|
|
9
9
|
|
10
10
|
Additional changes:
|
11
11
|
- Kept colorama/ but removed colorama/tests/.
|
12
|
-
- Copied LICENSE.txt and README.
|
13
|
-
- Converted all the files to LF EOL style.
|
12
|
+
- Copied LICENSE.txt and README.rst.
|
@@ -0,0 +1,346 @@
|
|
1
|
+
.. image:: https://img.shields.io/pypi/v/colorama.svg
|
2
|
+
:target: https://pypi.org/project/colorama/
|
3
|
+
:alt: Latest Version
|
4
|
+
|
5
|
+
.. image:: https://img.shields.io/pypi/pyversions/colorama.svg
|
6
|
+
:target: https://pypi.org/project/colorama/
|
7
|
+
:alt: Supported Python versions
|
8
|
+
|
9
|
+
.. image:: https://travis-ci.org/tartley/colorama.svg?branch=master
|
10
|
+
:target: https://travis-ci.org/tartley/colorama
|
11
|
+
:alt: Build Status
|
12
|
+
|
13
|
+
Download and docs:
|
14
|
+
https://pypi.org/project/colorama/
|
15
|
+
Source code & Development:
|
16
|
+
https://github.com/tartley/colorama
|
17
|
+
|
18
|
+
Description
|
19
|
+
===========
|
20
|
+
|
21
|
+
Makes ANSI escape character sequences (for producing colored terminal text and
|
22
|
+
cursor positioning) work under MS Windows.
|
23
|
+
|
24
|
+
ANSI escape character sequences have long been used to produce colored terminal
|
25
|
+
text and cursor positioning on Unix and Macs. Colorama makes this work on
|
26
|
+
Windows, too, by wrapping ``stdout``, stripping ANSI sequences it finds (which
|
27
|
+
would appear as gobbledygook in the output), and converting them into the
|
28
|
+
appropriate win32 calls to modify the state of the terminal. On other platforms,
|
29
|
+
Colorama does nothing.
|
30
|
+
|
31
|
+
Colorama also provides some shortcuts to help generate ANSI sequences
|
32
|
+
but works fine in conjunction with any other ANSI sequence generation library,
|
33
|
+
such as the venerable Termcolor (https://pypi.org/project/termcolor/)
|
34
|
+
or the fabulous Blessings (https://pypi.org/project/blessings/).
|
35
|
+
|
36
|
+
This has the upshot of providing a simple cross-platform API for printing
|
37
|
+
colored terminal text from Python, and has the happy side-effect that existing
|
38
|
+
applications or libraries which use ANSI sequences to produce colored output on
|
39
|
+
Linux or Macs can now also work on Windows, simply by calling
|
40
|
+
``colorama.init()``.
|
41
|
+
|
42
|
+
An alternative approach is to install ``ansi.sys`` on Windows machines, which
|
43
|
+
provides the same behaviour for all applications running in terminals. Colorama
|
44
|
+
is intended for situations where that isn't easy (e.g., maybe your app doesn't
|
45
|
+
have an installer.)
|
46
|
+
|
47
|
+
Demo scripts in the source code repository print some colored text using
|
48
|
+
ANSI sequences. Compare their output under Gnome-terminal's built in ANSI
|
49
|
+
handling, versus on Windows Command-Prompt using Colorama:
|
50
|
+
|
51
|
+
.. image:: https://github.com/tartley/colorama/raw/master/screenshots/ubuntu-demo.png
|
52
|
+
:width: 661
|
53
|
+
:height: 357
|
54
|
+
:alt: ANSI sequences on Ubuntu under gnome-terminal.
|
55
|
+
|
56
|
+
.. image:: https://github.com/tartley/colorama/raw/master/screenshots/windows-demo.png
|
57
|
+
:width: 668
|
58
|
+
:height: 325
|
59
|
+
:alt: Same ANSI sequences on Windows, using Colorama.
|
60
|
+
|
61
|
+
These screengrabs show that, on Windows, Colorama does not support ANSI 'dim
|
62
|
+
text'; it looks the same as 'normal text'.
|
63
|
+
|
64
|
+
|
65
|
+
License
|
66
|
+
=======
|
67
|
+
|
68
|
+
Copyright Jonathan Hartley 2013. BSD 3-Clause license; see LICENSE file.
|
69
|
+
|
70
|
+
|
71
|
+
Dependencies
|
72
|
+
============
|
73
|
+
|
74
|
+
None, other than Python. Tested on Python 2.7, 3.4, 3.5 and 3.6.
|
75
|
+
|
76
|
+
Usage
|
77
|
+
=====
|
78
|
+
|
79
|
+
Initialisation
|
80
|
+
--------------
|
81
|
+
|
82
|
+
Applications should initialise Colorama using:
|
83
|
+
|
84
|
+
.. code-block:: python
|
85
|
+
|
86
|
+
from colorama import init
|
87
|
+
init()
|
88
|
+
|
89
|
+
On Windows, calling ``init()`` will filter ANSI escape sequences out of any
|
90
|
+
text sent to ``stdout`` or ``stderr``, and replace them with equivalent Win32
|
91
|
+
calls.
|
92
|
+
|
93
|
+
On other platforms, calling ``init()`` has no effect (unless you request other
|
94
|
+
optional functionality; see "Init Keyword Args", below). By design, this permits
|
95
|
+
applications to call ``init()`` unconditionally on all platforms, after which
|
96
|
+
ANSI output should just work.
|
97
|
+
|
98
|
+
To stop using colorama before your program exits, simply call ``deinit()``.
|
99
|
+
This will restore ``stdout`` and ``stderr`` to their original values, so that
|
100
|
+
Colorama is disabled. To resume using Colorama again, call ``reinit()``; it is
|
101
|
+
cheaper to calling ``init()`` again (but does the same thing).
|
102
|
+
|
103
|
+
|
104
|
+
Colored Output
|
105
|
+
--------------
|
106
|
+
|
107
|
+
Cross-platform printing of colored text can then be done using Colorama's
|
108
|
+
constant shorthand for ANSI escape sequences:
|
109
|
+
|
110
|
+
.. code-block:: python
|
111
|
+
|
112
|
+
from colorama import Fore, Back, Style
|
113
|
+
print(Fore.RED + 'some red text')
|
114
|
+
print(Back.GREEN + 'and with a green background')
|
115
|
+
print(Style.DIM + 'and in dim text')
|
116
|
+
print(Style.RESET_ALL)
|
117
|
+
print('back to normal now')
|
118
|
+
|
119
|
+
...or simply by manually printing ANSI sequences from your own code:
|
120
|
+
|
121
|
+
.. code-block:: python
|
122
|
+
|
123
|
+
print('\033[31m' + 'some red text')
|
124
|
+
print('\033[39m') # and reset to default color
|
125
|
+
|
126
|
+
...or, Colorama can be used happily in conjunction with existing ANSI libraries
|
127
|
+
such as Termcolor:
|
128
|
+
|
129
|
+
.. code-block:: python
|
130
|
+
|
131
|
+
from colorama import init
|
132
|
+
from termcolor import colored
|
133
|
+
|
134
|
+
# use Colorama to make Termcolor work on Windows too
|
135
|
+
init()
|
136
|
+
|
137
|
+
# then use Termcolor for all colored text output
|
138
|
+
print(colored('Hello, World!', 'green', 'on_red'))
|
139
|
+
|
140
|
+
Available formatting constants are::
|
141
|
+
|
142
|
+
Fore: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, RESET.
|
143
|
+
Back: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, RESET.
|
144
|
+
Style: DIM, NORMAL, BRIGHT, RESET_ALL
|
145
|
+
|
146
|
+
``Style.RESET_ALL`` resets foreground, background, and brightness. Colorama will
|
147
|
+
perform this reset automatically on program exit.
|
148
|
+
|
149
|
+
|
150
|
+
Cursor Positioning
|
151
|
+
------------------
|
152
|
+
|
153
|
+
ANSI codes to reposition the cursor are supported. See ``demos/demo06.py`` for
|
154
|
+
an example of how to generate them.
|
155
|
+
|
156
|
+
|
157
|
+
Init Keyword Args
|
158
|
+
-----------------
|
159
|
+
|
160
|
+
``init()`` accepts some ``**kwargs`` to override default behaviour.
|
161
|
+
|
162
|
+
init(autoreset=False):
|
163
|
+
If you find yourself repeatedly sending reset sequences to turn off color
|
164
|
+
changes at the end of every print, then ``init(autoreset=True)`` will
|
165
|
+
automate that:
|
166
|
+
|
167
|
+
.. code-block:: python
|
168
|
+
|
169
|
+
from colorama import init
|
170
|
+
init(autoreset=True)
|
171
|
+
print(Fore.RED + 'some red text')
|
172
|
+
print('automatically back to default color again')
|
173
|
+
|
174
|
+
init(strip=None):
|
175
|
+
Pass ``True`` or ``False`` to override whether ansi codes should be
|
176
|
+
stripped from the output. The default behaviour is to strip if on Windows
|
177
|
+
or if output is redirected (not a tty).
|
178
|
+
|
179
|
+
init(convert=None):
|
180
|
+
Pass ``True`` or ``False`` to override whether to convert ANSI codes in the
|
181
|
+
output into win32 calls. The default behaviour is to convert if on Windows
|
182
|
+
and output is to a tty (terminal).
|
183
|
+
|
184
|
+
init(wrap=True):
|
185
|
+
On Windows, colorama works by replacing ``sys.stdout`` and ``sys.stderr``
|
186
|
+
with proxy objects, which override the ``.write()`` method to do their work.
|
187
|
+
If this wrapping causes you problems, then this can be disabled by passing
|
188
|
+
``init(wrap=False)``. The default behaviour is to wrap if ``autoreset`` or
|
189
|
+
``strip`` or ``convert`` are True.
|
190
|
+
|
191
|
+
When wrapping is disabled, colored printing on non-Windows platforms will
|
192
|
+
continue to work as normal. To do cross-platform colored output, you can
|
193
|
+
use Colorama's ``AnsiToWin32`` proxy directly:
|
194
|
+
|
195
|
+
.. code-block:: python
|
196
|
+
|
197
|
+
import sys
|
198
|
+
from colorama import init, AnsiToWin32
|
199
|
+
init(wrap=False)
|
200
|
+
stream = AnsiToWin32(sys.stderr).stream
|
201
|
+
|
202
|
+
# Python 2
|
203
|
+
print >>stream, Fore.BLUE + 'blue text on stderr'
|
204
|
+
|
205
|
+
# Python 3
|
206
|
+
print(Fore.BLUE + 'blue text on stderr', file=stream)
|
207
|
+
|
208
|
+
|
209
|
+
Status & Known Problems
|
210
|
+
=======================
|
211
|
+
|
212
|
+
I've personally only tested it on Windows XP (CMD, Console2), Ubuntu
|
213
|
+
(gnome-terminal, xterm), and OS X.
|
214
|
+
|
215
|
+
Some presumably valid ANSI sequences aren't recognised (see details below),
|
216
|
+
but to my knowledge nobody has yet complained about this. Puzzling.
|
217
|
+
|
218
|
+
See outstanding issues and wishlist:
|
219
|
+
https://github.com/tartley/colorama/issues
|
220
|
+
|
221
|
+
If anything doesn't work for you, or doesn't do what you expected or hoped for,
|
222
|
+
I'd love to hear about it on that issues list, would be delighted by patches,
|
223
|
+
and would be happy to grant commit access to anyone who submits a working patch
|
224
|
+
or two.
|
225
|
+
|
226
|
+
|
227
|
+
Recognised ANSI Sequences
|
228
|
+
=========================
|
229
|
+
|
230
|
+
ANSI sequences generally take the form:
|
231
|
+
|
232
|
+
ESC [ <param> ; <param> ... <command>
|
233
|
+
|
234
|
+
Where ``<param>`` is an integer, and ``<command>`` is a single letter. Zero or
|
235
|
+
more params are passed to a ``<command>``. If no params are passed, it is
|
236
|
+
generally synonymous with passing a single zero. No spaces exist in the
|
237
|
+
sequence; they have been inserted here simply to read more easily.
|
238
|
+
|
239
|
+
The only ANSI sequences that colorama converts into win32 calls are::
|
240
|
+
|
241
|
+
ESC [ 0 m # reset all (colors and brightness)
|
242
|
+
ESC [ 1 m # bright
|
243
|
+
ESC [ 2 m # dim (looks same as normal brightness)
|
244
|
+
ESC [ 22 m # normal brightness
|
245
|
+
|
246
|
+
# FOREGROUND:
|
247
|
+
ESC [ 30 m # black
|
248
|
+
ESC [ 31 m # red
|
249
|
+
ESC [ 32 m # green
|
250
|
+
ESC [ 33 m # yellow
|
251
|
+
ESC [ 34 m # blue
|
252
|
+
ESC [ 35 m # magenta
|
253
|
+
ESC [ 36 m # cyan
|
254
|
+
ESC [ 37 m # white
|
255
|
+
ESC [ 39 m # reset
|
256
|
+
|
257
|
+
# BACKGROUND
|
258
|
+
ESC [ 40 m # black
|
259
|
+
ESC [ 41 m # red
|
260
|
+
ESC [ 42 m # green
|
261
|
+
ESC [ 43 m # yellow
|
262
|
+
ESC [ 44 m # blue
|
263
|
+
ESC [ 45 m # magenta
|
264
|
+
ESC [ 46 m # cyan
|
265
|
+
ESC [ 47 m # white
|
266
|
+
ESC [ 49 m # reset
|
267
|
+
|
268
|
+
# cursor positioning
|
269
|
+
ESC [ y;x H # position cursor at x across, y down
|
270
|
+
ESC [ y;x f # position cursor at x across, y down
|
271
|
+
ESC [ n A # move cursor n lines up
|
272
|
+
ESC [ n B # move cursor n lines down
|
273
|
+
ESC [ n C # move cursor n characters forward
|
274
|
+
ESC [ n D # move cursor n characters backward
|
275
|
+
|
276
|
+
# clear the screen
|
277
|
+
ESC [ mode J # clear the screen
|
278
|
+
|
279
|
+
# clear the line
|
280
|
+
ESC [ mode K # clear the line
|
281
|
+
|
282
|
+
Multiple numeric params to the ``'m'`` command can be combined into a single
|
283
|
+
sequence::
|
284
|
+
|
285
|
+
ESC [ 36 ; 45 ; 1 m # bright cyan text on magenta background
|
286
|
+
|
287
|
+
All other ANSI sequences of the form ``ESC [ <param> ; <param> ... <command>``
|
288
|
+
are silently stripped from the output on Windows.
|
289
|
+
|
290
|
+
Any other form of ANSI sequence, such as single-character codes or alternative
|
291
|
+
initial characters, are not recognised or stripped. It would be cool to add
|
292
|
+
them though. Let me know if it would be useful for you, via the Issues on
|
293
|
+
GitHub.
|
294
|
+
|
295
|
+
|
296
|
+
Development
|
297
|
+
===========
|
298
|
+
|
299
|
+
Help and fixes welcome!
|
300
|
+
|
301
|
+
Running tests requires:
|
302
|
+
|
303
|
+
- Michael Foord's ``mock`` module to be installed.
|
304
|
+
- Tests are written using 2010-era updates to ``unittest``
|
305
|
+
|
306
|
+
To run tests::
|
307
|
+
|
308
|
+
python -m unittest discover -p *_test.py
|
309
|
+
|
310
|
+
This, like a few other handy commands, is captured in a ``Makefile``.
|
311
|
+
|
312
|
+
If you use nose to run the tests, you must pass the ``-s`` flag; otherwise,
|
313
|
+
``nosetests`` applies its own proxy to ``stdout``, which confuses the unit
|
314
|
+
tests.
|
315
|
+
|
316
|
+
|
317
|
+
Thanks
|
318
|
+
======
|
319
|
+
* Marc Schlaich (schlamar) for a ``setup.py`` fix for Python2.5.
|
320
|
+
* Marc Abramowitz, reported & fixed a crash on exit with closed ``stdout``,
|
321
|
+
providing a solution to issue #7's setuptools/distutils debate,
|
322
|
+
and other fixes.
|
323
|
+
* User 'eryksun', for guidance on correctly instantiating ``ctypes.windll``.
|
324
|
+
* Matthew McCormick for politely pointing out a longstanding crash on non-Win.
|
325
|
+
* Ben Hoyt, for a magnificent fix under 64-bit Windows.
|
326
|
+
* Jesse at Empty Square for submitting a fix for examples in the README.
|
327
|
+
* User 'jamessp', an observant documentation fix for cursor positioning.
|
328
|
+
* User 'vaal1239', Dave Mckee & Lackner Kristof for a tiny but much-needed Win7
|
329
|
+
fix.
|
330
|
+
* Julien Stuyck, for wisely suggesting Python3 compatible updates to README.
|
331
|
+
* Daniel Griffith for multiple fabulous patches.
|
332
|
+
* Oscar Lesta for a valuable fix to stop ANSI chars being sent to non-tty
|
333
|
+
output.
|
334
|
+
* Roger Binns, for many suggestions, valuable feedback, & bug reports.
|
335
|
+
* Tim Golden for thought and much appreciated feedback on the initial idea.
|
336
|
+
* User 'Zearin' for updates to the README file.
|
337
|
+
* John Szakmeister for adding support for light colors
|
338
|
+
* Charles Merriam for adding documentation to demos
|
339
|
+
* Jurko for a fix on 64-bit Windows CPython2.5 w/o ctypes
|
340
|
+
* Florian Bruhin for a fix when stdout or stderr are None
|
341
|
+
* Thomas Weininger for fixing ValueError on Windows
|
342
|
+
* Remi Rampin for better Github integration and fixes to the README file
|
343
|
+
* Simeon Visser for closing a file handle using 'with' and updating classifiers
|
344
|
+
to include Python 3.3 and 3.4
|
345
|
+
* Andy Neff for fixing RESET of LIGHT_EX colors.
|
346
|
+
* Jonathan Hartley for the initial idea and implementation.
|