r9006 - in /scripts/qa: DebianQA.conf-sample DebianQA/Config.pm DebianQA/Svn.pm templates/by_category

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Thu Nov 8 03:20:16 UTC 2007


Author: tincho-guest
Date: Thu Nov  8 03:20:15 2007
New Revision: 9006

URL: http://svn.debian.org/wsvn/?sc=1&rev=9006
Log:
- More parametrisation, now it can support the 'other' svn repo layout

Modified:
    scripts/qa/DebianQA.conf-sample
    scripts/qa/DebianQA/Config.pm
    scripts/qa/DebianQA/Svn.pm
    scripts/qa/templates/by_category

Modified: scripts/qa/DebianQA.conf-sample
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA.conf-sample?rev=9006&op=diff
==============================================================================
--- scripts/qa/DebianQA.conf-sample (original)
+++ scripts/qa/DebianQA.conf-sample Thu Nov  8 03:20:15 2007
@@ -1,19 +1,23 @@
-# vim:syntax=dosini
-#
-# Sample config for DebianQA scripts
-#
-# A "~/" appearing at the beginning of a string will be replaced for the user's
-# home directory
+; vim:syntax=dosini
+;
+; Sample config for DebianQA scripts
+;
+; A "~/" appearing at the beginning of a string will be replaced for the user's
+; home directory
 [qareport_cgi]
 templates_path = templates
 default_template = by_category
-group_name = Debian Perl Group
-group_url = http://pkg-perl.alioth.debian.org/
-wsvn_url = http://svn.debian.org/wsvn/pkg-perl/trunk
+group_name = Debian Foo Group
+group_url = http://pkg-foo.alioth.debian.org/
+; sprintf format for the package wsvn location, takes one parameter, the
+; package directory.
+;wsvn_url = http://svn.debian.org/wsvn/pkg-perl/trunk/%s
 
 [svn]
-repository = svn://svn.debian.org/svn/pkg-perl
+repository = svn://svn.debian.org/svn/pkg-foo
 packages_path = trunk
+; path after the package name, should be the parent of the "debian/" directory
+; post_path = trunk
 
 [archive]
 mirror = ftp://ftp.debian.org/debian

Modified: scripts/qa/DebianQA/Config.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Config.pm?rev=9006&op=diff
==============================================================================
--- scripts/qa/DebianQA/Config.pm (original)
+++ scripts/qa/DebianQA/Config.pm Thu Nov  8 03:20:15 2007
@@ -22,13 +22,14 @@
     qareport_cgi => {
         templates_path => "templates",
         default_template => "by_category",
-        group_name => "Debian Perl Group",
-        group_url => "http://pkg-perl.alioth.debian.org/",
-        wsvn_url => "http://svn.debian.org/wsvn/pkg-perl/trunk"
+        group_name => "Unnamed Packaging Group",
+        group_url => "http://www.debian.org/",
+        wsvn_url => undef,
     },
     svn => {
-        repository => "svn://svn.debian.org/svn/pkg-perl",
-        packages_path => "trunk"
+        repository => undef,
+        packages_path => "trunk",
+        post_path => ""
     },
     archive => {
         mirror => "ftp://ftp.debian.org/debian",
@@ -40,7 +41,7 @@
         incoming_url => 'http://incoming.debian.org',
         incoming_ttl => 60,
     },
-    watch => { # Not implemented yet
+    watch => {
         ttl => 360,
         use_cpan => 1,
         cpan_mirror => "ftp://cpan.org/ls-lR.gz",
@@ -52,7 +53,7 @@
         soap_uri => 'Debbugs/SOAP'
     },
     common => {
-        cache_dir => "$ENV{HOME}/.dpg/newversioncheck",
+        cache_dir => "$ENV{HOME}/.DebianQA/yourgroup",
         # verbosity level: error => 0, warn => 1, info => 2, debug => 3
         # Should be 1 by default, 0 for quiet mode
         verbose => 1,
@@ -87,7 +88,7 @@
     open(CFG, "<", $file) or die "Can't open $file: $!\n";
     while(<CFG>) {
         chomp;
-        s/(?<!\S)#.*//;
+        s/(?<!\S)[;#].*//;
         s/\s+$//;
         next unless($_);
         if(/^\s*\[\s*(\w+)\s*\]\s*$/) {

Modified: scripts/qa/DebianQA/Svn.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Svn.pm?rev=9006&op=diff
==============================================================================
--- scripts/qa/DebianQA/Svn.pm (original)
+++ scripts/qa/DebianQA/Svn.pm Thu Nov  8 03:20:15 2007
@@ -74,7 +74,9 @@
         # Remove from list already updated parts of the cache
         foreach my $dir (grep({ $cache_vers{$_}
                     and $cache_vers{$_} < $revision } @dirlist)) {
-            $svn->log([ "$svnpath/$dir" ], $cache_vers{$dir}, "HEAD", 1, 1,
+            my $pkghome = "$svnpath/$dir";
+            $pkghome .= $CFG{svn}{post_path} if($CFG{svn}{post_path});
+            $svn->log([ $pkghome ], $cache_vers{$dir}, "HEAD", 1, 1,
                 sub {
                     foreach (keys %{$_[0]}) {
                         $changed{$dir} = 1 if(m{/debian/(changelog|watch)$});
@@ -90,7 +92,8 @@
     foreach my $dir (@changed) {
         $svn{$dir} = {};
         info("Retrieving changelog for $dir");
-        my $changelog = get_svn_file($svn, "$svnpath/$dir/debian/changelog");
+        my $changelog = get_svn_file($svn,
+            "$svnpath/$dir/$CFG{svn}{post_path}/debian/changelog");
 
         unless($changelog) {
             $svn{$dir}{error} = "Missing";
@@ -132,7 +135,8 @@
         $svn{$dir}{pkgname} = $parser->dpkg()->{Source};
 
         info("Retrieving watchfile for $dir");
-        my $watch = get_svn_file($svn, "$svnpath/$dir/debian/watch");
+        my $watch = get_svn_file($svn,
+            "$svnpath/$dir/$CFG{svn}{post_path}/debian/watch");
         unless($watch) {
             if($svn{$dir}{version} and $svn{$dir}{version} !~ /-/) {
                 $svn{$dir}{watch_error} = "Native";

Modified: scripts/qa/templates/by_category
URL: http://svn.debian.org/wsvn/scripts/qa/templates/by_category?rev=9006&op=diff
==============================================================================
--- scripts/qa/templates/by_category (original)
+++ scripts/qa/templates/by_category Thu Nov  8 03:20:15 2007
@@ -39,7 +39,7 @@
     <tr>
         <td>$pkg</td>
         <td><a
-        href="${wsvn_url}/$pkg/debian/changelog?op=file&amp;rev=0&amp;sc=0"
+        href="[% "$pkg" | format("$wsvn_url") %]/debian/changelog?op=file&amp;rev=0&amp;sc=0"
         ><span class="popup">$svn_ver<span class="balloon"
         >[% data.svn.$pkg.changer | html %] &mdash; [% data.svn.$pkg.date | html %]</span></span>
         [% IF svn_un_ver AND (svn_un_ver != svn_ver) %]<span




More information about the Pkg-perl-cvs-commits mailing list