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

Unified Diff: git_cl.py

Issue 1659633003: Abort if a patch set title is provided for a Gerrit server (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index 2d915b0b7f3a67db26a06344e23a4ba25c8320c8..7e43349f21b283c098cc5065fa20db8645c8540a 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1627,8 +1627,10 @@ def upload_branch_deps(cl, args):
'"git cl upload".')
ask_for_data('[Press enter to continue or ctrl-C to quit]')
- # Add a default patchset title to all upload calls.
- args.extend(['-t', 'Updated patchset dependency'])
+ # Add a default patchset title to all upload calls in Rietveld.
+ if not settings.GetIsGerrit():
+ args.extend(['-t', 'Updated patchset dependency'])
+
# Record all dependents that failed to upload.
failures = {}
# Go through all dependents, checkout the branch and upload.
@@ -2010,7 +2012,11 @@ def GerritUpload(options, args, cl, change):
change_desc = ChangeDescription(
options.message or CreateDescriptionFromLog(args))
if not change_desc.description:
- print "Description is empty; aborting."
+ print "\nDescription is empty. Aborting..."
+ return 1
+
+ if options.title:
+ print "\nPatch titles (-t) are not supported in Gerrit. Aborting..."
return 1
if options.squash:
@@ -2351,7 +2357,8 @@ def CMDupload(parser, args):
parser.add_option('-f', action='store_true', dest='force',
help="force yes to questions (don't prompt)")
parser.add_option('-m', dest='message', help='message for patchset')
- parser.add_option('-t', dest='title', help='title for patchset')
+ parser.add_option('-t', dest='title',
+ help='title for patchset (Rietveld only)')
parser.add_option('-r', '--reviewers',
action='append', default=[],
help='reviewer email addresses')
« 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