mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-15 01:56:17 +01:00
- added "--message" option to branch cmd
This commit is contained in:
parent
c6b74d6425
commit
f0d07774f4
@ -1620,6 +1620,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
'(\'osc bco\' is a shorthand for this option)' )
|
'(\'osc bco\' is a shorthand for this option)' )
|
||||||
@cmdln.option('-r', '--revision', metavar='rev',
|
@cmdln.option('-r', '--revision', metavar='rev',
|
||||||
help='branch against a specific revision')
|
help='branch against a specific revision')
|
||||||
|
@cmdln.option('-m', '--message', metavar='TEXT',
|
||||||
|
help='specify message TEXT')
|
||||||
def do_branch(self, subcmd, opts, *args):
|
def do_branch(self, subcmd, opts, *args):
|
||||||
"""${cmd_name}: Branch a package
|
"""${cmd_name}: Branch a package
|
||||||
|
|
||||||
@ -1667,7 +1669,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
branch_pkg(conf.config['apiurl'], args[0], args[1],
|
branch_pkg(conf.config['apiurl'], args[0], args[1],
|
||||||
nodevelproject=opts.nodevelproject, rev=opts.revision,
|
nodevelproject=opts.nodevelproject, rev=opts.revision,
|
||||||
target_project=tproject, target_package=tpackage,
|
target_project=tproject, target_package=tpackage,
|
||||||
return_existing=opts.checkout)
|
return_existing=opts.checkout, msg=opts.message or '')
|
||||||
if exists:
|
if exists:
|
||||||
print >>sys.stderr, 'Using existing branch project: %s' % targetprj
|
print >>sys.stderr, 'Using existing branch project: %s' % targetprj
|
||||||
|
|
||||||
|
@ -3273,7 +3273,7 @@ def attribute_branch_pkg(apiurl, attribute, maintained_update_project_attribute,
|
|||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None, target_project=None, target_package=None, return_existing=False):
|
def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None, target_project=None, target_package=None, return_existing=False, msg=''):
|
||||||
"""
|
"""
|
||||||
Branch a package (via API call)
|
Branch a package (via API call)
|
||||||
"""
|
"""
|
||||||
@ -3286,6 +3286,8 @@ def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None,
|
|||||||
query['target_project'] = target_project
|
query['target_project'] = target_project
|
||||||
if target_package:
|
if target_package:
|
||||||
query['target_package'] = target_package
|
query['target_package'] = target_package
|
||||||
|
if msg:
|
||||||
|
query['comment'] = msg
|
||||||
u = makeurl(apiurl, ['source', src_project, src_package], query=query)
|
u = makeurl(apiurl, ['source', src_project, src_package], query=query)
|
||||||
try:
|
try:
|
||||||
f = http_POST(u)
|
f = http_POST(u)
|
||||||
|
Loading…
Reference in New Issue
Block a user