Skip to content

Commit

Permalink
- core.set_link_rev: return revision
Browse files Browse the repository at this point in the history
- do_setlinkrev: print the revision which is stored in the 'rev' attribute (if rev is not None)
  • Loading branch information
marcus-h committed Nov 17, 2011
1 parent e945409 commit 64224f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions osc/commandline.py
Expand Up @@ -2184,8 +2184,11 @@ def do_setlinkrev(self, subcmd, opts, *args):
packages = meta_get_packagelist(apiurl, project)

for p in packages:
print 'setting revision to %s for package %s' % (rev, p)
set_link_rev(apiurl, project, p, revision=rev, expand=expand, baserev=baserev)
rev = set_link_rev(apiurl, project, p, revision=rev, expand=expand, baserev=baserev)
if rev is None:
print 'removed revision from link'
else:
print 'set revision to %s for package %s' % (rev, p)


def do_linktobranch(self, subcmd, opts, *args):
Expand Down
1 change: 1 addition & 0 deletions osc/core.py
Expand Up @@ -5467,6 +5467,7 @@ def set_link_rev(apiurl, project, package, revision='', expand=False, baserev=Fa

l = ET.tostring(root)
http_PUT(url, data=l)
return revision


def delete_dir(dir):
Expand Down

0 comments on commit 64224f9

Please sign in to comment.