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 /create-srpm | |
| 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 'create-srpm')
| -rwxr-xr-x | create-srpm | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/create-srpm b/create-srpm index bc4ba06..373b072 100755 --- a/create-srpm +++ b/create-srpm @@ -1,7 +1,8 @@ #!/usr/bin/python -from RepSys import Error, config, plugins -from RepSys.rpmutil import get_srpm, svn_url_rev, strip_url_rev +from RepSys import Error, config, plugins, layout +from RepSys.mirror import strip_username +from RepSys.rpmutil import get_srpm from RepSys.cgiutil import get_targets from RepSys.util import mapurl, execcmd, get_helper import sys @@ -14,13 +15,6 @@ import urllib class CmdError(Error): pass -def strip_username(url): - parsed = list(urlparse.urlparse(url)) - userpwd, hostport = urllib.splituser(parsed[1]) - parsed[1] = hostport - newurl = urlparse.urlunparse(parsed) - return newurl - class CmdIface: def author_email(self, author): return config.get("users", author) @@ -53,10 +47,10 @@ class CmdIface: urls = [mapurl(url) for url in urls] uploadsrpms = [] for url in urls: - revision = revision or svn_url_rev(url) - url = strip_url_rev(url) + urlrev = revision or layout.get_url_revision(url) + url, _ = layout.split_url_revision(url) targetsrpms = get_srpm(url, - revision=revision, + revision=urlrev, targetdirs=target.target, packager=packager, svnlog=1, |
