diff options
author | Tama McGlinn <t.mcglinn@gmail.com> | 2022-11-09 09:48:10 +0000 |
---|---|---|
committer | Tama McGlinn <t.mcglinn@gmail.com> | 2022-11-11 09:46:12 +0000 |
commit | 52752c85d3ea135693d3c17e855941740aebc9d5 (patch) | |
tree | b9f9b9331d7cb1a11fb9ec305095ffaa237ec971 | |
parent | 21445db642200bcd4cd3021d74b0391b3ddc77e1 (diff) | |
download | git-review-52752c85d3ea135693d3c17e855941740aebc9d5.tar.gz |
Add message option
Change-Id: I34741e0baf6dabb5cbf3ab648bf2e4c2a28a9399
-rw-r--r-- | git_review/cmd.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git_review/cmd.py b/git_review/cmd.py index e4b2dd5..8553158 100644 --- a/git_review/cmd.py +++ b/git_review/cmd.py @@ -27,6 +27,7 @@ import shlex import subprocess import sys import textwrap +from urllib.parse import quote_plus from urllib.parse import urlencode from urllib.parse import urljoin from urllib.parse import urlparse @@ -1536,6 +1537,8 @@ additional information: choices=['NONE', 'OWNER', 'OWNER_REVIEWERS', 'ALL'], help="Control to whom email notifications are sent," " defaults to ALL.") + parser.add_argument("--message", dest="message", + help="Message to add to patch set description") rebase_group = parser.add_mutually_exclusive_group() rebase_group.add_argument("-R", "--no-rebase", dest="rebase", @@ -1821,6 +1824,10 @@ additional information: if options.notify is not None: push_options.append("notify=%s" % options.notify) + if options.message is not None: + escaped_message = quote_plus(options.message) + push_options.append(f"m={escaped_message}") + if push_options: cmd += "%" + ",".join(push_options) if options.dry: |