Permalink
Browse files

- add support for new branch --extend_package_names

  • Loading branch information...
1 parent f47e8f1 commit a5edbb201ae00839f7d79047706ef61fa0aaf1d5 @adrianschroeter adrianschroeter committed Dec 1, 2011
Showing with 9 additions and 2 deletions.
  1. +1 −0 NEWS
  2. +5 −1 osc/commandline.py
  3. +3 −1 osc/core.py
View
1 NEWS
@@ -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
View
@@ -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',
@@ -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
View
@@ -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)
"""
@@ -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:

0 comments on commit a5edbb2

Please sign in to comment.