diff --git a/NEWS b/NEWS index 567ec37d..9872f437 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ 0.140 + - allow specifying directories as mv targets - 0.139 diff --git a/osc/commandline.py b/osc/commandline.py index ce66f9b0..e8fdfc99 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -7638,6 +7638,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. if not tgt_pkg: raise oscerr.NoWorkingCopy("Error: \"%s\" does not point to an osc working copy." % os.path.abspath(dest)) + if os.path.isfile(source) and os.path.isdir(dest): + dest = os.path.join(dest, os.path.basename(source)) os.rename(source, dest) try: tgt_pkg[0].addfile(os.path.basename(dest))