Added --email to git_cl.py
Passing the email address used to connect to Rietveld on the command
line is useful for testing purposes, in particular with a test server.
BUG=331123
Review URL: https://codereview.chromium.org/122583003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244017 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index 9d7cb4e..2bf1b98 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1444,6 +1444,9 @@
change_desc = None
+ if options.email is not None:
+ upload_args.extend(['--email', options.email])
+
if cl.GetIssue():
if options.title:
upload_args.extend(['--title', options.title])
@@ -1583,6 +1586,9 @@
parser.add_option('--target_branch',
help='When uploading to gerrit, remote branch to '
'use for CL. Default: master')
+ parser.add_option('--email', default=None,
+ help='email address to use to connect to Rietveld')
+
add_git_similarity(parser)
(options, args) = parser.parse_args(args)