From 4fea94c5b299be6a4e174edc322401693d940ad9 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Nov 07 2019 21:33:29 +0000 Subject: clarify --ts usage Fixes: https://pagure.io/koji/issue/1774 --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 48b4ac0..df2cec3 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -2486,7 +2486,7 @@ def anon_handle_list_tagged(goptions, session, args): parser.add_option("--sigs", action="store_true", help=_("Show signatures")) parser.add_option("--type", help=_("Show builds of the given type only. Currently supported types: maven, win, image")) parser.add_option("--event", type='int', metavar="EVENT#", help=_("query at event")) - parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at timestamp")) + parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at last event before timestamp")) parser.add_option("--repo", type='int', metavar="REPO#", help=_("query at event for a repo")) (options, args) = parser.parse_args(args) if len(args) == 0: @@ -2680,7 +2680,7 @@ def anon_handle_list_groups(goptions, session, args): usage += _("\n(Specify the --help global option for a list of other help options)") parser = OptionParser(usage=usage) parser.add_option("--event", type='int', metavar="EVENT#", help=_("query at event")) - parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at timestamp")) + parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at last event before timestamp")) parser.add_option("--repo", type='int', metavar="REPO#", help=_("query at event for a repo")) parser.add_option("--show-blocked", action="store_true", dest="incl_blocked", help=_("Show blocked packages")) (options, args) = parser.parse_args(args) @@ -2943,7 +2943,7 @@ def anon_handle_list_pkgs(goptions, session, args): parser.add_option("--show-blocked", action="store_true", help=_("Show blocked packages")) parser.add_option("--show-dups", action="store_true", help=_("Show superseded owners")) parser.add_option("--event", type='int', metavar="EVENT#", help=_("query at event")) - parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at timestamp")) + parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at last event before timestamp")) parser.add_option("--repo", type='int', metavar="REPO#", help=_("query at event for a repo")) (options, args) = parser.parse_args(args) if len(args) != 0: @@ -3378,8 +3378,8 @@ def handle_clone_tag(goptions, session, args): parser.add_option('--inherit-builds', action='store_true', help=_("Include all builds inherited into the source tag into " "the dest tag")) - parser.add_option('--ts', type='int', - help=_('Clone tag at a specific timestamp')) + parser.add_option('--ts', type='int', metavar="TIMESTAMP", + help=_('Clone tag at last event before specific timestamp')) parser.add_option('--event', type='int', help=_('Clone tag at a specific event')) parser.add_option('--repo', type='int', @@ -4044,7 +4044,7 @@ def anon_handle_list_tag_inheritance(goptions, session, args): parser.add_option("--stop", help=_("Stop processing inheritance at this tag")) parser.add_option("--jump", help=_("Jump from one tag to another when processing inheritance")) parser.add_option("--event", type='int', metavar="EVENT#", help=_("query at event")) - parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at timestamp")) + parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at last event before timestamp")) parser.add_option("--repo", type='int', metavar="REPO#", help=_("query at event for a repo")) (options, args) = parser.parse_args(args) if len(args) != 1: @@ -4850,7 +4850,7 @@ def anon_handle_taginfo(goptions, session, args): usage += _("\n(Specify the --help global option for a list of other help options)") parser = OptionParser(usage=usage) parser.add_option("--event", type='int', metavar="EVENT#", help=_("query at event")) - parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at timestamp")) + parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at last event before timestamp")) parser.add_option("--repo", type='int', metavar="REPO#", help=_("query at event for a repo")) (options, args) = parser.parse_args(args) if len(args) < 1: @@ -5382,7 +5382,7 @@ def anon_handle_list_external_repos(goptions, session, args): parser.add_option("--used", action='store_true', help=_("List which tags use the repo(s)")) parser.add_option("--inherit", action='store_true', help=_("Follow tag inheritance when selecting by tag")) parser.add_option("--event", type='int', metavar="EVENT#", help=_("Query at event")) - parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("Query at timestamp")) + parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("Query at last event before timestamp")) parser.add_option("--repo", type='int', metavar="REPO#", help=_("Query at event corresponding to (nonexternal) repo")) parser.add_option("--quiet", action="store_true", default=goptions.quiet, diff --git a/tests/test_cli/test_clone_tag.py b/tests/test_cli/test_clone_tag.py index 3b3219b..8257097 100644 --- a/tests/test_cli/test_clone_tag.py +++ b/tests/test_cli/test_clone_tag.py @@ -629,7 +629,7 @@ Options: --latest-only Tag only the latest build of each package --inherit-builds Include all builds inherited into the source tag into the dest tag - --ts=TS Clone tag at a specific timestamp + --ts=TIMESTAMP Clone tag at last event before specific timestamp --event=EVENT Clone tag at a specific event --repo=REPO Clone tag at a specific repo event -v, --verbose show changes diff --git a/tests/test_cli/test_list_groups.py b/tests/test_cli/test_list_groups.py index 8da28a0..1a5c85b 100644 --- a/tests/test_cli/test_list_groups.py +++ b/tests/test_cli/test_list_groups.py @@ -190,7 +190,7 @@ class TestListGroups(utils.CliTestCase): Options: -h, --help show this help message and exit --event=EVENT# query at event - --ts=TIMESTAMP query at timestamp + --ts=TIMESTAMP query at last event before timestamp --repo=REPO# query at event for a repo --show-blocked Show blocked packages """ % self.progname) diff --git a/tests/test_cli/test_list_tagged.py b/tests/test_cli/test_list_tagged.py index 8a9a956..2d37a2d 100644 --- a/tests/test_cli/test_list_tagged.py +++ b/tests/test_cli/test_list_tagged.py @@ -248,6 +248,6 @@ Options: --type=TYPE Show builds of the given type only. Currently supported types: maven, win, image --event=EVENT# query at event - --ts=TIMESTAMP query at timestamp + --ts=TIMESTAMP query at last event before timestamp --repo=REPO# query at event for a repo """ % self.progname)