mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 06:46:13 +01:00
- restore default behaviour of setlinkrev command
The purpose of the default is to freeze the link to the current version in the link target. It did entirely drop the rev attribute which basically unfreeze the link (same as -u).
This commit is contained in:
parent
c873252d70
commit
c7222540e3
@ -5982,6 +5982,7 @@ def set_link_rev(apiurl, project, package, revision='', expand=False):
|
||||
revision = _set_link_rev(apiurl, project, package, root, revision, expand=expand)
|
||||
l = ET.tostring(root, encoding=ET_ENCODING)
|
||||
http_PUT(url, data=l)
|
||||
return revision
|
||||
|
||||
def _set_link_rev(apiurl, project, package, root, revision='', expand=False):
|
||||
"""
|
||||
@ -5996,8 +5997,6 @@ def _set_link_rev(apiurl, project, package, root, revision='', expand=False):
|
||||
src_project = root.get('project', project)
|
||||
src_package = root.get('package', package)
|
||||
vrev = None
|
||||
if revision == '':
|
||||
revision = root.get('rev', '')
|
||||
if revision is None:
|
||||
if 'rev' in root.keys():
|
||||
del root.attrib['rev']
|
||||
|
Loading…
Reference in New Issue
Block a user