lineage-push: Add WIP support
Change-Id: I23c857947cf5e9ec4e6ac22263fbcdf68a4a52e2
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user