Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: git_common.py

Issue 212493003: Fix the print of the rebase error message, and make the output prettier too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | git_rebase_update.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Monkeypatch IMapIterator so that Ctrl-C can kill everything properly. 5 # Monkeypatch IMapIterator so that Ctrl-C can kill everything properly.
6 # Derived from https://gist.github.com/aljungberg/626518 6 # Derived from https://gist.github.com/aljungberg/626518
7 import multiprocessing.pool 7 import multiprocessing.pool
8 from multiprocessing.pool import IMapIterator 8 from multiprocessing.pool import IMapIterator
9 def wrapper(func): 9 def wrapper(func):
10 def wrap(self, timeout=None): 10 def wrap(self, timeout=None):
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 """ 441 """
442 try: 442 try:
443 args = ['--onto', parent, start, branch] 443 args = ['--onto', parent, start, branch]
444 if TEST_MODE: 444 if TEST_MODE:
445 args.insert(0, '--committer-date-is-author-date') 445 args.insert(0, '--committer-date-is-author-date')
446 run('rebase', *args) 446 run('rebase', *args)
447 return RebaseRet(True, '') 447 return RebaseRet(True, '')
448 except subprocess2.CalledProcessError as cpe: 448 except subprocess2.CalledProcessError as cpe:
449 if abort: 449 if abort:
450 run('rebase', '--abort') 450 run('rebase', '--abort')
451 return RebaseRet(False, cpe.output) 451 return RebaseRet(False, cpe.stdout)
452 452
453 453
454 def remove_merge_base(branch): 454 def remove_merge_base(branch):
455 del_branch_config(branch, 'base') 455 del_branch_config(branch, 'base')
456 456
457 457
458 def root(): 458 def root():
459 return config('depot-tools.upstream', 'origin/master') 459 return config('depot-tools.upstream', 'origin/master')
460 460
461 461
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 return None 628 return None
629 return ret 629 return ret
630 630
631 631
632 def upstream(branch): 632 def upstream(branch):
633 try: 633 try:
634 return run('rev-parse', '--abbrev-ref', '--symbolic-full-name', 634 return run('rev-parse', '--abbrev-ref', '--symbolic-full-name',
635 branch+'@{upstream}') 635 branch+'@{upstream}')
636 except subprocess2.CalledProcessError: 636 except subprocess2.CalledProcessError:
637 return None 637 return None
OLDNEW
« no previous file with comments | « no previous file | git_rebase_update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698