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

- support new branch add_repositories api call

This commit is contained in:
Adrian Schröter 2011-11-25 10:12:16 +01:00
parent da745728cc
commit b659ad5285
3 changed files with 7 additions and 2 deletions

1
NEWS
View File

@ -9,6 +9,7 @@
# Features which requires OBS 2.3
#
- support source services using OBS project or package name
- branch --add-repositories can be used to add repos from source project to target project
0.132
- rdelete and undelete command requesting now a comment

View File

@ -2710,6 +2710,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
'(\'osc bco\' is a shorthand for this option)' )
@cmdln.option('-f', '--force', default=False, action="store_true",
help='force branch, overwrite target')
@cmdln.option('--add-repositories', default=False, action="store_true",
help='Add repositories to target project (happens by default when project is new)')
@cmdln.option('--noaccess', action='store_true',
help='Create a hidden project')
@cmdln.option('-m', '--message', metavar='TEXT',
@ -2773,7 +2775,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
nodevelproject=opts.nodevelproject, rev=opts.revision,
target_project=tproject, target_package=tpackage,
return_existing=opts.checkout, msg=opts.message or '',
force=opts.force, noaccess=opts.noaccess)
force=opts.force, noaccess=opts.noaccess, add_repositories=opts.add_repositories)
if exists:
print >>sys.stderr, 'Using existing branch project: %s' % targetprj

View File

@ -4287,7 +4287,7 @@ def aggregate_pac(src_project, src_package, dst_project, dst_package, repo_map =
print 'Done.'
def attribute_branch_pkg(apiurl, attribute, maintained_update_project_attribute, package, targetproject, return_existing=False, force=False, noaccess=False):
def attribute_branch_pkg(apiurl, attribute, maintained_update_project_attribute, package, targetproject, return_existing=False, force=False, noaccess=False, add_repositories=False):
"""
Branch packages defined via attributes (via API call)
"""
@ -4299,6 +4299,8 @@ def attribute_branch_pkg(apiurl, attribute, maintained_update_project_attribute,
query['force'] = "1"
if noaccess:
query['noaccess'] = "1"
if add_repositories:
query['add_repositories'] = "1"
if package:
query['package'] = package
if maintained_update_project_attribute: