mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
- added new "clone_request" method
This commit is contained in:
parent
7862ce74de
commit
785e4dcb1f
@ -1679,10 +1679,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
# clone all packages from a given request
|
||||
if cmd in ['clone']:
|
||||
query = { 'cmd': 'branch', 'request': reqid }
|
||||
url = makeurl(apiurl, ['source'], query)
|
||||
r = http_POST(url, data=opts.message)
|
||||
print r.read()
|
||||
# should we force a message?
|
||||
print clone_request(apiurl, reqid, opts.message)
|
||||
|
||||
# add new reviewer to existing request
|
||||
elif cmd in ['add'] and subcmd == 'review':
|
||||
|
@ -3241,6 +3241,11 @@ def create_change_devel_request(apiurl,
|
||||
root = ET.parse(f).getroot()
|
||||
return root.get('id')
|
||||
|
||||
def clone_request(apiurl, reqid, msg=None):
|
||||
query = {'cmd': 'branch', 'request': reqid}
|
||||
url = makeurl(apiurl, ['source'], query)
|
||||
r = http_POST(url, data=msg)
|
||||
return r.read()
|
||||
|
||||
# This creates an old style submit request for server api 1.0
|
||||
def create_submit_request(apiurl,
|
||||
|
Loading…
Reference in New Issue
Block a user