mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 00:56:15 +01:00
- add also simple maintenance release request command
This commit is contained in:
parent
44e4eb9334
commit
281f6dd0ca
3
NEWS
3
NEWS
@ -22,7 +22,8 @@
|
||||
- support project wide source services
|
||||
- support for armv7hl architecuture. used to denote armv7 + hardfloat binaries
|
||||
- add force option to accept requests in review state.
|
||||
- add "maintenancerequests" command to request a maintenance incident from maintenance team
|
||||
- add "maintenancerequest" command to request a maintenance incident from maintenance team
|
||||
- add "releaserequest" command run a maintenance update release process (for maintenance team only)
|
||||
|
||||
0.130
|
||||
- new "revert" command to restore the original working copy file (without
|
||||
|
@ -2330,6 +2330,47 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
print r
|
||||
|
||||
|
||||
@cmdln.option('-m', '--message', metavar='TEXT',
|
||||
help='specify message TEXT')
|
||||
def do_releaserequest(self, subcmd, opts, *args):
|
||||
"""${cmd_name}: Create a request for releasing a maintenance update.
|
||||
|
||||
[See http://doc.opensuse.org/products/draft/OBS/obs-reference-guide/cha.obs.maintenance_setup.html
|
||||
for information on this topic.]
|
||||
|
||||
This command is used by the maintence team to start the release process of a maintenance update.
|
||||
This includes usually testing based on the defined reviewers of the update project.
|
||||
|
||||
usage:
|
||||
osc releaserequest [ SOURCEPROJECT ]
|
||||
${cmd_option_list}
|
||||
"""
|
||||
|
||||
# FIXME: additional parameters can be a certain repo list to create a partitial release
|
||||
|
||||
args = slash_split(args)
|
||||
apiurl = self.get_api_url()
|
||||
|
||||
source_project = None
|
||||
|
||||
if len(args) > 1:
|
||||
raise oscerr.WrongArgs('Too many arguments.')
|
||||
|
||||
if len(args) == 0 and is_project_dir(os.curdir):
|
||||
source_project = store_read_project(os.curdir)
|
||||
elif len(args) == 0:
|
||||
raise oscerr.WrongArgs('Too few arguments.')
|
||||
if len(args) > 0:
|
||||
source_project = args[0]
|
||||
|
||||
if not opts.message:
|
||||
opts.message = edit_message()
|
||||
|
||||
r = create_release_request(apiurl, source_project, opts.message)
|
||||
print r.reqid
|
||||
|
||||
|
||||
|
||||
@cmdln.option('-a', '--attribute', metavar='ATTRIBUTE',
|
||||
help='Use this attribute to find default maintenance project (default is OBS:Maintenance)')
|
||||
@cmdln.option('-m', '--message', metavar='TEXT',
|
||||
|
11
osc/core.py
11
osc/core.py
@ -3468,6 +3468,17 @@ def clone_request(apiurl, reqid, msg=None):
|
||||
raise oscerr.APIError('invalid data from clone request:\n%s\n' % ET.tostring(root))
|
||||
return project
|
||||
|
||||
# create a maintenance release request
|
||||
def create_release_request(apiurl, src_project, message=''):
|
||||
import cgi
|
||||
r = Request()
|
||||
# api will complete the request
|
||||
r.add_action('maintenance_release', src_project=src_project)
|
||||
# XXX: clarify why we need the unicode(...) stuff
|
||||
r.description = cgi.escape(unicode(message, 'utf8'))
|
||||
r.create(apiurl)
|
||||
return r
|
||||
|
||||
# create a maintenance incident per request
|
||||
def create_maintenance_request(apiurl, src_project, tgt_project, message=''):
|
||||
import cgi
|
||||
|
Loading…
Reference in New Issue
Block a user