1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 14:56:14 +01:00

- add support for listing submitrequests not in state New to

osc submitreq list
This commit is contained in:
Dirk Mueller 2008-08-04 13:20:29 +00:00
parent 707b057891
commit 65e9011f00

View File

@ -413,6 +413,8 @@ class Osc(cmdln.Cmdln):
@cmdln.option('--nodevelproject', action='store_true',
help='do not follow a defined devel project ' \
'(primary project where a package is developed)')
@cmdln.option('-s', '--state', default='New',
help='only list requests in one of the comma separated given states [default=new]')
@cmdln.alias("sr")
@cmdln.alias("submitrequest")
def do_submitreq(self, subcmd, opts, *args):
@ -562,8 +564,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
# list
elif cmd == 'list':
results = get_submit_request_list(apiurl,
project, package)
state_list = opts.state.split(',')
results = get_submit_request_list(apiurl,
project, package, state_list)
results.sort(reverse=True)