1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +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) # sys.exit(1)
if not rev: if not rev:
if opts.expand_link and p.islink() and not p.isexpanded(): if opts.expand_link:
rev = p.latest_rev(expand=True) 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(): elif opts.unexpand_link and p.islink() and p.isexpanded():
rev = show_upstream_rev(p.apiurl, p.prjname, p.name, meta=p.meta) rev = show_upstream_rev(p.apiurl, p.prjname, p.name, meta=p.meta)
print('Unexpanding to rev', rev) print('Unexpanding to rev', rev)

View File

@ -2080,6 +2080,8 @@ rev: %s
except: except:
upstream_rev = show_upstream_xsrcmd5(self.apiurl, self.prjname, self.name, linkrev="base", meta=self.meta, include_service_files=include_service_files) 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() 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: else:
upstream_rev = show_upstream_rev(self.apiurl, self.prjname, self.name, meta=self.meta, include_service_files=include_service_files) upstream_rev = show_upstream_rev(self.apiurl, self.prjname, self.name, meta=self.meta, include_service_files=include_service_files)
return upstream_rev return upstream_rev