1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-11 16:36:14 +01:00

- do_submitrequest: automatically supersede existing requests if "--yes" was specified

Fixes #58
This commit is contained in:
Marcus Huewe 2013-11-15 11:12:26 +01:00
parent a7ea5043ae
commit 6a36b5180a

View File

@ -1409,8 +1409,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
reqs = get_request_list(apiurl, dst_project, dst_package, req_type='submit', req_state=['new','review']) reqs = get_request_list(apiurl, dst_project, dst_package, req_type='submit', req_state=['new','review'])
user = conf.get_apiurl_usr(apiurl) user = conf.get_apiurl_usr(apiurl)
myreqs = [ i for i in reqs if i.state.who == user ] myreqs = [ i for i in reqs if i.state.who == user ]
repl = '' repl = 'y'
if len(myreqs) > 0: if len(myreqs) > 0 and not opts.yes:
print('You already created the following submit request: %s.' % \ print('You already created the following submit request: %s.' % \
', '.join([i.reqid for i in myreqs ])) ', '.join([i.reqid for i in myreqs ]))
repl = raw_input('Supersede the old requests? (y/n/c) ') repl = raw_input('Supersede the old requests? (y/n/c) ')