From 936d5717d1b4afc17b04afbe02ad7aff8770722d Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Tue, 5 Feb 2008 20:51:43 +0000 Subject: Small changes in help messages: - Added URL of the repository system Quickstart - Make the help message of ci clearer - Removed reference to --help-plugins - Added a simple description for repsys in main help - Added short description of interesting subcommands in main help - Updated CHANGES - Reformeatted the 'switch' message to make it easier to read - Improved the help message of 'submit', added reference to the status page - Better help message for rpmlog - Added help message for patchspec - Better help message for markrelease - Added a help message for getsrpm - Added help message for getspec - Better help message for 'create' + changed example URL - Added a clearer help message for co - Added some text explaining 'changed' - Better authoremail help - Clearer message about uncommenting config option - Removed all configuration options that are not needed by one external - Putsrpm is not working, remove from help message - Added another usage example for submit --- RepSys/commands/rpmlog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'RepSys/commands/rpmlog.py') diff --git a/RepSys/commands/rpmlog.py b/RepSys/commands/rpmlog.py index 7ea1ac0..5ba5fdd 100644 --- a/RepSys/commands/rpmlog.py +++ b/RepSys/commands/rpmlog.py @@ -12,6 +12,8 @@ import sys HELP = """\ Usage: repsys rpmlog [OPTIONS] REPPKGDIRURL +Prints the RPM changelog of a given package. + Options: -r REV Collect logs from given revision to revision 0 -n NUM Output only last NUM entries @@ -19,7 +21,8 @@ Options: -h Show this message Examples: - repsys rpmlog https://repos/snapshot/python + repsys rpmlog python + repsys rpmlog http://svn.mandriva.com/svn/packages/cooker/python """ def parse_options(): -- cgit v1.2.1 From e8dc997b06d5e5b50ba4f51dc74cd68ca8f6d612 Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Mon, 3 Mar 2008 21:11:46 +0000 Subject: Added options -o, -p, -s to rpmlog These options are just direct flags to the new function get_changelog() --- RepSys/commands/rpmlog.py | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'RepSys/commands/rpmlog.py') diff --git a/RepSys/commands/rpmlog.py b/RepSys/commands/rpmlog.py index 5ba5fdd..561b0fd 100644 --- a/RepSys/commands/rpmlog.py +++ b/RepSys/commands/rpmlog.py @@ -3,10 +3,13 @@ # This program will convert the output of "svn log" to be suitable # for usage in an rpm %changelog session. # -from RepSys import Error +from RepSys import Error, RepSysTree from RepSys.command import * -from RepSys.log import svn2rpm +from RepSys.svn import SVN +from RepSys.log import get_changelog, split_spec_changelog +from cStringIO import StringIO import getopt +import os import sys HELP = """\ @@ -18,6 +21,9 @@ Options: -r REV Collect logs from given revision to revision 0 -n NUM Output only last NUM entries -T FILE %changelog template file to be used + -o Append old package changelog + -p Append changelog found in .spec file + -s Sort changelog entries, even from the old log -h Show this message Examples: @@ -30,14 +36,30 @@ def parse_options(): parser.add_option("-r", dest="revision") parser.add_option("-n", dest="size", type="int") parser.add_option("-T", "--template", dest="template", type="string") + parser.add_option("-o", dest="oldlog", default=False, + action="store_true") + parser.add_option("-p", dest="usespec", default=False, + action="store_true") + parser.add_option("-s", dest="sort", default=False, + action="store_true") opts, args = parser.parse_args() if len(args) != 1: raise Error, "invalid arguments" opts.pkgdirurl = default_parent(args[0]) return opts -def rpmlog(pkgdirurl, revision, size, template): - sys.stdout.write(svn2rpm(pkgdirurl, revision, size, template=template)) +def rpmlog(pkgdirurl, revision, size, template, oldlog, usespec, sort): + another = None + if usespec: + svn = SVN() + pkgname = RepSysTree.pkgname(pkgdirurl) + specurl = os.path.join(pkgdirurl, "current/SPECS", pkgname + + ".spec") + rawspec = svn.cat(specurl, rev=revision) + spec, another = split_spec_changelog(StringIO(rawspec)) + newlog = get_changelog(pkgdirurl, another=another, rev=revision, + size=size, sort=sort, template=template, oldlog=oldlog) + sys.stdout.writelines(newlog) def main(): do_command(parse_options, rpmlog) -- cgit v1.2.1 From 4e8097313bb091915febf708eaa1b3134873cc08 Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Mon, 3 Mar 2008 21:13:34 +0000 Subject: Added small note about bad path hardcoded in rpmlog --- RepSys/commands/rpmlog.py | 1 + 1 file changed, 1 insertion(+) (limited to 'RepSys/commands/rpmlog.py') diff --git a/RepSys/commands/rpmlog.py b/RepSys/commands/rpmlog.py index 561b0fd..3cdcc02 100644 --- a/RepSys/commands/rpmlog.py +++ b/RepSys/commands/rpmlog.py @@ -53,6 +53,7 @@ def rpmlog(pkgdirurl, revision, size, template, oldlog, usespec, sort): if usespec: svn = SVN() pkgname = RepSysTree.pkgname(pkgdirurl) + #FIXME don't hardcode current/, it may already be in the URL specurl = os.path.join(pkgdirurl, "current/SPECS", pkgname + ".spec") rawspec = svn.cat(specurl, rev=revision) -- cgit v1.2.1 From 5c7f585c08c8ffb944095ae031fbf82a54ba13bc Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Thu, 17 Jul 2008 12:24:21 +0000 Subject: Allow specifying distro branches without using complete URLs Added the configuration option "repository", which will have the URL to the root of the repository. The change also allowed using mirrors in all the read-only commands. --- RepSys/commands/rpmlog.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'RepSys/commands/rpmlog.py') diff --git a/RepSys/commands/rpmlog.py b/RepSys/commands/rpmlog.py index 3cdcc02..11fe36d 100644 --- a/RepSys/commands/rpmlog.py +++ b/RepSys/commands/rpmlog.py @@ -3,7 +3,7 @@ # This program will convert the output of "svn log" to be suitable # for usage in an rpm %changelog session. # -from RepSys import Error, RepSysTree +from RepSys import Error, layout from RepSys.command import * from RepSys.svn import SVN from RepSys.log import get_changelog, split_spec_changelog @@ -24,6 +24,7 @@ Options: -o Append old package changelog -p Append changelog found in .spec file -s Sort changelog entries, even from the old log + -M Do not use the mirror (use the main repository) -h Show this message Examples: @@ -45,17 +46,14 @@ def parse_options(): opts, args = parser.parse_args() if len(args) != 1: raise Error, "invalid arguments" - opts.pkgdirurl = default_parent(args[0]) + opts.pkgdirurl = layout.package_url(args[0]) return opts def rpmlog(pkgdirurl, revision, size, template, oldlog, usespec, sort): another = None if usespec: svn = SVN() - pkgname = RepSysTree.pkgname(pkgdirurl) - #FIXME don't hardcode current/, it may already be in the URL - specurl = os.path.join(pkgdirurl, "current/SPECS", pkgname + - ".spec") + specurl = layout.package_spec_url(pkgdirurl) rawspec = svn.cat(specurl, rev=revision) spec, another = split_spec_changelog(StringIO(rawspec)) newlog = get_changelog(pkgdirurl, another=another, rev=revision, -- cgit v1.2.1