Author: paultcochrane
Date: Sat Mar 17 08:55:18 2007
New Revision: 17532
Modified:
trunk/tools/dev/mk_manifest_and_skip.pl
Log:
[tools]
- got MANIFEST generating script to use a different method to find out if a
given file is a versioned resource or not. this now uses sv[nk] status -v
instead of poking into the .svn directory
Modified: trunk/tools/dev/mk_manifest_and_skip.pl
==============================================================================
--- trunk/tools/dev/mk_manifest_and_skip.pl (original)
+++ trunk/tools/dev/mk_manifest_and_skip.pl Sat Mar 17 08:55:18 2007
@@ -103,8 +103,34 @@
END_HEADER
my $cmd = -d '.svn' ? 'svn' : 'svk';
+
+# get all files from sv[nk] status -v
+my @status_output = qx($cmd status -v);
+
+# now grab the versioned resources:
+my @versioned_files = ();
+my @versioned_output = grep !/^\?/, @status_output;
+for my $line ( @versioned_output ) {
+ my @line_info = split(/\s+/, $line);
+ # the file is the 5th item in the @line_info array
+ push @versioned_files, $line_info[4];
+}
+
my @MANI = ();
-find( \&wanted, '.' );
+
+for my $file ( @versioned_files ) {
+ # ignore the debian directory
+ next if $file =~ m[/\.svn|blib|debian];
+
+ # don't want to keep directories
+ if ( -d $file ) {
+ next;
+ }
+
+ # now get the manifest entry
+ MANIFEST($file);
+}
+
print $MANI $_ for ( sort @MANI );
my $svnignore = `$cmd propget svn:ignore @dirs`;
@@ -151,7 +177,6 @@
push @dirs, $File::Find::name;
}
- #my $result = system(qq($cmd propget svn:mime-type $_));
my $svnbase = ".svn/text-base/$_.svn-base";
if ( -f $_ and -e $svnbase ) {
MANIFEST();
@@ -161,8 +186,10 @@
}
sub MANIFEST {
+ my $file = shift;
my $loc = '[]';
- for ($File::Find::name) {
+ #for ($File::Find::name) {
+ for ($file) {
$loc =
exists( $special{$_} ) ? $special{$_}
: !m[/] ? '[]'
@@ -179,7 +206,7 @@
: m[^(apps/\w+)/] ? "[$1]"
: '[]';
}
- push @MANI, sprintf( "%- 59s %s\n", $File::Find::name, $loc );
+ push @MANI, sprintf( "%- 59s %s\n", $file, $loc );
return;
}