1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-24 07:08:53 +02:00

- support modification flages on creation of submit request

(for auto update or clean up packages or to avoid it, when submit request got accepted)
- show request ids from package source logs
This commit is contained in:
2009-09-05 13:46:55 +00:00
parent 5f35c67b63
commit e040ae85f5
3 changed files with 51 additions and 16 deletions

View File

@@ -501,6 +501,12 @@ class Osc(cmdln.Cmdln):
@cmdln.option('--nodevelproject', action='store_true',
help='do not follow a defined devel project ' \
'(primary project where a package is developed)')
@cmdln.option('--cleanup', action='store_true',
help='remove package if submission gets accepted (default for home:<id>:branch projects)')
@cmdln.option('--no-cleanup', action='store_true',
help='never remove source package on accept, but update its content')
@cmdln.option('--no-update', action='store_true',
help='never touch source package on accept (will break source links)')
@cmdln.option('-d', '--diff', action='store_true',
help='show diff only instead of creating the actual request')
@cmdln.option('-l', '--list', action='store_true',
@@ -534,6 +540,15 @@ class Osc(cmdln.Cmdln):
opts.days = conf.config['request_list_days']
return self.do_request('list', opts, *args)
flags = None
# we should check here for home:<id>:branch and default to update, but that would require OBS 1.7 server
if opts.cleanup:
flags = "cleanup"
elif opts.no_cleanup:
flags = "update"
elif opts.no_update:
flags = "noupdate"
args = slash_split(args)
# remove this block later again
@@ -633,7 +648,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
result = create_submit_request(apiurl,
src_project, src_package,
dst_project, dst_package,
opts.message, orev=opts.revision)
opts.message, orev=opts.revision, flags=flags)
if repl == 'y':
for req in myreqs:
change_request_state(apiurl, str(req.reqid), 'revoked',