lineage-push: Add message support

Change-Id: Ia6a638ff6447ea59a34e288b299d2fa9143424a7
This commit is contained in:
Luca Stefani
2018-04-14 22:58:32 +02:00
parent 6e0ab73c74
commit 422d2a66b5
2 changed files with 13 additions and 2 deletions

View File

@@ -7,6 +7,10 @@ import subprocess
import sys
from argparse import ArgumentParser, ArgumentTypeError
try:
from urllib.parse import quote_plus
except ImportError:
from urllib import quote_plus
def push(args):
command = 'git push'
@@ -61,6 +65,9 @@ def push(args):
elif args.wip == False:
command += '%ready'
if args.message:
command += '%m={}'.format(quote_plus(args.message))
sys.exit(subprocess.call(command, shell=True))
@@ -86,6 +93,8 @@ def parse_cmdline():
parser.add_argument(
'-f', '--force', action='store_true', help='force push')
parser.add_argument('-l', '--label', help='assign label')
parser.add_argument('-m', '--message', nargs='?',
help='add message to change')
parser.add_argument('-p', '--private', type=str2bool, nargs='?',
const=True, help='upload change as private')
parser.add_argument(