summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Stefani <luca.stefani.ge1@gmail.com>2018-04-14 22:25:40 +0200
committerLuca Stefani <luca.stefani.ge1@gmail.com>2018-04-14 23:21:12 +0200
commitf8370f65bad957b8d5ff7cde503662c5e961594a (patch)
tree2c44c3ab762890eeefa8e27fb3127a728e071dcd
parentf07caa17349a8fe45b0bd6153c69bfb5f9067def (diff)
downloadscripts-f8370f65bad957b8d5ff7cde503662c5e961594a.tar.gz
scripts-f8370f65bad957b8d5ff7cde503662c5e961594a.tar.bz2
scripts-f8370f65bad957b8d5ff7cde503662c5e961594a.zip
lineage-push: Add WIP support
Change-Id: I23c857947cf5e9ec4e6ac22263fbcdf68a4a52e2
-rw-r--r--lineage-push/README.md4
-rwxr-xr-xlineage-push/lineage-push.py7
2 files changed, 10 insertions, 1 deletions
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()