1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-28 10:46:15 +01:00

add the id of the new request to the revoke message

This commit is contained in:
Marcus Hüwe 2008-08-17 20:12:19 +00:00
parent fc0d61bfce
commit 5140deebff

View File

@ -565,19 +565,21 @@ Please submit there instead, or use --nodevelproject to force direct submission.
reqs = get_submit_request_list(apiurl, dst_project, dst_package)
user = conf.get_apiurl_usr(apiurl)
myreqs = [ i for i in reqs if i.state.who == user ]
repl = ''
if len(myreqs) > 0:
print 'You already created the following submitrequests: %s.' % \
', '.join([str(i.reqid) for i in myreqs ])
repl = raw_input('Revoke the old requests? (y/N) ')
if repl == 'y':
for req in myreqs:
change_submit_request_state(apiurl, str(req.reqid), 'revoked',
'obsoleted by another request')
result = create_submit_request(apiurl,
src_project, src_package,
dst_project, dst_package,
opts.message, orev=opts.revision)
if repl == 'y':
for req in myreqs:
change_submit_request_state(apiurl, str(req.reqid), 'revoked',
'obsoleted by request: %s' % result)
print 'created request id', result