diff --git a/osc/commandline.py b/osc/commandline.py index 43c57448..62f05da6 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -680,6 +680,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='specify message TEXT') @cmdln.option('-t', '--type', metavar='TEXT', help='limit to requests which contain a given action type (submit/delete/change_devel)') + @cmdln.option('-a', '--all', action='store_true', + help='all states') @cmdln.option('-s', '--state', default='new', help='only list requests in one of the comma separated given states (new/accepted/rejected/revoked/declined) [default=new]') @cmdln.option('-b', '--brief', action='store_true', default=False, @@ -782,6 +784,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. who = '' if opts.mine: who = conf.get_apiurl_usr(apiurl) + if opts.all: + state_list = ('new', 'accepted', 'declined', 'revoked', 'rejected') results = get_request_list(apiurl, project, package, who, state_list, opts.type) diff --git a/osc/core.py b/osc/core.py index eac57ea4..b47a8e15 100755 --- a/osc/core.py +++ b/osc/core.py @@ -2300,6 +2300,8 @@ def get_request_list(apiurl, project, package, req_who='', req_state=('new',), r matches = [] match='' m='' + if "all" in req_state: + req_state=('new', 'accepted', 'declined', 'revoked', 'rejected') for state in req_state: if len(m): m += '%20or%20' m += 'state/@name=\'%s\'' % quote_plus(state)