]> git.ozlabs.org Git - patchwork/commitdiff
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)
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>

No differences found