diff --git a/osc/commandline.py b/osc/commandline.py index da3c7d01..64de22bf 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -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