overtag existing builds

This commit is contained in:
Tomas Kopecek 2020-03-25 15:06:15 +01:00
parent bd9ce26461
commit af14fc4a69
3 changed files with 22 additions and 11 deletions

View file

@ -3378,10 +3378,8 @@ def handle_clone_tag(goptions, session, args):
parser.add_option('--ts', type='int', metavar="TIMESTAMP",
help=_('Clone tag at last event before specific timestamp'))
parser.add_option('--no-delete', action='store_false', dest="delete",
default=True,
help=_("Don't delete any existing content in dest tag. "
"Note, that you can end with older latest builds in dest "
"than in src, if they are already tagged."))
default=True,
help=_("Don't delete any existing content in dest tag."))
parser.add_option('--event', type='int',
help=_('Clone tag at a specific event'))
parser.add_option('--repo', type='int',
@ -3596,6 +3594,8 @@ def handle_clone_tag(goptions, session, args):
# remove it for next pass so we stay aligned with outer
# loop
del dstblds[nvr]
if not options.delete:
ablds.append(srcbld)
else:
ablds.append(srcbld)
baddlist.extend(ablds)

View file

@ -814,24 +814,36 @@ List of changes:
extra_arches='arch3 arch4',
owner='userB'),
call.multiCall(batch=1000),
call.tagBuildBypass('dst-tag', {
'owner_name': 'b_owner',
'nvr': 'pkg1-1.0-1',
'package_name': 'pkg1', 'state': 1,
'tag_name': 'src-tag',
'name': 'pkg1'}, force=None, notify=False),
call.tagBuildBypass('dst-tag', {
'owner_name': 'b_owner',
'nvr': 'pkg1-0.1-1',
'package_name': 'pkg1', 'state': 1,
'tag_name': 'src-tag',
'name': 'pkg1'}, force=None),
'name': 'pkg1'}, force=None, notify=False),
call.tagBuildBypass('dst-tag', {
'owner_name': 'b_owner',
'nvr': 'pkg1-1.0-2',
'package_name': 'pkg1', 'state': 1,
'tag_name': 'src-tag',
'name': 'pkg1'}, force=None),
'name': 'pkg1'}, force=None, notify=False),
call.tagBuildBypass('dst-tag', {
'owner_name': 'b_owner',
'nvr': 'pkg1-1.1-2',
'package_name': 'pkg1', 'state': 1,
'tag_name': 'src-tag',
'name': 'pkg1'}, force=None),
'name': 'pkg1'}, force=None, notify=False),
call.tagBuildBypass('dst-tag', {
'owner_name': 'b_owner',
'nvr': 'pkg2-1.0-1',
'package_name': 'pkg2', 'state': 2,
'tag_name': 'src-tag-p',
'name': 'pkg2'}, force=None, notify=False),
call.multiCall(batch=1000),
call.multiCall(batch=1000),
call.groupPackageListAdd('dst-tag',
@ -860,9 +872,11 @@ List of changes:
Action From/To Package Build(s) State Owner From Tag
------- ---------------------------- ---------------------------------------- ---------- ---------- ----------
[add] pkg1 pkg1-1.0-1 COMPLETE b_owner src-tag
[add] pkg1 pkg1-0.1-1 COMPLETE b_owner src-tag
[add] pkg1 pkg1-1.0-2 COMPLETE b_owner src-tag
[add] pkg1 pkg1-1.1-2 COMPLETE b_owner src-tag
[add] pkg2 pkg2-1.0-1 DELETED b_owner src-tag-p
Action Package Group
------- ---------------------------- ----------------------------
@ -890,9 +904,7 @@ Options:
--inherit-builds Include all builds inherited into the source tag into the
dest tag
--ts=TIMESTAMP Clone tag at last event before specific timestamp
--no-delete Don't delete any existing content in dest tag. Note, that
you can end with older latest builds in dest than in src,
if they are already tagged.
--no-delete Don't delete any existing content in dest tag.
--event=EVENT Clone tag at a specific event
--repo=REPO Clone tag at a specific repo event
-v, --verbose show changes

View file

@ -1,6 +1,5 @@
from __future__ import print_function
from __future__ import absolute_import
import locale
import mock
import os
import six