rev 1402 - trunk/hooks

[prev] [thread] [next] [lurker] [Date index for 2003/09/03]

From: richardc
Subject: rev 1402 - trunk/hooks
Date: 08:09 on 03 Sep 2003
Author: richardc
Date: 2003-09-03 08:09:03 +0100 (Wed, 03 Sep 2003)
New Revision: 1402

Modified:
   trunk/hooks/pre-commit
Log:
pesky markers

Modified: trunk/hooks/pre-commit
===================================================================
--- trunk/hooks/pre-commit	2003-09-03 06:59:53 UTC (rev 1401)
+++ trunk/hooks/pre-commit	2003-09-03 07:09:03 UTC (rev 1402)
@@ -1,10 +1,13 @@
 #!/usr/bin/perl -w
-#	tab!
 my $repos = shift;
 my $txn = shift;
 
-my $diff = `svnlook diff -t $txn $repos`;
-if ($diff =~ /^+.*\t/m) {
-    print STDERR "tabs can go get stuffed\n";
-    exit 1;
+chdir '/tmp'; # pesky svnlook
+my @diff = `svnlook diff -t $txn $repos`;
+
+for (@diff) {
+    next if /^\+\+\+/; # chunk markers are allowed tabs
+    if (/^\+.*\t/m) {
+       die "tabs can go get stuffed\n";
+    }
 }

Generated at 13:57 on 01 Jul 2004 by mariachi 0.52