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

Side by Side Diff: git_common.py

Issue 1179273003: When using git-rebase-update, pass -n to git commit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: s/-n/--no-verify/ Created 5 years, 6 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 | no next file » | 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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 if log_msg: 649 if log_msg:
650 log_msg += '\n' 650 log_msg += '\n'
651 log_msg += run('log', '--reverse', '--format=%H%n%B', '%s..HEAD' % merge_base) 651 log_msg += run('log', '--reverse', '--format=%H%n%B', '%s..HEAD' % merge_base)
652 run('reset', '--soft', merge_base) 652 run('reset', '--soft', merge_base)
653 653
654 if not get_dirty_files(): 654 if not get_dirty_files():
655 # Sometimes the squash can result in the same tree, meaning that there is 655 # Sometimes the squash can result in the same tree, meaning that there is
656 # nothing to commit at this point. 656 # nothing to commit at this point.
657 print 'Nothing to commit; squashed branch is empty' 657 print 'Nothing to commit; squashed branch is empty'
658 return False 658 return False
659 run('commit', '-a', '-F', '-', indata=log_msg) 659 run('commit', '--no-verify', '-a', '-F', '-', indata=log_msg)
660 return True 660 return True
661 661
662 662
663 def tags(*args): 663 def tags(*args):
664 return run('tag', *args).splitlines() 664 return run('tag', *args).splitlines()
665 665
666 666
667 def thaw(): 667 def thaw():
668 took_action = False 668 took_action = False
669 for sha in (s.strip() for s in run_stream('rev-list', 'HEAD').xreadlines()): 669 for sha in (s.strip() for s in run_stream('rev-list', 'HEAD').xreadlines()):
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 hash=branch_hash, upstream=upstream_branch, ahead=ahead, behind=behind) 809 hash=branch_hash, upstream=upstream_branch, ahead=ahead, behind=behind)
810 810
811 # Set None for upstreams which are not branches (e.g empty upstream, remotes 811 # Set None for upstreams which are not branches (e.g empty upstream, remotes
812 # and deleted upstream branches). 812 # and deleted upstream branches).
813 missing_upstreams = {} 813 missing_upstreams = {}
814 for info in info_map.values(): 814 for info in info_map.values():
815 if info.upstream not in info_map and info.upstream not in missing_upstreams: 815 if info.upstream not in info_map and info.upstream not in missing_upstreams:
816 missing_upstreams[info.upstream] = None 816 missing_upstreams[info.upstream] = None
817 817
818 return dict(info_map.items() + missing_upstreams.items()) 818 return dict(info_map.items() + missing_upstreams.items())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698