From c298692e6812af326fcca216b20674c2faad9527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 8 Apr 2009 11:48:34 +0000 Subject: [PATCH] add linkpac --current paramter to create links with revision number included. --- osc/commandline.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osc/commandline.py b/osc/commandline.py index 69044ee5..4891618b 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -693,6 +693,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. return 2 + @cmdln.option('-c', '--current', action='store_true', + help='link fixed against current revision.') @cmdln.option('-r', '--revision', metavar='rev', help='link the specified revision.') 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.' 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): print >>sys.stderr, 'Revision \'%s\' does not exist' % rev sys.exit(1)