PR#2364: cli clone-tag - get srctag info with event
Merges #2364 https://pagure.io/koji/pull-request/2364 Fixes: #2101 https://pagure.io/koji/issue/2101 CLI clone-tag with options --repo, --ts, --event
This commit is contained in:
commit
43db33eac2
2 changed files with 3 additions and 3 deletions
|
|
@ -3406,7 +3406,7 @@ def handle_clone_tag(goptions, session, args):
|
||||||
print(_("Cloning at event %(id)i (%(timestr)s)") % event)
|
print(_("Cloning at event %(id)i (%(timestr)s)") % event)
|
||||||
|
|
||||||
# store tags.
|
# store tags.
|
||||||
srctag = session.getTag(args[0])
|
srctag = session.getTag(args[0], event=event.get('id'))
|
||||||
dsttag = session.getTag(args[1])
|
dsttag = session.getTag(args[1])
|
||||||
if not srctag:
|
if not srctag:
|
||||||
parser.error(_("Unknown src-tag: %s" % args[0]))
|
parser.error(_("Unknown src-tag: %s" % args[0]))
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ clone-tag will create the destination tag if it does not already exist
|
||||||
handle_clone_tag(self.options, self.session, args)
|
handle_clone_tag(self.options, self.session, args)
|
||||||
self.activate_session.assert_called_once()
|
self.activate_session.assert_called_once()
|
||||||
self.session.assert_has_calls([call.hasPerm('admin'),
|
self.session.assert_has_calls([call.hasPerm('admin'),
|
||||||
call.getTag('src-tag'),
|
call.getTag('src-tag', event=None),
|
||||||
call.getTag('dst-tag'),
|
call.getTag('dst-tag'),
|
||||||
call.createTag('dst-tag',
|
call.createTag('dst-tag',
|
||||||
arches='arch1 arch2',
|
arches='arch1 arch2',
|
||||||
|
|
@ -485,7 +485,7 @@ List of changes:
|
||||||
handle_clone_tag(self.options, self.session, args)
|
handle_clone_tag(self.options, self.session, args)
|
||||||
self.activate_session.assert_called_once()
|
self.activate_session.assert_called_once()
|
||||||
self.session.assert_has_calls([call.hasPerm('admin'),
|
self.session.assert_has_calls([call.hasPerm('admin'),
|
||||||
call.getTag('src-tag'),
|
call.getTag('src-tag', event=None),
|
||||||
call.getTag('dst-tag'),
|
call.getTag('dst-tag'),
|
||||||
call.listPackages(event=None,
|
call.listPackages(event=None,
|
||||||
inherited=True,
|
inherited=True,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue