1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 22:56:15 +01:00

fix copypac with same source and destination:

If a revision is specified, this is actually a revert call and it has to work.
This commit is contained in:
Adrian Schröter 2010-05-08 08:03:56 +02:00
parent 70d772e942
commit 1c24457bed

View File

@ -1563,11 +1563,6 @@ Please submit there instead, or use --nodevelproject to force direct submission.
else:
dst_apiurl = src_apiurl
if src_project == dst_project and \
src_package == dst_package and \
src_apiurl == dst_apiurl:
raise oscerr.WrongArgs('Source and destination are the same.')
if src_apiurl != dst_apiurl:
opts.client_side_copy = True
@ -1580,6 +1575,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
rev = show_upstream_rev(src_apiurl, src_project, src_package)
comment = 'osc copypac from project:%s package:%s revision:%s' % ( src_project, src_package, rev )
if src_project == dst_project and \
src_package == dst_package and \
not rev and \
src_apiurl == dst_apiurl:
raise oscerr.WrongArgs('Source and destination are the same.')
r = copy_pac(src_apiurl, src_project, src_package,
dst_apiurl, dst_project, dst_package,
client_side_copy=opts.client_side_copy,