perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgollu...@apache.org
Subject svn commit: r472749 - /perl/modperl/trunk/lib/ModPerl/Manifest.pm
Date Thu, 09 Nov 2006 02:58:45 GMT
Author: pgollucci
Date: Wed Nov  8 18:58:44 2006
New Revision: 472749

URL: http://svn.apache.org/viewvc?view=rev&rev=472749
Log:
recode get_svn_files() to work with SVN clients < 1.4.0 and
1.4.0+ simultaneously

[.svn dirs in 1.4.0+ are now a binary format not XML]


Modified:
    perl/modperl/trunk/lib/ModPerl/Manifest.pm

Modified: perl/modperl/trunk/lib/ModPerl/Manifest.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/lib/ModPerl/Manifest.pm?view=diff&rev=472749&r1=472748&r2=472749
==============================================================================
--- perl/modperl/trunk/lib/ModPerl/Manifest.pm (original)
+++ perl/modperl/trunk/lib/ModPerl/Manifest.pm Wed Nov  8 18:58:44 2006
@@ -40,26 +40,16 @@
     my @files;
 
     my $cwd = Cwd::cwd();
-
-    finddepth({ follow => 1, wanted => sub {
-        return unless $_ eq 'entries';
-        return unless $File::Find::dir =~ /\.svn$/;
-
-        my $dir = dirname $File::Find::dir;
-        $dir =~ s,^$cwd/?,,;
-
-        open my $fh, $_ or die "open $_: $!";
-        while (my $line = <$fh>) {
-             if ($line =~ /name\s*=\s*"([^"]*)"/) {
-                my $file = $1;
-                next if $file eq 'svn:this_dir';
-                next if !$file or -d "../$file" or $file =~ /^\./;
-                push @files, $dir ? "$dir/$file" : $file;
-             }
+    my @lines = `svn status -v`	;
+    foreach my $line (@lines) {
+        chomp $line;
+        if ($line =~ /(?:\d+)\s+(?:\d+)\s+(?:\w+)\s+(.*)\s*/) {
+            my $file = $1;
+            if (-e $file && ! -d $file) {
+                push @files, $1 if -e $1;
+            }
         }
-        close $fh;
-
-    }}, $cwd);
+    }
 
     # files to add which aren't under svn
     push @files, qw(lib/ModPerl/DummyVersions.pm);



Mime
View raw message