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

Side by Side Diff: git_cl.py

Issue 12965015: Make sure to use title if specified as default message when uploading an issue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 7 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 | 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 #!/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 json 10 import json
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 # TODO(rogerta): for now, the -m option will also set the --title option 1148 # TODO(rogerta): for now, the -m option will also set the --title option
1149 # for upload.py. Soon this will be changed to set the --message option. 1149 # for upload.py. Soon this will be changed to set the --message option.
1150 # Will wait until people are used to typing -t instead of -m. 1150 # Will wait until people are used to typing -t instead of -m.
1151 upload_args.extend(['--title', options.message]) 1151 upload_args.extend(['--title', options.message])
1152 upload_args.extend(['--issue', str(cl.GetIssue())]) 1152 upload_args.extend(['--issue', str(cl.GetIssue())])
1153 print ("This branch is associated with issue %s. " 1153 print ("This branch is associated with issue %s. "
1154 "Adding patch to that issue." % cl.GetIssue()) 1154 "Adding patch to that issue." % cl.GetIssue())
1155 else: 1155 else:
1156 if options.title: 1156 if options.title:
1157 upload_args.extend(['--title', options.title]) 1157 upload_args.extend(['--title', options.title])
1158 message = options.message or CreateDescriptionFromLog(args) 1158 message = options.title or options.message or CreateDescriptionFromLog(args)
1159 change_desc = ChangeDescription(message, options.reviewers) 1159 change_desc = ChangeDescription(message, options.reviewers)
1160 if not options.force: 1160 if not options.force:
1161 change_desc.Prompt() 1161 change_desc.Prompt()
1162 change_desc.ParseDescription() 1162 change_desc.ParseDescription()
1163 1163
1164 if change_desc.IsEmpty(): 1164 if change_desc.IsEmpty():
1165 print "Description is empty; aborting." 1165 print "Description is empty; aborting."
1166 return 1 1166 return 1
1167 1167
1168 upload_args.extend(['--message', change_desc.description]) 1168 upload_args.extend(['--message', change_desc.description])
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1892 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1893 1893
1894 # Not a known command. Default to help. 1894 # Not a known command. Default to help.
1895 GenUsage(parser, 'help') 1895 GenUsage(parser, 'help')
1896 return CMDhelp(parser, argv) 1896 return CMDhelp(parser, argv)
1897 1897
1898 1898
1899 if __name__ == '__main__': 1899 if __name__ == '__main__':
1900 fix_encoding.fix_encoding() 1900 fix_encoding.fix_encoding()
1901 sys.exit(main(sys.argv[1:])) 1901 sys.exit(main(sys.argv[1:]))
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