Fog Creek Software
Discussion Board




Subversion post-commit for UNIX / OSX

Hi. I'm trying to set up FogBUGZ / Subversion integration on Mac OS X, but I'm having a bit of a hard time with the post-commit hook script. I've tried to convert post-commit.bat to a UNIX shell script, but I'm not sure if I understood everything correctly (i.e. it doesn't work yet ;-)

Anyone already done this who could provide me a working post-commit script for UNIX shells (or perl)?

many thanks

Stefan Wiesendanger
Wednesday, October 13, 2004

The file has this hard-coded:

set LogBugDataScript=C:\SubVersion\Repos\Hooks\logBugDataSVN.vbs

But you're using logBugDataSVN.pl not .vbs right? And you're on a mac. Have you changed this line to suit your needs? What does that line look like now?

Dmitri
Fog Creek Software
Wednesday, October 13, 2004

Actually made it working now - made quite a few mistakes initially I think (permission stuff)

So in case anyone's interested, here's how it looks like:
#!/bin/sh

REPOS="$1"
REV="$2"
LOGBUGDATASCRIPT="/Library/Repository/hooks/logBugDataSVN.pl"

echo $REPOS
echo $REV

svnlook changed -r $REV $REPOS > /Library/Repository/hooks/svnchanged.txt
svnlook log -r $REV $REPOS | perl $LOGBUGDATASCRIPT $REV /Library/Repository/hooks/svnchanged.txt

rm /Library/Repository/hooks/svnchanged.txt

Stefan Wiesendanger
Wednesday, October 13, 2004

*  Recent Topics

*  Fog Creek Home