1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-09 22:36:14 +01:00

Fix 'osc mv' command

This commit is contained in:
Daniel Mach 2022-09-20 10:03:52 +02:00
parent 451067bf05
commit 42dcc7ca3c

View File

@ -8942,10 +8942,14 @@ Please submit there instead, or use --nodevelproject to force direct submission.
@cmdln.option('-f', '--force', action='store_true',
help='forces removal of entire package and its files')
def do_mv(self, subcmd, opts, source, dest):
@cmdln.option('source')
@cmdln.option('dest')
def do_mv(self, subcmd, opts):
"""
Move SOURCE file to DEST and keep it under version control
"""
source = opts.source
dest = opts.dest
if not os.path.isfile(source):
raise oscerr.WrongArgs("Source file '%s' does not exist or is not a file" % source)