diff --git a/osc/commandline.py b/osc/commandline.py index 841dedfa..98d5844b 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1664,10 +1664,12 @@ Please submit there instead, or use --nodevelproject to force direct submission. @cmdln.option('-c', '--checkout', action='store_true', help='Checkout branched package afterwards ' \ '(\'osc bco\' is a shorthand for this option)' ) - @cmdln.option('-r', '--revision', metavar='rev', - help='branch against a specific revision') + @cmdln.option('-f', '--force', default=False, action="store_true", + help='force commit - do not tests a file list') @cmdln.option('-m', '--message', metavar='TEXT', help='specify message TEXT') + @cmdln.option('-r', '--revision', metavar='rev', + help='branch against a specific revision') def do_branch(self, subcmd, opts, *args): """${cmd_name}: Branch a package @@ -1725,7 +1727,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. branch_pkg(conf.config['apiurl'], args[0], args[1], nodevelproject=opts.nodevelproject, rev=opts.revision, target_project=tproject, target_package=tpackage, - return_existing=opts.checkout, msg=opts.message or '') + return_existing=opts.checkout, msg=opts.message or '', + force=opts.force) if exists: print >>sys.stderr, 'Using existing branch project: %s' % targetprj diff --git a/osc/core.py b/osc/core.py index 1934c4b8..8e25457f 100644 --- a/osc/core.py +++ b/osc/core.py @@ -3386,7 +3386,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): +def attribute_branch_pkg(apiurl, attribute, maintained_update_project_attribute, package, targetproject, return_existing=False, force=False): """ Branch packages defined via attributes (via API call) """ @@ -3394,6 +3394,8 @@ def attribute_branch_pkg(apiurl, attribute, maintained_update_project_attribute, query['attribute'] = attribute if targetproject: query['target_project'] = targetproject + if force: + query['force'] = "1" if package: query['package'] = package if maintained_update_project_attribute: