libv8 7.4.288.28.0beta1 → 7.8.279.23.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 +0 -1
- data/lib/libv8/version.rb +1 -1
- data/vendor/depot_tools/annotated_gclient.py +2 -4
- data/vendor/depot_tools/auth.py +0 -2
- data/vendor/depot_tools/autoninja +1 -3
- data/vendor/depot_tools/autoninja.bat +1 -1
- data/vendor/depot_tools/autoninja.py +1 -3
- data/vendor/depot_tools/bb +1 -1
- data/vendor/depot_tools/bootstrap/win/manifest.txt +1 -1
- data/vendor/depot_tools/buildbucket.py +6 -8
- data/vendor/depot_tools/checkout.py +5 -7
- 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 +7 -9
- data/vendor/depot_tools/clang_format.py +1 -4
- data/vendor/depot_tools/clang_format_merge_driver.py +7 -9
- data/vendor/depot_tools/compile_single_file.py +1 -3
- data/vendor/depot_tools/dart_format.py +2 -4
- data/vendor/depot_tools/depot-tools-auth.py +8 -10
- data/vendor/depot_tools/fix_encoding.py +2 -5
- data/vendor/depot_tools/gclient-new-workdir.py +0 -2
- data/vendor/depot_tools/gclient.py +9 -8
- data/vendor/depot_tools/gclient_scm.py +28 -54
- data/vendor/depot_tools/gclient_utils.py +4 -14
- data/vendor/depot_tools/gerrit_util.py +6 -8
- data/vendor/depot_tools/git_cache.py +37 -53
- data/vendor/depot_tools/git_cl.py +42 -115
- data/vendor/depot_tools/git_drover.py +1 -3
- data/vendor/depot_tools/git_find_releases.py +6 -8
- data/vendor/depot_tools/git_footers.py +5 -7
- data/vendor/depot_tools/git_freezer.py +1 -3
- data/vendor/depot_tools/git_map_branches.py +5 -7
- data/vendor/depot_tools/git_mark_merge_base.py +6 -8
- data/vendor/depot_tools/git_nav_downstream.py +5 -7
- data/vendor/depot_tools/git_number.py +1 -3
- data/vendor/depot_tools/git_rebase_update.py +43 -38
- data/vendor/depot_tools/git_reparent_branch.py +6 -8
- data/vendor/depot_tools/git_upstream_diff.py +2 -4
- data/vendor/depot_tools/gn.py +4 -6
- 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 +22 -28
- 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 +6 -12
- data/vendor/depot_tools/man/html/git-new-branch.html +1 -1
- data/vendor/depot_tools/man/html/git-rebase-update.html +1 -20
- 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 +6 -10
- 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 +9 -15
- data/vendor/depot_tools/man/man1/git-new-branch.1 +3 -3
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +4 -14
- 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 +13 -7
- data/vendor/depot_tools/man/man7/depot_tools.7 +4 -4
- data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +27 -33
- data/vendor/depot_tools/man/src/filter_demo_output.py +1 -3
- data/vendor/depot_tools/man/src/git-rebase-update.txt +0 -7
- data/vendor/depot_tools/my_activity.py +11 -13
- data/vendor/depot_tools/my_reviews.py +29 -34
- data/vendor/depot_tools/ninjalog_uploader_wrapper.py +2 -4
- data/vendor/depot_tools/owners_finder.py +1 -3
- data/vendor/depot_tools/patch.py +1 -1
- data/vendor/depot_tools/post_build_ninja_summary.py +15 -17
- data/vendor/depot_tools/presubmit_canned_checks.py +1 -3
- data/vendor/depot_tools/presubmit_support.py +5 -10
- 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 +6 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +4 -2
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +6 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/unrecognized_commit_repo.json +5 -0
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/describe-failed.json +4 -2
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_file.json +5 -25
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_mode.json +5 -23
- data/vendor/depot_tools/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_verfile.json +5 -23
- data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +6 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.py +1 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +5 -1
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json +6 -1
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json +5 -0
- data/vendor/depot_tools/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json +6 -1
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/set_failure_hash_with_no_steps.json +3 -1
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json +6 -4
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json +6 -4
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_git_patch.json +6 -4
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_git_patch_luci.json +6 -4
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +6 -4
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch_new.json +6 -4
- data/vendor/depot_tools/rietveld.py +1 -3
- data/vendor/depot_tools/roll_dep.py +0 -2
- data/vendor/depot_tools/roll_dep_svn.py +11 -14
- data/vendor/depot_tools/scm.py +5 -10
- data/vendor/depot_tools/split_cl.py +11 -13
- data/vendor/depot_tools/subprocess2.py +1 -1
- data/vendor/depot_tools/third_party/colorama/LICENSE.txt +1 -0
- data/vendor/depot_tools/third_party/colorama/README.chromium +5 -4
- data/vendor/depot_tools/third_party/colorama/README.txt +304 -0
- data/vendor/depot_tools/third_party/colorama/__init__.py +4 -3
- data/vendor/depot_tools/third_party/colorama/ansi.py +30 -82
- data/vendor/depot_tools/third_party/colorama/ansitowin32.py +37 -105
- data/vendor/depot_tools/third_party/colorama/initialise.py +15 -39
- data/vendor/depot_tools/third_party/colorama/win32.py +28 -46
- data/vendor/depot_tools/third_party/colorama/winterm.py +31 -80
- data/vendor/depot_tools/third_party/upload.py +1 -1
- data/vendor/depot_tools/upload_to_google_storage.py +6 -8
- data/vendor/depot_tools/vpython +1 -1
- data/vendor/depot_tools/watchlists.py +3 -5
- data/vendor/depot_tools/weekly +2 -4
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +36 -38
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +8 -10
- data/vendor/depot_tools/wtf +3 -5
- metadata +3 -3
- data/vendor/depot_tools/third_party/colorama/README.rst +0 -346
@@ -5,27 +5,24 @@ STDOUT = -11
|
|
5
5
|
STDERR = -12
|
6
6
|
|
7
7
|
try:
|
8
|
-
import
|
9
|
-
from ctypes import LibraryLoader
|
10
|
-
windll = LibraryLoader(ctypes.WinDLL)
|
8
|
+
from ctypes import windll
|
11
9
|
from ctypes import wintypes
|
12
|
-
except
|
10
|
+
except ImportError:
|
13
11
|
windll = None
|
14
12
|
SetConsoleTextAttribute = lambda *_: None
|
15
|
-
winapi_test = lambda *_: None
|
16
13
|
else:
|
17
|
-
from ctypes import
|
18
|
-
|
19
|
-
|
14
|
+
from ctypes import (
|
15
|
+
byref, Structure, c_char, c_short, c_uint32, c_ushort, POINTER
|
16
|
+
)
|
20
17
|
|
21
18
|
class CONSOLE_SCREEN_BUFFER_INFO(Structure):
|
22
19
|
"""struct in wincon.h."""
|
23
20
|
_fields_ = [
|
24
|
-
("dwSize",
|
25
|
-
("dwCursorPosition",
|
21
|
+
("dwSize", wintypes._COORD),
|
22
|
+
("dwCursorPosition", wintypes._COORD),
|
26
23
|
("wAttributes", wintypes.WORD),
|
27
24
|
("srWindow", wintypes.SMALL_RECT),
|
28
|
-
("dwMaximumWindowSize",
|
25
|
+
("dwMaximumWindowSize", wintypes._COORD),
|
29
26
|
]
|
30
27
|
def __str__(self):
|
31
28
|
return '(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)' % (
|
@@ -59,7 +56,7 @@ else:
|
|
59
56
|
_SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition
|
60
57
|
_SetConsoleCursorPosition.argtypes = [
|
61
58
|
wintypes.HANDLE,
|
62
|
-
|
59
|
+
wintypes._COORD,
|
63
60
|
]
|
64
61
|
_SetConsoleCursorPosition.restype = wintypes.BOOL
|
65
62
|
|
@@ -68,7 +65,7 @@ else:
|
|
68
65
|
wintypes.HANDLE,
|
69
66
|
c_char,
|
70
67
|
wintypes.DWORD,
|
71
|
-
|
68
|
+
wintypes._COORD,
|
72
69
|
POINTER(wintypes.DWORD),
|
73
70
|
]
|
74
71
|
_FillConsoleOutputCharacterA.restype = wintypes.BOOL
|
@@ -78,59 +75,47 @@ else:
|
|
78
75
|
wintypes.HANDLE,
|
79
76
|
wintypes.WORD,
|
80
77
|
wintypes.DWORD,
|
81
|
-
|
78
|
+
wintypes._COORD,
|
82
79
|
POINTER(wintypes.DWORD),
|
83
80
|
]
|
84
81
|
_FillConsoleOutputAttribute.restype = wintypes.BOOL
|
85
82
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
_SetConsoleTitleW.restype = wintypes.BOOL
|
91
|
-
|
92
|
-
def _winapi_test(handle):
|
93
|
-
csbi = CONSOLE_SCREEN_BUFFER_INFO()
|
94
|
-
success = _GetConsoleScreenBufferInfo(
|
95
|
-
handle, byref(csbi))
|
96
|
-
return bool(success)
|
97
|
-
|
98
|
-
def winapi_test():
|
99
|
-
return any(_winapi_test(h) for h in
|
100
|
-
(_GetStdHandle(STDOUT), _GetStdHandle(STDERR)))
|
83
|
+
handles = {
|
84
|
+
STDOUT: _GetStdHandle(STDOUT),
|
85
|
+
STDERR: _GetStdHandle(STDERR),
|
86
|
+
}
|
101
87
|
|
102
88
|
def GetConsoleScreenBufferInfo(stream_id=STDOUT):
|
103
|
-
handle =
|
89
|
+
handle = handles[stream_id]
|
104
90
|
csbi = CONSOLE_SCREEN_BUFFER_INFO()
|
105
91
|
success = _GetConsoleScreenBufferInfo(
|
106
92
|
handle, byref(csbi))
|
107
93
|
return csbi
|
108
94
|
|
109
95
|
def SetConsoleTextAttribute(stream_id, attrs):
|
110
|
-
handle =
|
96
|
+
handle = handles[stream_id]
|
111
97
|
return _SetConsoleTextAttribute(handle, attrs)
|
112
98
|
|
113
|
-
def SetConsoleCursorPosition(stream_id, position
|
114
|
-
position =
|
99
|
+
def SetConsoleCursorPosition(stream_id, position):
|
100
|
+
position = wintypes._COORD(*position)
|
115
101
|
# If the position is out of range, do nothing.
|
116
102
|
if position.Y <= 0 or position.X <= 0:
|
117
103
|
return
|
118
104
|
# Adjust for Windows' SetConsoleCursorPosition:
|
119
105
|
# 1. being 0-based, while ANSI is 1-based.
|
120
106
|
# 2. expecting (x,y), while ANSI uses (y,x).
|
121
|
-
adjusted_position =
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
adjusted_position.X += sr.Left
|
107
|
+
adjusted_position = wintypes._COORD(position.Y - 1, position.X - 1)
|
108
|
+
# Adjust for viewport's scroll position
|
109
|
+
sr = GetConsoleScreenBufferInfo(STDOUT).srWindow
|
110
|
+
adjusted_position.Y += sr.Top
|
111
|
+
adjusted_position.X += sr.Left
|
127
112
|
# Resume normal processing
|
128
|
-
handle =
|
113
|
+
handle = handles[stream_id]
|
129
114
|
return _SetConsoleCursorPosition(handle, adjusted_position)
|
130
115
|
|
131
116
|
def FillConsoleOutputCharacter(stream_id, char, length, start):
|
132
|
-
handle =
|
133
|
-
char = c_char(char
|
117
|
+
handle = handles[stream_id]
|
118
|
+
char = c_char(char)
|
134
119
|
length = wintypes.DWORD(length)
|
135
120
|
num_written = wintypes.DWORD(0)
|
136
121
|
# Note that this is hard-coded for ANSI (vs wide) bytes.
|
@@ -140,13 +125,10 @@ else:
|
|
140
125
|
|
141
126
|
def FillConsoleOutputAttribute(stream_id, attr, length, start):
|
142
127
|
''' FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )'''
|
143
|
-
handle =
|
128
|
+
handle = handles[stream_id]
|
144
129
|
attribute = wintypes.WORD(attr)
|
145
130
|
length = wintypes.DWORD(length)
|
146
131
|
num_written = wintypes.DWORD(0)
|
147
132
|
# Note that this is hard-coded for ANSI (vs wide) bytes.
|
148
133
|
return _FillConsoleOutputAttribute(
|
149
134
|
handle, attribute, length, start, byref(num_written))
|
150
|
-
|
151
|
-
def SetConsoleTitle(title):
|
152
|
-
return _SetConsoleTitleW(title)
|
@@ -15,9 +15,9 @@ class WinColor(object):
|
|
15
15
|
|
16
16
|
# from wincon.h
|
17
17
|
class WinStyle(object):
|
18
|
-
NORMAL
|
19
|
-
BRIGHT
|
20
|
-
|
18
|
+
NORMAL = 0x00 # dim text, dim background
|
19
|
+
BRIGHT = 0x08 # bright text, dim background
|
20
|
+
|
21
21
|
|
22
22
|
class WinTerm(object):
|
23
23
|
|
@@ -27,45 +27,29 @@ class WinTerm(object):
|
|
27
27
|
self._default_fore = self._fore
|
28
28
|
self._default_back = self._back
|
29
29
|
self._default_style = self._style
|
30
|
-
# In order to emulate LIGHT_EX in windows, we borrow the BRIGHT style.
|
31
|
-
# So that LIGHT_EX colors and BRIGHT style do not clobber each other,
|
32
|
-
# we track them separately, since LIGHT_EX is overwritten by Fore/Back
|
33
|
-
# and BRIGHT is overwritten by Style codes.
|
34
|
-
self._light = 0
|
35
30
|
|
36
31
|
def get_attrs(self):
|
37
|
-
return self._fore + self._back * 16 +
|
32
|
+
return self._fore + self._back * 16 + self._style
|
38
33
|
|
39
34
|
def set_attrs(self, value):
|
40
35
|
self._fore = value & 7
|
41
36
|
self._back = (value >> 4) & 7
|
42
|
-
self._style = value &
|
37
|
+
self._style = value & WinStyle.BRIGHT
|
43
38
|
|
44
39
|
def reset_all(self, on_stderr=None):
|
45
40
|
self.set_attrs(self._default)
|
46
41
|
self.set_console(attrs=self._default)
|
47
|
-
self._light = 0
|
48
42
|
|
49
|
-
def fore(self, fore=None,
|
43
|
+
def fore(self, fore=None, on_stderr=False):
|
50
44
|
if fore is None:
|
51
45
|
fore = self._default_fore
|
52
46
|
self._fore = fore
|
53
|
-
# Emulate LIGHT_EX with BRIGHT Style
|
54
|
-
if light:
|
55
|
-
self._light |= WinStyle.BRIGHT
|
56
|
-
else:
|
57
|
-
self._light &= ~WinStyle.BRIGHT
|
58
47
|
self.set_console(on_stderr=on_stderr)
|
59
48
|
|
60
|
-
def back(self, back=None,
|
49
|
+
def back(self, back=None, on_stderr=False):
|
61
50
|
if back is None:
|
62
51
|
back = self._default_back
|
63
52
|
self._back = back
|
64
|
-
# Emulate LIGHT_EX with BRIGHT_BACKGROUND Style
|
65
|
-
if light:
|
66
|
-
self._light |= WinStyle.BRIGHT_BACKGROUND
|
67
|
-
else:
|
68
|
-
self._light &= ~WinStyle.BRIGHT_BACKGROUND
|
69
53
|
self.set_console(on_stderr=on_stderr)
|
70
54
|
|
71
55
|
def style(self, style=None, on_stderr=False):
|
@@ -89,81 +73,48 @@ class WinTerm(object):
|
|
89
73
|
position.X += 1
|
90
74
|
position.Y += 1
|
91
75
|
return position
|
92
|
-
|
76
|
+
|
93
77
|
def set_cursor_position(self, position=None, on_stderr=False):
|
94
78
|
if position is None:
|
95
|
-
#
|
96
|
-
#
|
79
|
+
#I'm not currently tracking the position, so there is no default.
|
80
|
+
#position = self.get_position()
|
97
81
|
return
|
98
82
|
handle = win32.STDOUT
|
99
83
|
if on_stderr:
|
100
84
|
handle = win32.STDERR
|
101
85
|
win32.SetConsoleCursorPosition(handle, position)
|
102
86
|
|
103
|
-
def
|
87
|
+
def cursor_up(self, num_rows=0, on_stderr=False):
|
88
|
+
if num_rows == 0:
|
89
|
+
return
|
104
90
|
handle = win32.STDOUT
|
105
91
|
if on_stderr:
|
106
92
|
handle = win32.STDERR
|
107
93
|
position = self.get_position(handle)
|
108
|
-
adjusted_position = (position.Y
|
109
|
-
|
94
|
+
adjusted_position = (position.Y - num_rows, position.X)
|
95
|
+
self.set_cursor_position(adjusted_position, on_stderr)
|
110
96
|
|
111
|
-
def
|
112
|
-
# 0 should clear from the cursor to the end of the screen.
|
97
|
+
def erase_data(self, mode=0, on_stderr=False):
|
98
|
+
# 0 (or None) should clear from the cursor to the end of the screen.
|
113
99
|
# 1 should clear from the cursor to the beginning of the screen.
|
114
|
-
# 2 should clear the entire screen
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
cells_in_screen = csbi.dwSize.X * csbi.dwSize.Y
|
121
|
-
# get number of character cells before current cursor position
|
122
|
-
cells_before_cursor = csbi.dwSize.X * csbi.dwCursorPosition.Y + csbi.dwCursorPosition.X
|
123
|
-
if mode == 0:
|
124
|
-
from_coord = csbi.dwCursorPosition
|
125
|
-
cells_to_erase = cells_in_screen - cells_before_cursor
|
126
|
-
elif mode == 1:
|
127
|
-
from_coord = win32.COORD(0, 0)
|
128
|
-
cells_to_erase = cells_before_cursor
|
129
|
-
elif mode == 2:
|
130
|
-
from_coord = win32.COORD(0, 0)
|
131
|
-
cells_to_erase = cells_in_screen
|
132
|
-
else:
|
133
|
-
# invalid mode
|
100
|
+
# 2 should clear the entire screen. (And maybe move cursor to (1,1)?)
|
101
|
+
#
|
102
|
+
# At the moment, I only support mode 2. From looking at the API, it
|
103
|
+
# should be possible to calculate a different number of bytes to clear,
|
104
|
+
# and to do so relative to the cursor position.
|
105
|
+
if mode[0] not in (2,):
|
134
106
|
return
|
135
|
-
# fill the entire screen with blanks
|
136
|
-
win32.FillConsoleOutputCharacter(handle, ' ', cells_to_erase, from_coord)
|
137
|
-
# now set the buffer's attributes accordingly
|
138
|
-
win32.FillConsoleOutputAttribute(handle, self.get_attrs(), cells_to_erase, from_coord)
|
139
|
-
if mode == 2:
|
140
|
-
# put the cursor where needed
|
141
|
-
win32.SetConsoleCursorPosition(handle, (1, 1))
|
142
|
-
|
143
|
-
def erase_line(self, mode=0, on_stderr=False):
|
144
|
-
# 0 should clear from the cursor to the end of the line.
|
145
|
-
# 1 should clear from the cursor to the beginning of the line.
|
146
|
-
# 2 should clear the entire line.
|
147
107
|
handle = win32.STDOUT
|
148
108
|
if on_stderr:
|
149
109
|
handle = win32.STDERR
|
110
|
+
# here's where we'll home the cursor
|
111
|
+
coord_screen = win32.COORD(0,0)
|
150
112
|
csbi = win32.GetConsoleScreenBufferInfo(handle)
|
151
|
-
|
152
|
-
|
153
|
-
cells_to_erase = csbi.dwSize.X - csbi.dwCursorPosition.X
|
154
|
-
elif mode == 1:
|
155
|
-
from_coord = win32.COORD(0, csbi.dwCursorPosition.Y)
|
156
|
-
cells_to_erase = csbi.dwCursorPosition.X
|
157
|
-
elif mode == 2:
|
158
|
-
from_coord = win32.COORD(0, csbi.dwCursorPosition.Y)
|
159
|
-
cells_to_erase = csbi.dwSize.X
|
160
|
-
else:
|
161
|
-
# invalid mode
|
162
|
-
return
|
113
|
+
# get the number of character cells in the current buffer
|
114
|
+
dw_con_size = csbi.dwSize.X * csbi.dwSize.Y
|
163
115
|
# fill the entire screen with blanks
|
164
|
-
win32.FillConsoleOutputCharacter(handle, ' ',
|
116
|
+
win32.FillConsoleOutputCharacter(handle, ' ', dw_con_size, coord_screen)
|
165
117
|
# now set the buffer's attributes accordingly
|
166
|
-
win32.FillConsoleOutputAttribute(handle, self.get_attrs(),
|
167
|
-
|
168
|
-
|
169
|
-
win32.SetConsoleTitle(title)
|
118
|
+
win32.FillConsoleOutputAttribute(handle, self.get_attrs(), dw_con_size, coord_screen );
|
119
|
+
# put the cursor at (0, 0)
|
120
|
+
win32.SetConsoleCursorPosition(handle, (coord_screen.X, coord_screen.Y))
|
@@ -5,8 +5,6 @@
|
|
5
5
|
|
6
6
|
"""Uploads files to Google Storage content addressed."""
|
7
7
|
|
8
|
-
from __future__ import print_function
|
9
|
-
|
10
8
|
import hashlib
|
11
9
|
import optparse
|
12
10
|
import os
|
@@ -172,7 +170,7 @@ def upload_to_google_storage(
|
|
172
170
|
with open(filename + '.sha1', 'rb') as f:
|
173
171
|
sha1_file = f.read(1024)
|
174
172
|
if not re.match('^([a-z0-9]{40})$', sha1_file):
|
175
|
-
print
|
173
|
+
print >> sys.stderr, 'Invalid sha1 hash file %s.sha1' % filename
|
176
174
|
return 1
|
177
175
|
upload_queue.put((filename, sha1_file))
|
178
176
|
continue
|
@@ -193,19 +191,19 @@ def upload_to_google_storage(
|
|
193
191
|
printer_thread.join()
|
194
192
|
|
195
193
|
# Print timing information.
|
196
|
-
print
|
197
|
-
len(input_filenames), hashing_duration)
|
198
|
-
print
|
194
|
+
print 'Hashing %s files took %1f seconds' % (
|
195
|
+
len(input_filenames), hashing_duration)
|
196
|
+
print 'Uploading took %1f seconds' % (time.time() - upload_timer)
|
199
197
|
|
200
198
|
# See if we ran into any errors.
|
201
199
|
max_ret_code = 0
|
202
200
|
for ret_code, message in ret_codes.queue:
|
203
201
|
max_ret_code = max(ret_code, max_ret_code)
|
204
202
|
if message:
|
205
|
-
print
|
203
|
+
print >> sys.stderr, message
|
206
204
|
|
207
205
|
if not max_ret_code:
|
208
|
-
print
|
206
|
+
print 'Success!'
|
209
207
|
|
210
208
|
return max_ret_code
|
211
209
|
|
data/vendor/depot_tools/vpython
CHANGED
@@ -17,8 +17,6 @@ the watchers for files given on the command line. This is useful to verify
|
|
17
17
|
changes to WATCHLISTS files.
|
18
18
|
"""
|
19
19
|
|
20
|
-
from __future__ import print_function
|
21
|
-
|
22
20
|
import logging
|
23
21
|
import os
|
24
22
|
import re
|
@@ -128,12 +126,12 @@ class Watchlists(object):
|
|
128
126
|
def main(argv):
|
129
127
|
# Confirm that watchlists can be parsed and spew out the watchers
|
130
128
|
if len(argv) < 2:
|
131
|
-
print
|
132
|
-
print
|
129
|
+
print "Usage (from the base of repo):"
|
130
|
+
print " %s [file-1] [file-2] ...." % argv[0]
|
133
131
|
return 1
|
134
132
|
wl = Watchlists(os.getcwd())
|
135
133
|
watchers = wl.GetWatchersForPaths(argv[1:])
|
136
|
-
print
|
134
|
+
print watchers
|
137
135
|
|
138
136
|
|
139
137
|
if __name__ == '__main__':
|
data/vendor/depot_tools/weekly
CHANGED
@@ -6,8 +6,6 @@
|
|
6
6
|
"""Display log of checkins of one particular developer since a particular
|
7
7
|
date. Only works on git dependencies at the moment."""
|
8
8
|
|
9
|
-
from __future__ import print_function
|
10
|
-
|
11
9
|
import gclient_utils
|
12
10
|
import optparse
|
13
11
|
import os
|
@@ -27,8 +25,8 @@ def show_log(path, authors, since='1 week ago'):
|
|
27
25
|
stdout=subprocess.PIPE).communicate()[0].rstrip()
|
28
26
|
|
29
27
|
if len(status.splitlines()) > 0:
|
30
|
-
print
|
31
|
-
print
|
28
|
+
print '---------- %s ----------' % path
|
29
|
+
print status
|
32
30
|
|
33
31
|
|
34
32
|
def main():
|
@@ -26,8 +26,6 @@ future when a hypothetical VS2015 is released, the 2013 script will be
|
|
26
26
|
maintained, and a new 2015 script would be added.
|
27
27
|
"""
|
28
28
|
|
29
|
-
from __future__ import print_function
|
30
|
-
|
31
29
|
import hashlib
|
32
30
|
import json
|
33
31
|
import optparse
|
@@ -54,12 +52,12 @@ elif sys.platform == "cygwin":
|
|
54
52
|
try:
|
55
53
|
import cygwinreg as winreg
|
56
54
|
except ImportError:
|
57
|
-
print
|
58
|
-
print
|
59
|
-
print
|
60
|
-
print
|
61
|
-
print
|
62
|
-
print
|
55
|
+
print ''
|
56
|
+
print 'CygWin does not natively support winreg but a replacement exists.'
|
57
|
+
print 'https://pypi.python.org/pypi/cygwinreg/'
|
58
|
+
print ''
|
59
|
+
print 'Try: easy_install cygwinreg'
|
60
|
+
print ''
|
63
61
|
raise
|
64
62
|
|
65
63
|
BASEDIR = os.path.dirname(os.path.abspath(__file__))
|
@@ -146,25 +144,25 @@ def CalculateHash(root, expected_hash):
|
|
146
144
|
timestamps_data_files.append(f[0])
|
147
145
|
missing_files = [f for f in timestamps_data_files if f not in file_list]
|
148
146
|
if len(missing_files):
|
149
|
-
print('%d files missing from the %s version of the toolchain:' %
|
147
|
+
print ('%d files missing from the %s version of the toolchain:' %
|
150
148
|
(len(missing_files), expected_hash))
|
151
149
|
for f in missing_files[:10]:
|
152
|
-
print
|
150
|
+
print '\t%s' % f
|
153
151
|
if len(missing_files) > 10:
|
154
|
-
print
|
152
|
+
print '\t...'
|
155
153
|
extra_files = [f for f in file_list if f not in timestamps_data_files]
|
156
154
|
if len(extra_files):
|
157
|
-
print('%d extra files in the %s version of the toolchain:' %
|
155
|
+
print ('%d extra files in the %s version of the toolchain:' %
|
158
156
|
(len(extra_files), expected_hash))
|
159
157
|
for f in extra_files[:10]:
|
160
|
-
print
|
158
|
+
print '\t%s' % f
|
161
159
|
if len(extra_files) > 10:
|
162
|
-
print
|
160
|
+
print '\t...'
|
163
161
|
if matches:
|
164
162
|
return timestamps_data['sha1']
|
165
163
|
|
166
164
|
# Make long hangs when updating the toolchain less mysterious.
|
167
|
-
print
|
165
|
+
print 'Calculating hash of toolchain in %s. Please wait...' % full_root_path
|
168
166
|
sys.stdout.flush()
|
169
167
|
digest = hashlib.sha1()
|
170
168
|
for path in file_list:
|
@@ -191,7 +189,7 @@ def CalculateToolchainHashes(root, remove_corrupt_toolchains):
|
|
191
189
|
for d in dir_list:
|
192
190
|
toolchain_hash = CalculateHash(root, d)
|
193
191
|
if toolchain_hash != d:
|
194
|
-
print('The hash of a version of the toolchain has an unexpected value ('
|
192
|
+
print ('The hash of a version of the toolchain has an unexpected value ('
|
195
193
|
'%s instead of %s)%s.' % (toolchain_hash, d,
|
196
194
|
', removing it' if remove_corrupt_toolchains else ''))
|
197
195
|
if remove_corrupt_toolchains:
|
@@ -261,23 +259,23 @@ def RequestGsAuthentication():
|
|
261
259
|
Googler. This allows much faster downloads, and pulling (old) toolchains
|
262
260
|
that match src/ revisions.
|
263
261
|
"""
|
264
|
-
print
|
265
|
-
print
|
266
|
-
print
|
267
|
-
print
|
268
|
-
print
|
269
|
-
print
|
270
|
-
print
|
271
|
-
print
|
272
|
-
print
|
273
|
-
print
|
274
|
-
print
|
275
|
-
print
|
276
|
-
print
|
277
|
-
print
|
278
|
-
print
|
279
|
-
print
|
280
|
-
print
|
262
|
+
print 'Access to gs://chrome-wintoolchain/ not configured.'
|
263
|
+
print '-----------------------------------------------------------------'
|
264
|
+
print
|
265
|
+
print 'You appear to be a Googler.'
|
266
|
+
print
|
267
|
+
print 'I\'m sorry for the hassle, but you need to do a one-time manual'
|
268
|
+
print 'authentication. Please run:'
|
269
|
+
print
|
270
|
+
print ' download_from_google_storage --config'
|
271
|
+
print
|
272
|
+
print 'and follow the instructions.'
|
273
|
+
print
|
274
|
+
print 'NOTE 1: Use your google.com credentials, not chromium.org.'
|
275
|
+
print 'NOTE 2: Enter 0 when asked for a "project-id".'
|
276
|
+
print
|
277
|
+
print '-----------------------------------------------------------------'
|
278
|
+
print
|
281
279
|
sys.stdout.flush()
|
282
280
|
sys.exit(1)
|
283
281
|
|
@@ -291,7 +289,7 @@ def DelayBeforeRemoving(target_dir):
|
|
291
289
|
'\rRemoving old toolchain in %ds... (Ctrl-C to cancel)' % i)
|
292
290
|
sys.stdout.flush()
|
293
291
|
time.sleep(1)
|
294
|
-
print
|
292
|
+
print
|
295
293
|
|
296
294
|
|
297
295
|
def DownloadUsingHttp(filename):
|
@@ -398,7 +396,7 @@ def RemoveUnusedToolchains(root):
|
|
398
396
|
os.remove(full_path)
|
399
397
|
|
400
398
|
for d in dirs_to_remove:
|
401
|
-
print('Removing %s as it doesn\'t correspond to any known toolchain.' %
|
399
|
+
print ('Removing %s as it doesn\'t correspond to any known toolchain.' %
|
402
400
|
os.path.join(root, d))
|
403
401
|
# Use the RemoveToolchain function to remove these directories as they might
|
404
402
|
# contain an older version of the toolchain.
|
@@ -410,7 +408,7 @@ def RemoveUnusedToolchains(root):
|
|
410
408
|
for toolchain in valid_toolchains:
|
411
409
|
toolchain_age_in_sec = time.time() - toolchain[0]
|
412
410
|
if toolchain_age_in_sec > toolchain_expiration_time:
|
413
|
-
print('Removing version %s of the Win toolchain as it hasn\'t been used'
|
411
|
+
print ('Removing version %s of the Win toolchain as it hasn\'t been used'
|
414
412
|
' in the past %d days.' % (toolchain[1],
|
415
413
|
toolchain_age_in_sec / 60 / 60 / 24))
|
416
414
|
RemoveToolchain(root, toolchain[1], True)
|
@@ -571,10 +569,10 @@ def main():
|
|
571
569
|
if got_new_toolchain:
|
572
570
|
current_hashes = CalculateToolchainHashes(target_dir, False)
|
573
571
|
if desired_hash not in current_hashes:
|
574
|
-
print(
|
572
|
+
print >> sys.stderr, (
|
575
573
|
'Got wrong hash after pulling a new toolchain. '
|
576
574
|
'Wanted \'%s\', got one of \'%s\'.' % (
|
577
|
-
desired_hash, ', '.join(current_hashes))
|
575
|
+
desired_hash, ', '.join(current_hashes)))
|
578
576
|
return 1
|
579
577
|
SaveTimestampsAndHash(target_dir, desired_hash)
|
580
578
|
|