1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-11 16:36:14 +01:00

add repository strategy options to branch command

This commit is contained in:
Adrian Schröter 2016-03-02 17:12:28 +01:00
parent 84935cc686
commit 779c7763cc
3 changed files with 15 additions and 1 deletions

2
NEWS
View File

@ -7,6 +7,8 @@
- add "addchannels" and "enablechannel" commands
- support new package instances on branching when using -N parameter
- add --linkrev option to branch command
- add --add-repository-block option to branch command
- add --add-repository-rebuild option to branch command
0.152
- add support searching for groups via "group:" prefix

View File

@ -3264,6 +3264,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='branch against a specific revision')
@cmdln.option('--linkrev', metavar='linkrev',
help='specify the used revision in the link target.')
@cmdln.option('--add-repositories-block', metavar='add_repositories_block',
help='specify the used block strategy for new repositories')
@cmdln.option('--add-repositories-rebuild', metavar='add_repositories_rebuild',
help='specify the used rebuild strategy for new repositories')
def do_branch(self, subcmd, opts, *args):
"""${cmd_name}: Branch a package
@ -3329,6 +3333,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
return_existing=opts.checkout, msg=opts.message or '',
force=opts.force, noaccess=opts.noaccess,
add_repositories=opts.add_repositories,
add_repositories_block=opts.add_repositories_block,
add_repositories_rebuild=opts.add_repositories_rebuild,
extend_package_names=opts.extend_package_names,
missingok=opts.new_package,
maintenance=opts.maintenance)
@ -3343,6 +3349,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
return_existing=opts.checkout, msg=opts.message or '',
force=opts.force, noaccess=opts.noaccess,
add_repositories=opts.add_repositories,
add_repositories_block=opts.add_repositories_block,
add_repositories_rebuild=opts.add_repositories_rebuild,
extend_package_names=opts.extend_package_names,
missingok=False,
maintenance=opts.maintenance,

View File

@ -5030,7 +5030,7 @@ def attribute_branch_pkg(apiurl, attribute, maintained_update_project_attribute,
return r
def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None, linkrev=None, target_project=None, target_package=None, return_existing=False, msg='', force=False, noaccess=False, add_repositories=False, extend_package_names=False, missingok=False, maintenance=False, newinstance=False):
def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None, linkrev=None, target_project=None, target_package=None, return_existing=False, msg='', force=False, noaccess=False, add_repositories=False, add_repositories_block=None, add_repositories_rebuild=None, extend_package_names=False, missingok=False, maintenance=False, newinstance=False):
"""
Branch a package (via API call)
"""
@ -5043,6 +5043,10 @@ def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None,
query['noaccess'] = '1'
if add_repositories:
query['add_repositories'] = "1"
if add_repositories_block:
query['add_repositories_block'] = add_repositories_block
if add_repositories_rebuild:
query['add_repositories_rebuild'] = add_repositories_rebuild
if maintenance:
query['maintenance'] = "1"
if missingok: