#!/bin/bash

REPOS="$1" 
TXN="$2" 

SVNLOOK=/usr/bin/svnlook

# change to the current working directory
cd `dirname $0`

# svnlook at the comments being submitted with the commit request
COMMENTS=$($SVNLOOK log -t "$TXN" "$REPOS")

# Holla out to a little ruby pre-commit script.  if it fails, exit with a return
#    code of 1, which means that errors occurred
/usr/bin/env ruby pre-commit.rb "$COMMENTS" || exit 1