1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-24 17:16:12 +01:00

- allow to directly expand a non-link during "osc up -e"

This commit is contained in:
Marcus Huewe 2016-02-08 17:24:35 +01:00
parent 244a704033
commit d646915c04
2 changed files with 5 additions and 2 deletions

View File

@ -4705,9 +4705,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
# sys.exit(1)
if not rev:
if opts.expand_link and p.islink() and not p.isexpanded():
if opts.expand_link:
rev = p.latest_rev(expand=True)
print('Expanding to rev', rev)
if p.islink() and not p.isexpanded():
print('Expanding to rev', rev)
elif opts.unexpand_link and p.islink() and p.isexpanded():
rev = show_upstream_rev(p.apiurl, p.prjname, p.name, meta=p.meta)
print('Unexpanding to rev', rev)

View File

@ -2080,6 +2080,8 @@ rev: %s
except:
upstream_rev = show_upstream_xsrcmd5(self.apiurl, self.prjname, self.name, linkrev="base", meta=self.meta, include_service_files=include_service_files)
self.mark_frozen()
elif not self.islink() and expand:
upstream_rev = show_upstream_xsrcmd5(self.apiurl, self.prjname, self.name, meta=self.meta, include_service_files=include_service_files)
else:
upstream_rev = show_upstream_rev(self.apiurl, self.prjname, self.name, meta=self.meta, include_service_files=include_service_files)
return upstream_rev