From 25548ab6fcab9f63d8922116b362045cf0c0e218 Mon Sep 17 00:00:00 2001 From: "rogerta@chromium.org" Date: Mon, 14 May 2012 13:26:52 +0000 Subject: [PATCH] Fix gcl.py to handle new command line argument format of upload.py. gcl.py converts -m and --message to -t. BUG=None TEST=When uploading a patch to rietveld, make sure no new message is added to the CL. Review URL: https://chromiumcodereview.appspot.com/10384131 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@136861 0039d316-1c4b-4281-b951-d872f2087c98 --- gcl.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcl.py b/gcl.py index bc37b7e07..2c12a64d6 100755 --- a/gcl.py +++ b/gcl.py @@ -825,6 +825,10 @@ def CMDupload(change_info, args): if FilterFlag(args, "--send-mail"): args.append("--send_mail") + # Replace -m or --message with -t. + args = map(lambda a: '-t' if (a == '-m' or a == '--message') else a, args) + + upload_arg = ["upload.py", "-y"] upload_arg.append("--server=%s" % change_info.rietveld) @@ -842,7 +846,7 @@ def CMDupload(change_info, args): # Uploading a new patchset. upload_arg.append("--issue=%d" % change_info.issue) - if not any(i.startswith('--message') or i.startswith('-m') for i in args): + if not any(i.startswith('--title') or i.startswith('-t') for i in args): upload_arg.append('--title= ') else: # First time we upload.