r13924 - in /scripts/qa: DebianQA/Svn.pm DebianQA/Watch.pm fetchdata

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Fri Feb 1 00:31:16 UTC 2008


Author: tincho-guest
Date: Fri Feb  1 00:31:15 2008
New Revision: 13924

URL: http://svn.debian.org/wsvn/?sc=1&rev=13924
Log:
Remove my var = value if(cond) for it leads to hell.
Plus, correctly detect never seen packages when cheching Svn cache.

Modified:
    scripts/qa/DebianQA/Svn.pm
    scripts/qa/DebianQA/Watch.pm
    scripts/qa/fetchdata

Modified: scripts/qa/DebianQA/Svn.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Svn.pm?rev=13924&op=diff
==============================================================================
--- scripts/qa/DebianQA/Svn.pm (original)
+++ scripts/qa/DebianQA/Svn.pm Fri Feb  1 00:31:15 2008
@@ -72,8 +72,8 @@
         %changed = map({ $_ => 1 } @dirlist);
     } else {
         my $cdata = read_cache("svn", "", 0);
-        if(find_stamp($cdata, "") == $revision
-                and keys(%$cdata) > @dirlist + 1) {
+        my @new = grep({! $cdata->{$_}} @dirlist);
+        if(find_stamp($cdata, "") == $revision and not @new) {
             return (); # Cache is up-to-date
         }
 
@@ -341,14 +341,14 @@
         debug("Watch line: $_");
 
         # opts either contain no spaces, or is enclosed in double-quotes
-        my $opts = $1 if(s!^\s*opts="([^"]*)"\s+!! or
-            s!^\s*opts=(\S*)\s+!!);
+        my $opts;
+        $opts = $1 if(s!^\s*opts="([^"]*)"\s+!! or s!^\s*opts=(\S*)\s+!!);
         debug("Watch line options: $opts") if($opts);
 
         # several options are separated by comma and commas are not allowed
         # within
-        my @opts = split(/\s*,\s*/, $opts) if($opts);
-        my %opts;
+        my(@opts, %opts);
+        @opts = split(/\s*,\s*/, $opts) if($opts);
         foreach(@opts) {
             next if /^(?:active|passive|pasv)$/;
             /([^=]+)=(.*)/;

Modified: scripts/qa/DebianQA/Watch.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Watch.pm?rev=13924&op=diff
==============================================================================
--- scripts/qa/DebianQA/Watch.pm (original)
+++ scripts/qa/DebianQA/Watch.pm Fri Feb  1 00:31:15 2008
@@ -203,7 +203,8 @@
     if($base =~ s{/([^/]*?\(.*)}{}) {
         $remaining = "$1/$remaining";
     }
-    my @rparts = split(/\/+/, $remaining) if($remaining);
+    my @rparts;
+    @rparts = split(/\/+/, $remaining) if($remaining);
     while(@rparts and $rparts[0] !~ /\(/) {
         $base .= "/" . shift @rparts;
     }

Modified: scripts/qa/fetchdata
URL: http://svn.debian.org/wsvn/scripts/qa/fetchdata?rev=13924&op=diff
==============================================================================
--- scripts/qa/fetchdata (original)
+++ scripts/qa/fetchdata Fri Feb  1 00:31:15 2008
@@ -51,7 +51,8 @@
     }
 }
 # We need this first
-my @changed_pkgs = svn_download($opts->{force}, $svn_rev, @dirs) if(
+my @changed_pkgs;
+ at changed_pkgs = svn_download($opts->{force}, $svn_rev, @dirs) if(
     !$only or $only eq "svn");
 
 # returns dirs, not packages




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