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]]
|
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
|
branch
|
||||||
|
|
||||||
Pushes a local git repository's changes to Gerrit for code review
|
Pushes a local git repository's changes to Gerrit for code review
|
||||||
@@ -24,6 +24,8 @@ optional arguments:
|
|||||||
-s, --submit submit change
|
-s, --submit submit change
|
||||||
-t TOPIC, --topic TOPIC
|
-t TOPIC, --topic TOPIC
|
||||||
append topic to change
|
append topic to change
|
||||||
|
-w [WIP], --wip [WIP]
|
||||||
|
upload change as WIP
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
Examples:
|
Examples:
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ def push(args):
|
|||||||
elif args.private == False:
|
elif args.private == False:
|
||||||
command += '%remove-private'
|
command += '%remove-private'
|
||||||
|
|
||||||
|
if args.wip == True:
|
||||||
|
command += '%wip'
|
||||||
|
elif args.wip == False:
|
||||||
|
command += '%ready'
|
||||||
|
|
||||||
sys.exit(subprocess.call(command, shell=True))
|
sys.exit(subprocess.call(command, shell=True))
|
||||||
|
|
||||||
|
|
||||||
@@ -88,6 +93,8 @@ def parse_cmdline():
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-s', '--submit', action='store_true', help='submit change')
|
'-s', '--submit', action='store_true', help='submit change')
|
||||||
parser.add_argument('-t', '--topic', help='append topic to 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()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user