Skip to content

Commit

Permalink
- add support for new branch --extend_package_names
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Dec 1, 2011
1 parent f47e8f1 commit a5edbb2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- support source services using OBS project or package name
- support updateing _patchinfo file with new issues just by calling "osc patchinfo" again
- branch --add-repositories can be used to add repos from source project to target project
- branch --extend-package-names can be used to do mbranch like branch of a single package

0.132
- rdelete and undelete command requesting now a comment
Expand Down
6 changes: 5 additions & 1 deletion osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2732,6 +2732,8 @@ def do_mbranch(self, subcmd, opts, *args):
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('--extend-package-names', default=False, action="store_true",
help='Extend packages names with project name as suffix')
@cmdln.option('--noaccess', action='store_true',
help='Create a hidden project')
@cmdln.option('-m', '--message', metavar='TEXT',
Expand Down Expand Up @@ -2795,7 +2797,9 @@ def do_branch(self, subcmd, opts, *args):
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, add_repositories=opts.add_repositories)
force=opts.force, noaccess=opts.noaccess,
add_repositories=opts.add_repositories,
extend_package_names=opt.extend_package_names)
if exists:
print >>sys.stderr, 'Using existing branch project: %s' % targetprj

Expand Down
4 changes: 3 additions & 1 deletion osc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4322,7 +4322,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, target_project=None, target_package=None, return_existing=False, msg='', force=False, noaccess=False, add_repositories=False):
def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None, target_project=None, target_package=None, return_existing=False, msg='', force=False, noaccess=False, add_repositories=False, extend_package_names=False):
"""
Branch a package (via API call)
"""
Expand All @@ -4335,6 +4335,8 @@ def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None,
query['noaccess'] = '1'
if add_repositories:
query['add_repositories'] = "1"
if extend_package_names:
query['extend_package_names'] = "1"
if rev:
query['rev'] = rev
if target_project:
Expand Down

0 comments on commit a5edbb2

Please sign in to comment.