libv8 5.1.281.59.1 → 5.2.361.43.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -7
- data/CHANGELOG.md +9 -1
- data/README.md +41 -23
- data/Rakefile +1 -1
- data/ext/libv8/builder.rb +1 -1
- data/ext/libv8/compiler/apple_llvm.rb +5 -4
- data/ext/libv8/compiler/clang.rb +5 -4
- data/ext/libv8/compiler/gcc.rb +5 -4
- data/ext/libv8/compiler/generic_compiler.rb +11 -1
- data/lib/libv8/version.rb +1 -1
- data/patches/0001-Build-a-standalone-static-library.patch +26 -0
- data/patches/{0002-Disable-building-tests.patch → 0002-Don-t-compile-unnecessary-stuff.patch} +31 -34
- data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +10 -10
- data/patches/0004-Reinterpret-thread-hash-for-FreeBSD-too.patch +25 -0
- data/release/armhf-linux/Vagrantfile +95 -0
- data/release/armhf-linux/initrd.img +0 -0
- data/release/armhf-linux/vmlinuz +0 -0
- data/release/{x86_64-freebsd10 → x86_64-freebsd-10}/Vagrantfile +3 -1
- data/spec/compiler/apple_llvm_spec.rb +10 -3
- data/spec/compiler/clang_spec.rb +7 -0
- data/spec/compiler_spec.rb +1 -1
- data/spec/support/compiler_helpers.rb +3 -1
- data/vendor/depot_tools/{README → README.md} +33 -12
- data/vendor/depot_tools/checkout.py +7 -2
- data/vendor/depot_tools/cit.py +51 -13
- data/vendor/depot_tools/cpplint.py +27 -5
- data/vendor/depot_tools/git_cl.py +370 -290
- data/vendor/depot_tools/git_common.py +133 -28
- data/vendor/depot_tools/git_drover.py +29 -2
- data/vendor/depot_tools/git_map.py +2 -2
- data/vendor/depot_tools/git_map_branches.py +9 -5
- data/vendor/depot_tools/git_rebase_update.py +3 -3
- data/vendor/depot_tools/git_upstream_diff.py +1 -1
- data/vendor/depot_tools/infra/config/OWNERS +1 -0
- data/vendor/depot_tools/infra/config/cq.cfg +8 -3
- data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
- data/vendor/depot_tools/man/html/depot_tools.html +10 -2
- data/vendor/depot_tools/man/html/depot_tools_tutorial.html +14 -15
- data/vendor/depot_tools/man/html/git-auto-svn.html +2 -2
- data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +2 -11
- data/vendor/depot_tools/man/html/git-drover.html +19 -17
- data/vendor/depot_tools/man/html/git-footers.html +2 -2
- data/vendor/depot_tools/man/html/git-freeze.html +17 -4
- data/vendor/depot_tools/man/html/git-hyper-blame.html +2 -2
- data/vendor/depot_tools/man/html/git-map-branches.html +2 -2
- data/vendor/depot_tools/man/html/git-map.html +3 -3
- data/vendor/depot_tools/man/html/git-mark-merge-base.html +2 -2
- data/vendor/depot_tools/man/html/git-nav-downstream.html +7 -7
- data/vendor/depot_tools/man/html/git-nav-upstream.html +4 -4
- data/vendor/depot_tools/man/html/git-new-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-rebase-update.html +2 -2
- data/vendor/depot_tools/man/html/git-rename-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-reparent-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-retry.html +2 -2
- data/vendor/depot_tools/man/html/git-squash-branch.html +4 -4
- data/vendor/depot_tools/man/html/git-thaw.html +2 -2
- data/vendor/depot_tools/man/html/git-upstream-diff.html +2 -2
- data/vendor/depot_tools/man/man1/git-auto-svn.1 +4 -4
- data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +5 -14
- data/vendor/depot_tools/man/man1/git-drover.1 +21 -19
- data/vendor/depot_tools/man/man1/git-footers.1 +5 -5
- data/vendor/depot_tools/man/man1/git-freeze.1 +12 -6
- data/vendor/depot_tools/man/man1/git-hyper-blame.1 +4 -4
- data/vendor/depot_tools/man/man1/git-map-branches.1 +5 -7
- data/vendor/depot_tools/man/man1/git-map.1 +5 -5
- data/vendor/depot_tools/man/man1/git-mark-merge-base.1 +4 -4
- data/vendor/depot_tools/man/man1/git-nav-downstream.1 +9 -9
- data/vendor/depot_tools/man/man1/git-nav-upstream.1 +6 -6
- data/vendor/depot_tools/man/man1/git-new-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +4 -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 +6 -6
- data/vendor/depot_tools/man/man1/git-thaw.1 +4 -4
- data/vendor/depot_tools/man/man1/git-upstream-diff.1 +4 -4
- data/vendor/depot_tools/man/man7/depot_tools.7 +9 -4
- data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +14 -15
- data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +1 -2
- data/vendor/depot_tools/man/src/git-freeze.txt +15 -0
- data/vendor/depot_tools/man/src/make_docs.sh +4 -4
- data/vendor/depot_tools/owners.py +50 -46
- data/vendor/depot_tools/owners_finder.py +6 -19
- data/vendor/depot_tools/presubmit_canned_checks.py +2 -1
- data/vendor/depot_tools/presubmit_support.py +8 -10
- data/vendor/depot_tools/recipe_modules/bot_update/api.py +69 -55
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +1 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +1 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +1 -0
- data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +2 -0
- data/vendor/depot_tools/recipe_modules/gclient/api.py +0 -17
- data/vendor/depot_tools/recipe_modules/gclient/config.py +9 -8
- data/vendor/depot_tools/recipe_modules/gclient/example.py +1 -1
- data/vendor/depot_tools/recipe_modules/git/api.py +20 -4
- data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +1 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +1 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/git-cache-checkout.json +189 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +2 -1
- data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +1 -0
- data/vendor/depot_tools/recipe_modules/git/example.py +6 -1
- data/vendor/depot_tools/recipe_modules/git_cl/api.py +13 -0
- data/vendor/depot_tools/recipe_modules/git_cl/example.expected/basic.json +17 -0
- data/vendor/depot_tools/recipe_modules/git_cl/example.py +3 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.py +1 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +23 -10
- data/vendor/depot_tools/recipe_modules/tryserver/api.py +5 -3
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +1 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +1 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +1 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_svn_patch.json +1 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +3 -1
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +3 -1
- data/vendor/depot_tools/recipes.py +56 -27
- data/vendor/depot_tools/rietveld.py +10 -0
- data/vendor/depot_tools/third_party/httplib2/README.chromium +3 -3
- data/vendor/depot_tools/third_party/httplib2/__init__.py +31 -15
- data/vendor/depot_tools/third_party/upload.py +54 -45
- data/vendor/depot_tools/update_depot_tools +16 -70
- data/vendor/depot_tools/update_depot_tools.bat +4 -18
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +10 -6
- metadata +15 -8
- data/patches/0001-Build-standalone-static-library.patch +0 -26
- data/vendor/depot_tools/git_utils/git-tree-prune +0 -122
@@ -32,8 +32,10 @@ import threading
|
|
32
32
|
|
33
33
|
import subprocess2
|
34
34
|
|
35
|
-
|
35
|
+
from StringIO import StringIO
|
36
|
+
|
36
37
|
|
38
|
+
ROOT = os.path.abspath(os.path.dirname(__file__))
|
37
39
|
IS_WIN = sys.platform == 'win32'
|
38
40
|
GIT_EXE = ROOT+'\\git.bat' if IS_WIN else 'git'
|
39
41
|
TEST_MODE = False
|
@@ -90,6 +92,12 @@ GIT_TRANSIENT_ERRORS = (
|
|
90
92
|
# crbug.com/430343
|
91
93
|
# TODO(dnj): Resync with Chromite.
|
92
94
|
r'The requested URL returned error: 5\d+',
|
95
|
+
|
96
|
+
r'Connection reset by peer',
|
97
|
+
|
98
|
+
r'Unable to look up',
|
99
|
+
|
100
|
+
r'Couldn\'t resolve host',
|
93
101
|
)
|
94
102
|
|
95
103
|
GIT_TRANSIENT_ERRORS_RE = re.compile('|'.join(GIT_TRANSIENT_ERRORS),
|
@@ -281,6 +289,10 @@ def once(function):
|
|
281
289
|
|
282
290
|
## Git functions
|
283
291
|
|
292
|
+
def die(message, *args):
|
293
|
+
print >> sys.stderr, textwrap.dedent(message % args)
|
294
|
+
sys.exit(1)
|
295
|
+
|
284
296
|
|
285
297
|
def blame(filename, revision=None, porcelain=False, *_args):
|
286
298
|
command = ['blame']
|
@@ -293,23 +305,14 @@ def blame(filename, revision=None, porcelain=False, *_args):
|
|
293
305
|
|
294
306
|
|
295
307
|
def branch_config(branch, option, default=None):
|
296
|
-
return
|
297
|
-
|
298
|
-
|
299
|
-
def config_regexp(pattern):
|
300
|
-
if IS_WIN: # pragma: no cover
|
301
|
-
# this madness is because we call git.bat which calls git.exe which calls
|
302
|
-
# bash.exe (or something to that effect). Each layer divides the number of
|
303
|
-
# ^'s by 2.
|
304
|
-
pattern = pattern.replace('^', '^' * 8)
|
305
|
-
return run('config', '--get-regexp', pattern).splitlines()
|
308
|
+
return get_config('branch.%s.%s' % (branch, option), default=default)
|
306
309
|
|
307
310
|
|
308
311
|
def branch_config_map(option):
|
309
312
|
"""Return {branch: <|option| value>} for all branches."""
|
310
313
|
try:
|
311
314
|
reg = re.compile(r'^branch\.(.*)\.%s$' % option)
|
312
|
-
lines =
|
315
|
+
lines = get_config_regexp(reg.pattern)
|
313
316
|
return {reg.match(k).group(1): v for k, v in (l.split() for l in lines)}
|
314
317
|
except subprocess2.CalledProcessError:
|
315
318
|
return {}
|
@@ -319,23 +322,22 @@ def branches(*args):
|
|
319
322
|
NO_BRANCH = ('* (no branch', '* (detached', '* (HEAD detached')
|
320
323
|
|
321
324
|
key = 'depot-tools.branch-limit'
|
322
|
-
limit = 20
|
323
|
-
try:
|
324
|
-
limit = int(config(key, limit))
|
325
|
-
except ValueError:
|
326
|
-
pass
|
325
|
+
limit = get_config_int(key, 20)
|
327
326
|
|
328
327
|
raw_branches = run('branch', *args).splitlines()
|
329
328
|
|
330
329
|
num = len(raw_branches)
|
330
|
+
|
331
331
|
if num > limit:
|
332
|
-
|
333
|
-
|
332
|
+
die("""\
|
333
|
+
Your git repo has too many branches (%d/%d) for this tool to work well.
|
334
334
|
|
335
|
-
|
335
|
+
You may adjust this limit by running:
|
336
336
|
git config %s <new_limit>
|
337
|
-
|
338
|
-
|
337
|
+
|
338
|
+
You may also try cleaning up your old branches by running:
|
339
|
+
git cl archive
|
340
|
+
""", num, limit, key)
|
339
341
|
|
340
342
|
for line in raw_branches:
|
341
343
|
if line.startswith(NO_BRANCH):
|
@@ -343,20 +345,37 @@ def branches(*args):
|
|
343
345
|
yield line.split()[-1]
|
344
346
|
|
345
347
|
|
346
|
-
def
|
348
|
+
def get_config(option, default=None):
|
347
349
|
try:
|
348
350
|
return run('config', '--get', option) or default
|
349
351
|
except subprocess2.CalledProcessError:
|
350
352
|
return default
|
351
353
|
|
352
354
|
|
353
|
-
def
|
355
|
+
def get_config_int(option, default=0):
|
356
|
+
assert isinstance(default, int)
|
357
|
+
try:
|
358
|
+
return int(get_config(option, default))
|
359
|
+
except ValueError:
|
360
|
+
return default
|
361
|
+
|
362
|
+
|
363
|
+
def get_config_list(option):
|
354
364
|
try:
|
355
365
|
return run('config', '--get-all', option).split()
|
356
366
|
except subprocess2.CalledProcessError:
|
357
367
|
return []
|
358
368
|
|
359
369
|
|
370
|
+
def get_config_regexp(pattern):
|
371
|
+
if IS_WIN: # pragma: no cover
|
372
|
+
# this madness is because we call git.bat which calls git.exe which calls
|
373
|
+
# bash.exe (or something to that effect). Each layer divides the number of
|
374
|
+
# ^'s by 2.
|
375
|
+
pattern = pattern.replace('^', '^' * 8)
|
376
|
+
return run('config', '--get-regexp', pattern).splitlines()
|
377
|
+
|
378
|
+
|
360
379
|
def current_branch():
|
361
380
|
try:
|
362
381
|
return run('rev-parse', '--abbrev-ref', 'HEAD')
|
@@ -381,6 +400,36 @@ def diff(oldrev, newrev, *args):
|
|
381
400
|
|
382
401
|
def freeze():
|
383
402
|
took_action = False
|
403
|
+
key = 'depot-tools.freeze-size-limit'
|
404
|
+
MB = 2**20
|
405
|
+
limit_mb = get_config_int(key, 100)
|
406
|
+
untracked_bytes = 0
|
407
|
+
|
408
|
+
for f, s in status():
|
409
|
+
if is_unmerged(s):
|
410
|
+
die("Cannot freeze unmerged changes!")
|
411
|
+
if limit_mb > 0:
|
412
|
+
if s.lstat == '?':
|
413
|
+
untracked_bytes += os.stat(f).st_size
|
414
|
+
if untracked_bytes > limit_mb * MB:
|
415
|
+
die("""\
|
416
|
+
You appear to have too much untracked+unignored data in your git
|
417
|
+
checkout: %.1f / %d MB.
|
418
|
+
|
419
|
+
Run `git status` to see what it is.
|
420
|
+
|
421
|
+
In addition to making many git commands slower, this will prevent
|
422
|
+
depot_tools from freezing your in-progress changes.
|
423
|
+
|
424
|
+
You should add untracked data that you want to ignore to your repo's
|
425
|
+
.git/info/excludes
|
426
|
+
file. See `git help ignore` for the format of this file.
|
427
|
+
|
428
|
+
If this data is indended as part of your commit, you may adjust the
|
429
|
+
freeze limit by running:
|
430
|
+
git config %s <new_limit>
|
431
|
+
Where <new_limit> is an integer threshold in megabytes.""",
|
432
|
+
untracked_bytes / (MB * 1.0), limit_mb, key)
|
384
433
|
|
385
434
|
try:
|
386
435
|
run('commit', '--no-verify', '-m', FREEZE + '.indexed')
|
@@ -388,15 +437,24 @@ def freeze():
|
|
388
437
|
except subprocess2.CalledProcessError:
|
389
438
|
pass
|
390
439
|
|
440
|
+
add_errors = False
|
441
|
+
try:
|
442
|
+
run('add', '-A', '--ignore-errors')
|
443
|
+
except subprocess2.CalledProcessError:
|
444
|
+
add_errors = True
|
445
|
+
|
391
446
|
try:
|
392
|
-
run('add', '-A')
|
393
447
|
run('commit', '--no-verify', '-m', FREEZE + '.unindexed')
|
394
448
|
took_action = True
|
395
449
|
except subprocess2.CalledProcessError:
|
396
450
|
pass
|
397
451
|
|
452
|
+
ret = []
|
453
|
+
if add_errors:
|
454
|
+
ret.append('Failed to index some unindexed files.')
|
398
455
|
if not took_action:
|
399
|
-
|
456
|
+
ret.append('Nothing to freeze.')
|
457
|
+
return ' '.join(ret) or None
|
400
458
|
|
401
459
|
|
402
460
|
def get_branch_tree():
|
@@ -491,6 +549,13 @@ def is_dormant(branch):
|
|
491
549
|
return branch_config(branch, 'dormant', 'false') != 'false'
|
492
550
|
|
493
551
|
|
552
|
+
def is_unmerged(stat_value):
|
553
|
+
return (
|
554
|
+
'U' in (stat_value.lstat, stat_value.rstat) or
|
555
|
+
((stat_value.lstat == stat_value.rstat) and stat_value.lstat in 'AD')
|
556
|
+
)
|
557
|
+
|
558
|
+
|
494
559
|
def manual_merge_base(branch, base, parent):
|
495
560
|
set_branch_config(branch, 'base', base)
|
496
561
|
set_branch_config(branch, 'base-upstream', parent)
|
@@ -567,7 +632,7 @@ def repo_root():
|
|
567
632
|
|
568
633
|
|
569
634
|
def root():
|
570
|
-
return
|
635
|
+
return get_config('depot-tools.upstream', 'origin/master')
|
571
636
|
|
572
637
|
|
573
638
|
@contextlib.contextmanager
|
@@ -691,7 +756,8 @@ def get_dirty_files():
|
|
691
756
|
def is_dirty_git_tree(cmd):
|
692
757
|
dirty = get_dirty_files()
|
693
758
|
if dirty:
|
694
|
-
print 'Cannot %s with a dirty tree.
|
759
|
+
print 'Cannot %s with a dirty tree. '\
|
760
|
+
'Commit, freeze or stash your changes first.' % cmd
|
695
761
|
print 'Uncommitted files: (git diff-index --name-status HEAD)'
|
696
762
|
print dirty[:4096]
|
697
763
|
if len(dirty) > 4096: # pragma: no cover
|
@@ -700,6 +766,45 @@ def is_dirty_git_tree(cmd):
|
|
700
766
|
return False
|
701
767
|
|
702
768
|
|
769
|
+
def status():
|
770
|
+
"""Returns a parsed version of git-status.
|
771
|
+
|
772
|
+
Returns a generator of (current_name, (lstat, rstat, src)) pairs where:
|
773
|
+
* current_name is the name of the file
|
774
|
+
* lstat is the left status code letter from git-status
|
775
|
+
* rstat is the left status code letter from git-status
|
776
|
+
* src is the current name of the file, or the original name of the file
|
777
|
+
if lstat == 'R'
|
778
|
+
"""
|
779
|
+
stat_entry = collections.namedtuple('stat_entry', 'lstat rstat src')
|
780
|
+
|
781
|
+
def tokenizer(stream):
|
782
|
+
acc = StringIO()
|
783
|
+
c = None
|
784
|
+
while c != '':
|
785
|
+
c = stream.read(1)
|
786
|
+
if c in (None, '', '\0'):
|
787
|
+
if acc.len:
|
788
|
+
yield acc.getvalue()
|
789
|
+
acc = StringIO()
|
790
|
+
else:
|
791
|
+
acc.write(c)
|
792
|
+
|
793
|
+
def parser(tokens):
|
794
|
+
while True:
|
795
|
+
# Raises StopIteration if it runs out of tokens.
|
796
|
+
status_dest = next(tokens)
|
797
|
+
stat, dest = status_dest[:2], status_dest[3:]
|
798
|
+
lstat, rstat = stat
|
799
|
+
if lstat == 'R':
|
800
|
+
src = next(tokens)
|
801
|
+
else:
|
802
|
+
src = dest
|
803
|
+
yield (dest, stat_entry(lstat, rstat, src))
|
804
|
+
|
805
|
+
return parser(tokenizer(run_stream('status', '-z', bufsize=-1)))
|
806
|
+
|
807
|
+
|
703
808
|
def squash_current_branch(header=None, merge_base=None):
|
704
809
|
header = header or 'git squash commit.'
|
705
810
|
merge_base = merge_base or get_or_create_merge_base(current_branch())
|
@@ -265,8 +265,9 @@ class _Drover(object):
|
|
265
265
|
repo_status = self._run_git_command(['status', '--porcelain']).splitlines()
|
266
266
|
extra_files = [f[3:] for f in repo_status if f[:2] == ' D']
|
267
267
|
if extra_files:
|
268
|
-
self.
|
269
|
-
|
268
|
+
self._run_git_command_with_stdin(
|
269
|
+
['update-index', '--skip-worktree', '--stdin'],
|
270
|
+
stdin='\n'.join(extra_files) + '\n')
|
270
271
|
|
271
272
|
def _upload_and_land(self):
|
272
273
|
if self._dry_run:
|
@@ -314,6 +315,32 @@ class _Drover(object):
|
|
314
315
|
else:
|
315
316
|
raise Error('Command %r failed: %s' % (' '.join(args), e))
|
316
317
|
|
318
|
+
def _run_git_command_with_stdin(self, args, stdin):
|
319
|
+
"""Runs a git command with a provided stdin.
|
320
|
+
|
321
|
+
Args:
|
322
|
+
args: A list of strings containing the args to pass to git.
|
323
|
+
stdin: A string to provide on stdin.
|
324
|
+
|
325
|
+
Raises:
|
326
|
+
Error: The command failed to complete successfully.
|
327
|
+
"""
|
328
|
+
cwd = self._workdir if self._workdir else self._parent_repo
|
329
|
+
logging.debug('Running git %s (cwd %r)', ' '.join('%s' % arg
|
330
|
+
for arg in args), cwd)
|
331
|
+
|
332
|
+
# Discard stderr unless verbose is enabled.
|
333
|
+
stderr = None if self._verbose else _DEV_NULL_FILE
|
334
|
+
|
335
|
+
try:
|
336
|
+
popen = subprocess.Popen(['git'] + args, shell=False, cwd=cwd,
|
337
|
+
stderr=stderr, stdin=subprocess.PIPE)
|
338
|
+
popen.communicate(stdin)
|
339
|
+
if popen.returncode != 0:
|
340
|
+
raise Error('Command %r failed' % ' '.join(args))
|
341
|
+
except OSError as e:
|
342
|
+
raise Error('Command %r failed: %s' % (' '.join(args), e))
|
343
|
+
|
317
344
|
|
318
345
|
def cherry_pick_change(branch, revision, parent_repo, dry_run, verbose=False):
|
319
346
|
"""Cherry-picks a change into a branch.
|
@@ -18,7 +18,7 @@ import sys
|
|
18
18
|
|
19
19
|
import subprocess2
|
20
20
|
|
21
|
-
from git_common import current_branch, branches, tags,
|
21
|
+
from git_common import current_branch, branches, tags, get_config_list, GIT_EXE
|
22
22
|
from git_common import get_or_create_merge_base, root
|
23
23
|
|
24
24
|
from third_party import colorama
|
@@ -38,7 +38,7 @@ RESET = colorama.Fore.RESET + colorama.Back.RESET + colorama.Style.RESET_ALL
|
|
38
38
|
BRIGHT_RED = '\x1b[1;31m'
|
39
39
|
|
40
40
|
def main(argv):
|
41
|
-
map_extra =
|
41
|
+
map_extra = get_config_list('depot_tools.map_extra')
|
42
42
|
fmt = '%C(red bold)%h%x09%Creset%C(green)%d%Creset %C(yellow)%ad%Creset ~ %s'
|
43
43
|
log_proc = subprocess2.Popen(
|
44
44
|
[GIT_EXE, 'log', '--graph', '--branches', '--tags', root(),
|
@@ -140,7 +140,8 @@ class BranchMapper(object):
|
|
140
140
|
# retrieved.
|
141
141
|
for cl, status in status_info:
|
142
142
|
self.__status_info[cl.GetBranch()] = (cl.GetIssueURL(),
|
143
|
-
color_for_status(status)
|
143
|
+
color_for_status(status),
|
144
|
+
status)
|
144
145
|
|
145
146
|
roots = set()
|
146
147
|
|
@@ -260,13 +261,16 @@ class BranchMapper(object):
|
|
260
261
|
|
261
262
|
# The Rietveld issue associated with the branch.
|
262
263
|
if self.verbosity >= 2:
|
263
|
-
(url, color) = ('', '') if self.__is_invalid_parent(branch) \
|
264
|
-
|
265
|
-
|
264
|
+
(url, color, status) = ('', '', '') if self.__is_invalid_parent(branch) \
|
265
|
+
else self.__status_info[branch]
|
266
|
+
if self.verbosity > 2:
|
267
|
+
line.append('{} ({})'.format(url, status) if url else '', color=color)
|
268
|
+
else:
|
269
|
+
line.append(url or '', color=color)
|
266
270
|
|
267
271
|
# The subject of the most recent commit on the branch.
|
268
272
|
if self.show_subject:
|
269
|
-
line.append(run('log', '-n1', '--format=%s', branch))
|
273
|
+
line.append(run('log', '-n1', '--format=%s', branch, '--'))
|
270
274
|
|
271
275
|
self.output.append(line)
|
272
276
|
|
@@ -31,8 +31,8 @@ def find_return_branch_workdir():
|
|
31
31
|
These values may persist across multiple invocations of rebase-update, if
|
32
32
|
rebase-update runs into a conflict mid-way.
|
33
33
|
"""
|
34
|
-
return_branch = git.
|
35
|
-
workdir = git.
|
34
|
+
return_branch = git.get_config(STARTING_BRANCH_KEY)
|
35
|
+
workdir = git.get_config(STARTING_WORKDIR_KEY)
|
36
36
|
if not return_branch:
|
37
37
|
workdir = os.getcwd()
|
38
38
|
git.set_config(STARTING_WORKDIR_KEY, workdir)
|
@@ -49,7 +49,7 @@ def fetch_remotes(branch_tree):
|
|
49
49
|
remotes = set()
|
50
50
|
tag_set = git.tags()
|
51
51
|
fetchspec_map = {}
|
52
|
-
all_fetchspec_configs = git.
|
52
|
+
all_fetchspec_configs = git.get_config_regexp(r'^remote\..*\.fetch')
|
53
53
|
for fetchspec_config in all_fetchspec_configs:
|
54
54
|
key, _, fetchspec = fetchspec_config.partition(' ')
|
55
55
|
dest_spec = fetchspec.partition(':')[2]
|
@@ -11,7 +11,7 @@ import subprocess2
|
|
11
11
|
import git_common as git
|
12
12
|
|
13
13
|
def main(args):
|
14
|
-
default_args = git.
|
14
|
+
default_args = git.get_config_list('depot-tools.upstream-diff.default-args')
|
15
15
|
args = default_args + args
|
16
16
|
|
17
17
|
parser = argparse.ArgumentParser()
|
@@ -4,24 +4,29 @@
|
|
4
4
|
version: 1
|
5
5
|
cq_name: "depot_tools"
|
6
6
|
cq_status_url: "https://chromium-cq-status.appspot.com"
|
7
|
+
git_repo_url: "https://chromium.googlesource.com/chromium/tools/depot_tools"
|
7
8
|
|
9
|
+
gerrit {}
|
8
10
|
rietveld {
|
9
11
|
url: "https://codereview.chromium.org"
|
10
|
-
project_bases: "^https?\\:\\/\\/chromium\\.googlesource\\.com\\/chromium\\/tools\\/depot_tools(?:\\.git)?\\@[a-zA-Z0-9\\-_\\.]+$"
|
11
|
-
project_bases: "^https?\\:\\/\\/chromium\\.googlesource\\.com\\/a\\/chromium\\/tools\\/depot_tools(?:\\.git)?\\@[a-zA-Z0-9\\-_\\.]+$"
|
12
12
|
}
|
13
13
|
|
14
14
|
verifiers {
|
15
15
|
reviewer_lgtm {
|
16
16
|
committer_list: "project-infra-committers"
|
17
|
+
dry_run_access_list: "project-infra-tryjob-access"
|
17
18
|
}
|
18
19
|
|
19
20
|
try_job {
|
20
21
|
buckets {
|
21
|
-
name: "tryserver.infra"
|
22
|
+
name: "master.tryserver.infra"
|
22
23
|
builders {
|
23
24
|
name: "Depot Tools Presubmit"
|
24
25
|
}
|
26
|
+
builders {
|
27
|
+
name: "Depot Tools Presubmit (Swarming)"
|
28
|
+
experiment_percentage: 100
|
29
|
+
}
|
25
30
|
builders {
|
26
31
|
name: "Recipe Roll Downstream Tester"
|
27
32
|
experiment_percentage: 100
|
@@ -756,7 +756,7 @@ depot_tools(7) Manual Page
|
|
756
756
|
<div class="sectionbody">
|
757
757
|
<div class="paragraph"><p>The Chromium depot_tools suite contains many tools to assist/augment the
|
758
758
|
Chromium development environment. The tools may be downloaded from
|
759
|
-
<a href="https://chromium.googlesource.com/chromium/tools/depot_tools
|
759
|
+
<a href="https://chromium.googlesource.com/chromium/tools/depot_tools">here</a>.</p></div>
|
760
760
|
<div class="paragraph"><p>There are two primary categories of tools. Some of these tools are <em>essential</em>
|
761
761
|
to the development flow, in the sense that you cannot successfully develop
|
762
762
|
Chromium without them.</p></div>
|
@@ -771,6 +771,14 @@ ease the develpment workflow.</p></div>
|
|
771
771
|
<div class="paragraph"><p>A tutorial for these tools can be found at <a href="depot_tools_tutorial.html">depot_tools_tutorial(7)</a>.</p></div>
|
772
772
|
<div class="dlist"><dl>
|
773
773
|
<dt class="hdlist1">
|
774
|
+
<a href="git-auto-svn.html">git-auto-svn(1)</a>
|
775
|
+
</dt>
|
776
|
+
<dd>
|
777
|
+
<p>
|
778
|
+
Automatically set up git-svn metadata for a repo mirrored from SVN.
|
779
|
+
</p>
|
780
|
+
</dd>
|
781
|
+
<dt class="hdlist1">
|
774
782
|
<a href="git-cherry-pick-upload.html">git-cherry-pick-upload(1)</a>
|
775
783
|
</dt>
|
776
784
|
<dd>
|
@@ -927,7 +935,7 @@ Print a diff of the current branch, compared to its upstream.
|
|
927
935
|
<div id="footnotes"><hr /></div>
|
928
936
|
<div id="footer">
|
929
937
|
<div id="footer-text">
|
930
|
-
Last updated 2016-
|
938
|
+
Last updated 2016-07-21 10:09:00 PDT
|
931
939
|
</div>
|
932
940
|
</div>
|
933
941
|
</body>
|