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

Side by Side Diff: git_cl.py

Issue 407413002: Remove confirmation from git cl land. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 5 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 | tests/git_cl_test.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Copyright (C) 2008 Evan Martin <martine@danga.com> 6 # Copyright (C) 2008 Evan Martin <martine@danga.com>
7 7
8 """A git-command for integrating reviews on Rietveld.""" 8 """A git-command for integrating reviews on Rietveld."""
9 9
10 import datetime 10 import datetime
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 commit_desc.append_footer('Review URL: %s' % cl.GetIssueURL()) 1937 commit_desc.append_footer('Review URL: %s' % cl.GetIssueURL())
1938 if options.contributor: 1938 if options.contributor:
1939 commit_desc.append_footer('Patch from %s.' % options.contributor) 1939 commit_desc.append_footer('Patch from %s.' % options.contributor)
1940 1940
1941 print('Description:') 1941 print('Description:')
1942 print(commit_desc.description) 1942 print(commit_desc.description)
1943 1943
1944 branches = [base_branch, cl.GetBranchRef()] 1944 branches = [base_branch, cl.GetBranchRef()]
1945 if not options.force: 1945 if not options.force:
1946 print_stats(options.similarity, options.find_copies, branches) 1946 print_stats(options.similarity, options.find_copies, branches)
1947 ask_for_data('About to commit; enter to confirm.')
1948 1947
1949 # We want to squash all this branch's commits into one commit with the proper 1948 # We want to squash all this branch's commits into one commit with the proper
1950 # description. We do this by doing a "reset --soft" to the base branch (which 1949 # description. We do this by doing a "reset --soft" to the base branch (which
1951 # keeps the working copy the same), then dcommitting that. If origin/master 1950 # keeps the working copy the same), then dcommitting that. If origin/master
1952 # has a submodule merge commit, we'll also need to cherry-pick the squashed 1951 # has a submodule merge commit, we'll also need to cherry-pick the squashed
1953 # commit onto a branch based on the git-svn head. 1952 # commit onto a branch based on the git-svn head.
1954 MERGE_BRANCH = 'git-cl-commit' 1953 MERGE_BRANCH = 'git-cl-commit'
1955 CHERRY_PICK_BRANCH = 'git-cl-cherry-pick' 1954 CHERRY_PICK_BRANCH = 'git-cl-cherry-pick'
1956 # Delete the branches if they exist. 1955 # Delete the branches if they exist.
1957 for branch in [MERGE_BRANCH, CHERRY_PICK_BRANCH]: 1956 for branch in [MERGE_BRANCH, CHERRY_PICK_BRANCH]:
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 2649 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
2651 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 2650 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
2652 2651
2653 2652
2654 if __name__ == '__main__': 2653 if __name__ == '__main__':
2655 # These affect sys.stdout so do it outside of main() to simplify mocks in 2654 # These affect sys.stdout so do it outside of main() to simplify mocks in
2656 # unit testing. 2655 # unit testing.
2657 fix_encoding.fix_encoding() 2656 fix_encoding.fix_encoding()
2658 colorama.init() 2657 colorama.init()
2659 sys.exit(main(sys.argv[1:])) 2658 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698