aboutsummaryrefslogtreecommitdiffstats
path: root/create-srpm
diff options
context:
space:
mode:
Diffstat (limited to 'create-srpm')
-rwxr-xr-xcreate-srpm18
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,