From c7222540e3526ea83732c980b37ec56c1aa4a80b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 16 May 2014 10:28:47 +0200 Subject: [PATCH] - 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). --- osc/core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osc/core.py b/osc/core.py index c50434a0..226615df 100644 --- a/osc/core.py +++ b/osc/core.py @@ -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']