1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-12 23:56:13 +01:00

- added new "clone_request" method

This commit is contained in:
Marcus Huewe 2010-10-26 15:34:32 +02:00
parent 7862ce74de
commit 785e4dcb1f
2 changed files with 7 additions and 4 deletions

View File

@ -1679,10 +1679,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
# clone all packages from a given request # clone all packages from a given request
if cmd in ['clone']: if cmd in ['clone']:
query = { 'cmd': 'branch', 'request': reqid } # should we force a message?
url = makeurl(apiurl, ['source'], query) print clone_request(apiurl, reqid, opts.message)
r = http_POST(url, data=opts.message)
print r.read()
# add new reviewer to existing request # add new reviewer to existing request
elif cmd in ['add'] and subcmd == 'review': elif cmd in ['add'] and subcmd == 'review':

View File

@ -3241,6 +3241,11 @@ def create_change_devel_request(apiurl,
root = ET.parse(f).getroot() root = ET.parse(f).getroot()
return root.get('id') 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 # This creates an old style submit request for server api 1.0
def create_submit_request(apiurl, def create_submit_request(apiurl,