lineage-push: Add private support
Change-Id: I23b1c44c508a723890d723683d12b17799b9d93b
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# LineageOS Push Script
|
||||
|
||||
```
|
||||
usage: lineage-push.py [-h] [-d] [-e] [-f] [-l LABEL] [-m] [-r REF] [-s]
|
||||
[-t TOPIC]
|
||||
usage: lineage-push.py [-h] [-d] [-e] [-f] [-l LABEL] [-m] [-p [PRIVATE]]
|
||||
[-r REF] [-s] [-t TOPIC]
|
||||
branch
|
||||
|
||||
Pushes a local git repository's changes to Gerrit for code review
|
||||
@@ -18,6 +18,8 @@ optional arguments:
|
||||
-l LABEL, --label LABEL
|
||||
assign label
|
||||
-m, --merge bypass review and merge
|
||||
-p [PRIVATE], --private [PRIVATE]
|
||||
upload change as private
|
||||
-r REF, --ref REF push to specified ref
|
||||
-s, --submit submit change
|
||||
-t TOPIC, --topic TOPIC
|
||||
|
||||
@@ -51,6 +51,11 @@ def push(args):
|
||||
if args.submit:
|
||||
command += '%submit'
|
||||
|
||||
if args.private == True:
|
||||
command += '%private'
|
||||
elif args.private == False:
|
||||
command += '%remove-private'
|
||||
|
||||
sys.exit(subprocess.call(command, shell=True))
|
||||
|
||||
|
||||
@@ -76,6 +81,8 @@ def parse_cmdline():
|
||||
parser.add_argument('-l', '--label', help='assign label')
|
||||
parser.add_argument('-m', '--merge', action='store_true',
|
||||
help='bypass review and merge')
|
||||
parser.add_argument('-p', '--private', type=str2bool, nargs='?',
|
||||
const=True, help='upload change as private')
|
||||
parser.add_argument(
|
||||
'-r', '--ref', help='push to specified ref', default="for")
|
||||
parser.add_argument(
|
||||
|
||||
Reference in New Issue
Block a user