diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-07-17 12:24:21 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-07-17 12:24:21 +0000 |
commit | 5c7f585c08c8ffb944095ae031fbf82a54ba13bc (patch) | |
tree | c3b1eaad57b0518416b5adb59ac51576716ebf1e /RepSys/commands/rpmlog.py | |
parent | 0af96a9eb0e69191d5fb5d5dcfa35a287bcc31b4 (diff) | |
download | mgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.tar mgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.tar.gz mgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.tar.bz2 mgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.tar.xz mgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.zip |
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.
Diffstat (limited to 'RepSys/commands/rpmlog.py')
-rw-r--r-- | RepSys/commands/rpmlog.py | 10 |
1 files changed, 4 insertions, 6 deletions
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, |