]> git.ozlabs.org Git - patchwork/commit
pwclient: allow multiple IDs
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 29 Aug 2014 09:07:02 +0000 (11:07 +0200)
committerJeremy Kerr <jk@ozlabs.org>
Sun, 7 Sep 2014 11:35:54 +0000 (19:35 +0800)
commitaf90fe7c550ada3c035f1a5a4f9b18a0b816232c
tree618ab2375e40ea7d5d4efc0f11191affdf51a81d
parentbb7c1fe54844dcbb52574c31296e042c4eb46039
pwclient: allow multiple IDs

Allow commands that take an ID to operate on multiple IDs.
E.g.:
update -s Superseded 1 2 3 4 5
apply 2 4 6

Reject update -c COMMIT-REF on multiple IDs though as that does not
make sense.

Implementation note:
nargs='*' instead of '?' results in (wrong/inconvenient):
mutually exclusive arguments must be optional
So remove mutual exclusive handling via argparse and instead do it by
hand. This might be implemented more conveniently in later python but we
(have to) stick with 2.7.x for the time being.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/bin/pwclient