Commit b80458a7 authored by tandrii's avatar tandrii Committed by Commit bot

git cl upload: add --message-file to provide arbitrary messages.

R=martiniss@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2087393004
parent a0e66ea6
......@@ -3725,6 +3725,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('--message-file', dest='message_file',
help='file which contains message for patchset')
parser.add_option('-t', dest='title',
help='title for patchset (Rietveld only)')
parser.add_option('-r', '--reviewers',
......@@ -3780,6 +3782,12 @@ def CMDupload(parser, args):
options.reviewers = cleanup_list(options.reviewers)
options.cc = cleanup_list(options.cc)
if options.message_file:
if options.message:
parser.error('only one of --message and --message-file allowed.')
options.message = gclient_utils.FileRead(options.message_file)
options.message_file = None
# For sanity of test expectations, do this otherwise lazy-loading *now*.
settings.GetIsGerrit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment