mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
- add --linkrev option to branch command
This commit is contained in:
parent
e9766d5d5b
commit
df9c3000b0
1
NEWS
1
NEWS
@ -4,6 +4,7 @@
|
||||
OBS 2.7 only:
|
||||
- add "addchannels" and "enablechannel" commands
|
||||
- support new package instances on branching when using -N parameter
|
||||
- add --linkrev option to branch command
|
||||
|
||||
0.152
|
||||
- add support searching for groups via "group:" prefix
|
||||
|
@ -3241,6 +3241,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
help='create a branch pointing to a not yet existing package')
|
||||
@cmdln.option('-r', '--revision', metavar='rev',
|
||||
help='branch against a specific revision')
|
||||
@cmdln.option('--linkrev', metavar='linkrev',
|
||||
help='specify the used revision in the link target.')
|
||||
def do_branch(self, subcmd, opts, *args):
|
||||
"""${cmd_name}: Branch a package
|
||||
|
||||
@ -3259,6 +3261,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
(list of projects from oscrc:getpac_default_project)
|
||||
if nothing else is specfied on the command line.
|
||||
|
||||
In case of branch errors, where the source has currently merge
|
||||
conflicts use --linkrev=base option.
|
||||
|
||||
usage:
|
||||
osc branch
|
||||
osc branch SOURCEPROJECT SOURCEPACKAGE
|
||||
@ -3298,6 +3303,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
exists, targetprj, targetpkg, srcprj, srcpkg = \
|
||||
branch_pkg(apiurl, args[0], args[1],
|
||||
nodevelproject=opts.nodevelproject, rev=opts.revision,
|
||||
linkrev=opts.linkrev,
|
||||
target_project=tproject, target_package=tpackage,
|
||||
return_existing=opts.checkout, msg=opts.message or '',
|
||||
force=opts.force, noaccess=opts.noaccess,
|
||||
@ -3311,6 +3317,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
exists, targetprj, targetpkg, srcprj, srcpkg = \
|
||||
branch_pkg(apiurl, args[0], args[1],
|
||||
nodevelproject=opts.nodevelproject, rev=opts.revision,
|
||||
linkrev=opts.linkrev,
|
||||
target_project=tproject, target_package=tpackage,
|
||||
return_existing=opts.checkout, msg=opts.message or '',
|
||||
force=opts.force, noaccess=opts.noaccess,
|
||||
@ -7716,9 +7723,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
raise oscerr.APIError('source link is not broken')
|
||||
workingrev = None
|
||||
|
||||
baserev = linkinfo.get('baserev')
|
||||
if baserev != None:
|
||||
query = { 'rev': 'latest', 'linkrev': baserev }
|
||||
if linkinfo.get('baserev'):
|
||||
query = { 'rev': 'latest', 'linkrev': 'base' }
|
||||
u = makeurl(apiurl, ['source', prj, package], query=query)
|
||||
f = http_GET(u)
|
||||
root = ET.parse(f).getroot()
|
||||
|
@ -5016,7 +5016,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, extend_package_names=False, missingok=False, maintenance=False, newinstance=False):
|
||||
def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None, linkrev=None, target_project=None, target_package=None, return_existing=False, msg='', force=False, noaccess=False, add_repositories=False, extend_package_names=False, missingok=False, maintenance=False, newinstance=False):
|
||||
"""
|
||||
Branch a package (via API call)
|
||||
"""
|
||||
@ -5039,6 +5039,8 @@ def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None,
|
||||
query['extend_package_names'] = "1"
|
||||
if rev:
|
||||
query['rev'] = rev
|
||||
if linkrev:
|
||||
query['linkrev'] = linkrev
|
||||
if target_project:
|
||||
query['target_project'] = target_project
|
||||
if target_package:
|
||||
|
Loading…
Reference in New Issue
Block a user