[prev] [thread] [next] [lurker] [Date index for 2003/09/03]
Author: richardc Date: 2003-09-03 07:59:28 +0100 (Wed, 03 Sep 2003) New Revision: 1400 Modified: trunk/hooks/pre-commit Log: okay, I get perl Modified: trunk/hooks/pre-commit =================================================================== --- trunk/hooks/pre-commit 2003-09-03 06:53:57 UTC (rev 1399) +++ trunk/hooks/pre-commit 2003-09-03 06:59:28 UTC (rev 1400) @@ -1,11 +1,10 @@ -#!/bin/sh +#!/usr/bin/perl -w -REPOS="$1" -TXN="$2" -# tab! -# if the diff is adding tabs, reject it -cd /tmp -svnlook diff -t $TXN $REPOS | perl -wne 'exit 1 if /^\+.*\t/' && exit 1 +my $repos = shift; +my $txn = shift; -# fallthrough, you're OK -exit 0 +my $diff = `svnlook diff -t $txn $repos`; +if ($diff =~ /^+.*\t/m) { + print STDERR "tabs can go get stuffed\n"; + exit 1; +}
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52