# HG changeset patch
# User ShabeR@UK-SHABER
# Date 1239727454 -3600
# Node ID 9edae8fe14166b86dcb5c794a41aa2e71b143354
# Parent c7be4c65f97e2dfb21194ad5de1aeffc182b1eac
Add tools to create file tree deltas and integrate them into build f/w
diff -r c7be4c65f97e -r 9edae8fe1416 common/build.xml
--- a/common/build.xml Thu Apr 09 15:12:09 2009 +0100
+++ b/common/build.xml Tue Apr 14 17:44:14 2009 +0100
@@ -114,6 +114,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
[SF-BUILD-NOPREP]
diff -r c7be4c65f97e -r 9edae8fe1416 common/tools/difflist.pl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/difflist.pl Tue Apr 14 17:44:14 2009 +0100
@@ -0,0 +1,35 @@
+#! perl -w
+use strict;
+
+my $element;
+my @union = ();
+my @intersection = ();
+my @difference = ();
+my %count = ();
+
+my $file1 = shift or die "Usage: $0 file1 file2\n";
+my $file2 = shift or die "Usage: $0 file1 file2\n";
+
+open FILE1, "<$file1" or die "ERROR: Can't read $file1";
+open FILE2, "<$file2" or die "ERROR: Can't read $file2";
+
+my @file1_content = ;
+my @file2_content = ;
+
+close FILE1;
+close FILE2;
+
+print "* Comparing $file1 and $file2\n";
+foreach $element (@file1_content, @file2_content) { $count{$element}++ }
+foreach $element (keys %count) {
+ push @union, $element;
+ push @{ $count{$element} > 1 ? \@intersection : \@difference }, $element;
+}
+
+if (@difference > 0) {
+ foreach (@difference){
+ print $_;
+ }
+} else {
+ print "* Files are identical\n";
+}
diff -r c7be4c65f97e -r 9edae8fe1416 common/tools/listdir.pl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/listdir.pl Tue Apr 14 17:44:14 2009 +0100
@@ -0,0 +1,38 @@
+#!perl -w
+use strict;
+
+my $dir = shift or die "Usage: $0 \n"; # provided dir to traverse
+my $filelist = [];
+
+# fwd declaration to prevent warning
+sub recursedir($$);
+
+# run recurse and print
+recursedir ($dir, $filelist);
+print $_, "\n" for(@$filelist);
+
+sub recursedir($$) {
+
+ my $dir = shift @_;
+ my $list = shift @_;
+
+ if(opendir(DIR, "$dir")) {
+ # list dir
+ for my $file(grep { !/^\./ } readdir DIR) {
+ if(-d "$dir\\$file") {
+ # traverse subdirs
+ recursedir("$dir\\$file", $list);
+ }
+ elsif(-f "$dir\\$file") {
+ # if file then swap (any present) fwd to bkslash and add to list
+ $dir =~s/\//\\/;
+ $file =~s/\//\\/;
+ push @$list, "$dir\\$file";
+ }
+ }
+ closedir DIR;
+ }
+ else {
+ warn "Cannot open the directory '$dir' $!\n";
+ }
+}
diff -r c7be4c65f97e -r 9edae8fe1416 sf-platform/build.xml
--- a/sf-platform/build.xml Thu Apr 09 15:12:09 2009 +0100
+++ b/sf-platform/build.xml Tue Apr 14 17:44:14 2009 +0100
@@ -79,7 +79,7 @@
-
+
@@ -179,17 +179,26 @@
-
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
@@ -201,16 +210,9 @@
-
+
+
+
@@ -223,17 +225,10 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -244,6 +239,10 @@
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -313,6 +296,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -322,7 +323,12 @@
+
+
+
+
+
@@ -330,6 +336,10 @@
+
+
+
+