[Pkg-mediawiki-commits] r175 - mediawiki-extensions/trunk
Thorsten Glaser
tg at alioth.debian.org
Mon Jun 28 15:05:28 UTC 2010
Author: tg
Date: 2010-06-28 15:05:26 +0000 (Mon, 28 Jun 2010)
New Revision: 175
Modified:
mediawiki-extensions/trunk/check_versions.pl
Log:
fix two bugs:
* when refusing files, it would only compare the basename of the file,
not the entire SCM URI (for example, install.settings would not be
added because one already exists ?\226?\128?\147 for whatever reason?\226?\128?\166) ?\226?\135?\146 change it
to compare the pr?\195?\166fix as well
* use the ?\226?\128?\156magic?\226?\128?\157 revision -1 to store refused files, so that one isn?\226?\128?\153t
asked whether to refuse it during every run of the script
Modified: mediawiki-extensions/trunk/check_versions.pl
===================================================================
--- mediawiki-extensions/trunk/check_versions.pl 2010-06-28 15:03:17 UTC (rev 174)
+++ mediawiki-extensions/trunk/check_versions.pl 2010-06-28 15:05:26 UTC (rev 175)
@@ -47,7 +47,7 @@
for (@added) { $is_added{$_} = 1; }
print "Checking other files in the same directory...\n" ;
foreach $new_file (@lines) {
- my $exists = `LC_ALL=C grep "$new_file" <"$file"` ;
+ my $exists = `LC_ALL=C grep "^$base/$new_file" <"$file"` ;
my @filtered = grep(/$new_file/, at blacklist);
print "Checking: $new_file\n";
my $size = @filtered;
@@ -106,6 +106,7 @@
push @added,"$base/$new_file" ;
download_latest ("$base/$new_file",$extname,$basedir,$package,$link,$revision) ;
} else {
+ push @new,"$base/$new_file - none - none - none - no - -1\n" ;
push @refused,"$base/$new_file";
print "Not adding file..\n";
}
@@ -141,10 +142,13 @@
while (<F>) {
print "Processing line: $_" if defined $options{v};
next if (/^\s*(#.*)*$/);
- /^(.+)\s-\s(.+)\s-\s(.+)\s-\s(.+)\s-\s(.+)\s-\s(\d+)/;
+ /^(.+)\s-\s(.+)\s-\s(.+)\s-\s(.+)\s-\s(.+)\s-\s(-?\d+)/;
my ($url,$extname,$package,$basedir,$link,$revision) = ($1,$2,$3,$4,$5,$6);
- $revision = 0 if defined $options{u};
- my $latest_revision = (defined $options{s}) ? $revision : latest_revision($url) ;
+ my $latest_revision = -1;
+ if ($revision != -1) {
+ $revision = 0 if defined $options{u};
+ $latest_revision = (defined $options{s}) ? $revision : latest_revision($url) ;
+ }
my $dirname = `dirname $url` ;
$dirname =~ s/[\n\r]+$//;
my $list = (defined $options{s}) ? "" : `LC_ALL=C svn list $dirname` ;
More information about the Pkg-mediawiki-commits
mailing list