summaryrefslogtreecommitdiff
path: root/BitKeeper
diff options
context:
space:
mode:
authordf@pippilotta.erinye.com <>2007-10-25 13:28:56 +0200
committerdf@pippilotta.erinye.com <>2007-10-25 13:28:56 +0200
commit68a24d9f71facdb2b5dd7f26a6af4ad264773d5d (patch)
treefeb6ad8567f28e23c4269fa77b0c000b4244271c /BitKeeper
parent5779d062e25ce301c247794addcd1f072edff473 (diff)
parent91fd07814919b0e73e9d614c252c8f83f5af4d30 (diff)
downloadmariadb-git-68a24d9f71facdb2b5dd7f26a6af4ad264773d5d.tar.gz
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
Diffstat (limited to 'BitKeeper')
-rwxr-xr-xBitKeeper/triggers/pre-commit.check-case.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/BitKeeper/triggers/pre-commit.check-case.pl b/BitKeeper/triggers/pre-commit.check-case.pl
new file mode 100755
index 00000000000..4f68f8619e5
--- /dev/null
+++ b/BitKeeper/triggers/pre-commit.check-case.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+my $status = 0;
+
+my $pending = $ENV{'BK_PENDING'};
+exit 0 unless -f $pending;
+
+open FI, "<", $pending || exit 0;
+while(<FI>) {
+ my ($file, $stuff) = split /\|/, $_, 2;
+ next unless -f $file;
+ $file =~ s/^(.*)\/([^\/]*)$/$2/;
+ my $path = $1;
+ opendir DIR, $path;
+ my @files = sort map { lc } readdir DIR;
+ closedir DIR;
+ my %count = ();
+ $count{$_}++ for @files;
+ @files = grep { $count{$_} > 1 } keys %count;
+ if(@files > 0) {
+ print "$path/$file: duplicate file names: " . (join " ", @files) . "\n";
+ $status = 1;
+ }
+}
+close FI;
+
+exit $status;