mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-12 00:46:14 +01:00
- do not crash on maintenance release or incident requests
This commit is contained in:
parent
3bb9332376
commit
b2adcb7d94
@ -432,7 +432,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
|
|
||||||
if opts.force or not patchinfo:
|
if opts.force or not patchinfo:
|
||||||
print "Creating initial patchinfo..."
|
print "Creating initial patchinfo..."
|
||||||
query='cmd=createpatchinfo'
|
query='cmd=createpatchinfo&new_format=1'
|
||||||
if args and args[0]:
|
if args and args[0]:
|
||||||
query += "&name=" + args[0]
|
query += "&name=" + args[0]
|
||||||
url = makeurl(apiurl, ['source', project], query=query)
|
url = makeurl(apiurl, ['source', project], query=query)
|
||||||
@ -812,7 +812,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
targetprojects = []
|
targetprojects = []
|
||||||
# loop via all packages for checking their state
|
# loop via all packages for checking their state
|
||||||
for p in meta_get_packagelist(apiurl, project):
|
for p in meta_get_packagelist(apiurl, project):
|
||||||
if p.startswith("_patchinfo:"):
|
if p.startswith("_patchinfo:") or p.startswith("patchinfo"):
|
||||||
pi.append(p)
|
pi.append(p)
|
||||||
else:
|
else:
|
||||||
# get _link info from server, that knows about the local state ...
|
# get _link info from server, that knows about the local state ...
|
||||||
|
10
osc/core.py
10
osc/core.py
@ -2283,7 +2283,9 @@ class Action:
|
|||||||
'acceptinfo_rev', 'acceptinfo_srcmd5', 'acceptinfo_xsrcmd5', 'acceptinfo_osrcmd5',
|
'acceptinfo_rev', 'acceptinfo_srcmd5', 'acceptinfo_xsrcmd5', 'acceptinfo_osrcmd5',
|
||||||
'acceptinfo_oxsrcmd5', 'opt_updatelink'),
|
'acceptinfo_oxsrcmd5', 'opt_updatelink'),
|
||||||
'add_role': ('tgt_project', 'tgt_package', 'person_name', 'person_role', 'group_name', 'group_role'),
|
'add_role': ('tgt_project', 'tgt_package', 'person_name', 'person_role', 'group_name', 'group_role'),
|
||||||
'set_bugowner': ('tgt_project', 'tgt_package', 'person_name'),
|
'set_bugowner': ('tgt_project', 'tgt_package', 'person_name'), # obsoleted by add_role
|
||||||
|
'maintenance_release': ('src_project', 'src_package', 'src_rev', 'tgt_project', 'tgt_package', 'person_name'),
|
||||||
|
'maintenance_incident': ('src_project', 'tgt_project', 'person_name'),
|
||||||
'delete': ('tgt_project', 'tgt_package'),
|
'delete': ('tgt_project', 'tgt_package'),
|
||||||
'change_devel': ('src_project', 'src_package', 'tgt_project', 'tgt_package')}
|
'change_devel': ('src_project', 'src_package', 'tgt_project', 'tgt_package')}
|
||||||
# attribute prefix to element name map (only needed for abbreviated attributes)
|
# attribute prefix to element name map (only needed for abbreviated attributes)
|
||||||
@ -2484,6 +2486,12 @@ class Request:
|
|||||||
elif action.type == 'change_devel':
|
elif action.type == 'change_devel':
|
||||||
d['source'] = prj_pkg_join(action.tgt_project, action.tgt_package)
|
d['source'] = prj_pkg_join(action.tgt_project, action.tgt_package)
|
||||||
d['target'] = 'developed in %s' % prj_pkg_join(action.src_project, action.src_package)
|
d['target'] = 'developed in %s' % prj_pkg_join(action.src_project, action.src_package)
|
||||||
|
elif action.type == 'maintenance_incident':
|
||||||
|
d['source'] = '%s ->' % action.src_project
|
||||||
|
d['target'] = action.tgt_project
|
||||||
|
elif action.type == 'maintenance_release':
|
||||||
|
d['source'] = '%s ->' % prj_pkg_join(action.src_project, action.src_package)
|
||||||
|
d['target'] = prj_pkg_join(action.tgt_project, action.tgt_package)
|
||||||
elif action.type == 'submit':
|
elif action.type == 'submit':
|
||||||
srcupdate = ' '
|
srcupdate = ' '
|
||||||
if action.opt_sourceupdate and show_srcupdate:
|
if action.opt_sourceupdate and show_srcupdate:
|
||||||
|
Loading…
Reference in New Issue
Block a user