diff recipes/kde/enterprise/generic.py @ 525:e73a4bbc35e7

tag_pkg_parameters depends on scm therefore move this method to the tagdetetors which are scm aware currently bot tag_pkg_parameters (for git and svn) contain hardcoded regular expressions which should be removed in future
author Bjoern Ricks <bricks@intevation.de>
date Mon, 15 Nov 2010 14:34:15 +0000
parents 10a7fed8bf80
children 5a2f01685619
line wrap: on
line diff
--- a/recipes/kde/enterprise/generic.py	Thu Nov 11 11:50:08 2010 +0000
+++ b/recipes/kde/enterprise/generic.py	Mon Nov 15 14:34:15 2010 +0000
@@ -132,7 +132,7 @@
                 self.tag_revision = tag_revision
                 self.tag_rules_url = tag_rules_url
                 self.tag_rules_revision = tag_rules_revision
-                tag_date, tag_change_count = self.tag_pkg_parameters(tag_url)
+                tag_date, tag_change_count = self.tag_detector.tag_pkg_parameters(tag_url)
                 pkg_revision = (self.pkg_revision_template
                                 % dict(pkg_revision=tag_change_count,
                                        rules_revision=revision[1]))
@@ -166,17 +166,3 @@
         else:
             super(PackageTrack, self).copy_debian_directory(to_dir)
 
-    def tag_pkg_parameters(self, tag_url):
-        match = re.search(r"/enterprise[^.]*\.[^.]*\."
-                          r"(?P<date>[0-9]{8})\.(?P<baserev>[0-9]+)/",
-                          tag_url)
-        if match:
-            date = match.group("date")
-            baserev = match.group("baserev")
-            xml_log = subversion.log_xml(tag_url, baserev)
-            revisions = subversion.extract_tag_revisions(xml_log)
-            tag_change_count = len(revisions)
-            return (date, tag_change_count)
-        else:
-            raise RuntimeError("Cannot determine tag parameters from %r"
-                               % tag_url)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)