diff --git a/lineage-push/README.md b/lineage-push/README.md index 704ca50..70a0fb3 100644 --- a/lineage-push/README.md +++ b/lineage-push/README.md @@ -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: diff --git a/lineage-push/lineage-push.py b/lineage-push/lineage-push.py index bde166e..af75367 100755 --- a/lineage-push/lineage-push.py +++ b/lineage-push/lineage-push.py @@ -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()