mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-27 07:06:13 +01:00
Merge pull request #727 from lethliel/version_in_osc_maintained
print verion in osc maintained if --version is given
This commit is contained in:
commit
ff7b64d5eb
@ -3327,6 +3327,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
@cmdln.option('--nodevelproject', action='store_true',
|
||||
help='do not follow a defined devel project ' \
|
||||
'(primary project where a package is developed)')
|
||||
@cmdln.option('--version', action='store_true',
|
||||
help='print version of maintained package')
|
||||
@cmdln.alias('sm')
|
||||
@cmdln.alias('maintained')
|
||||
def do_mbranch(self, subcmd, opts, *args):
|
||||
@ -3384,6 +3386,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
if opts.dryrun:
|
||||
for r in result.findall('package'):
|
||||
line="%s/%s"%(r.get('project'), r.get('package'))
|
||||
if opts.version:
|
||||
sr = get_source_rev(apiurl, r.get('project'), r.get('package'))
|
||||
version = sr.get('version')
|
||||
if not version or version == 'unknown':
|
||||
version = 'unknown'
|
||||
line = line + (' (version: %s)' % version)
|
||||
for d in r.findall('devel'):
|
||||
line+=" using sources from %s/%s"%(d.get('project'), d.get('package'))
|
||||
print(line)
|
||||
|
Loading…
Reference in New Issue
Block a user