1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-25 11:42:12 +01:00

add linkpac --current paramter to create links with revision number

included.
This commit is contained in:
Adrian Schröter 2009-04-08 11:48:34 +00:00
parent 17327a3db9
commit c298692e68

View File

@ -693,6 +693,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
return 2 return 2
@cmdln.option('-c', '--current', action='store_true',
help='link fixed against current revision.')
@cmdln.option('-r', '--revision', metavar='rev', @cmdln.option('-r', '--revision', metavar='rev',
help='link the specified revision.') help='link the specified revision.')
def do_linkpac(self, subcmd, opts, *args): def do_linkpac(self, subcmd, opts, *args):
@ -736,6 +738,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
print >>sys.stderr, 'Error: source and destination are the same.' print >>sys.stderr, 'Error: source and destination are the same.'
return 1 return 1
if opts.current:
rev = show_upstream_rev(conf.config['apiurl'], src_project, src_package);
if rev and not checkRevision(src_project, src_package, rev): if rev and not checkRevision(src_project, src_package, rev):
print >>sys.stderr, 'Revision \'%s\' does not exist' % rev print >>sys.stderr, 'Revision \'%s\' does not exist' % rev
sys.exit(1) sys.exit(1)