From a337968dcbaec9d9fa0e59249349ce4fc13a0d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 19 May 2010 10:47:01 +0200 Subject: [PATCH] * support branching with --force, to override existing target. * Sorted OBS 2.0 features in NEWS file --- NEWS | 8 ++++++-- osc/commandline.py | 2 +- osc/core.py | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 9919c517..4d4de0e0 100644 --- a/NEWS +++ b/NEWS @@ -1,11 +1,15 @@ 0.127 - add size limit mode, files can be ignored on checkout or update given a certain size limit. - --csv/--format options for results command - using format user can explicitly specify what he wants print - - support for "unresolvable" state of OBS 2.0 - osc branch reads project/package in package directory - fix creation of package link, when target project has the package via linked project - - add support for CBpreinstall/CBinstall +# +# Features which require OBS 2.0 +# - support "osc add http://...", this uses obs source service for downloading a file and verify it via sha256 verifier service + - add support for CBpreinstall/CBinstall + - support branch --force to override target + - support for "unresolvable" state of OBS 2.0 0.126 - added VM autosetup to osc. This requires appropriate OBS version and build script version. diff --git a/osc/commandline.py b/osc/commandline.py index 98d5844b..57bc7e2d 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1665,7 +1665,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='Checkout branched package afterwards ' \ '(\'osc bco\' is a shorthand for this option)' ) @cmdln.option('-f', '--force', default=False, action="store_true", - help='force commit - do not tests a file list') + help='force branch, overwrite target') @cmdln.option('-m', '--message', metavar='TEXT', help='specify message TEXT') @cmdln.option('-r', '--revision', metavar='rev', diff --git a/osc/core.py b/osc/core.py index 1012ef8f..7fcfb88a 100644 --- a/osc/core.py +++ b/osc/core.py @@ -3417,13 +3417,15 @@ 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=''): +def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None, target_project=None, target_package=None, return_existing=False, msg='', force=False): """ Branch a package (via API call) """ query = { 'cmd': 'branch' } if nodevelproject: query['ignoredevel'] = '1' + if force: + query['force'] = '1' if rev: query['rev'] = rev if target_project: