lineage-push: Add WIP support

Change-Id: I23c857947cf5e9ec4e6ac22263fbcdf68a4a52e2
This commit is contained in:
Luca Stefani
2018-04-14 22:25:40 +02:00
parent f07caa1734
commit f8370f65ba
2 changed files with 10 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
```
usage: lineage-push.py [-h] [-d] [-e] [-f] [-l LABEL] [-m] [-p [PRIVATE]]
[-r REF] [-s] [-t TOPIC]
[-r REF] [-s] [-t TOPIC] [-w [WIP]]
branch
Pushes a local git repository's changes to Gerrit for code review
@@ -24,6 +24,8 @@ optional arguments:
-s, --submit submit change
-t TOPIC, --topic TOPIC
append topic to change
-w [WIP], --wip [WIP]
upload change as WIP
```
```
Examples:

View File

@@ -56,6 +56,11 @@ def push(args):
elif args.private == False:
command += '%remove-private'
if args.wip == True:
command += '%wip'
elif args.wip == False:
command += '%ready'
sys.exit(subprocess.call(command, shell=True))
@@ -88,6 +93,8 @@ def parse_cmdline():
parser.add_argument(
'-s', '--submit', action='store_true', help='submit change')
parser.add_argument('-t', '--topic', help='append topic to change')
parser.add_argument('-w', '--wip', type=str2bool, nargs='?',
const=True, help='upload change as WIP')
return parser.parse_args()