[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problems with Hook Scripts

From: Marie <startingout_at_gmail.com>
Date: 2004-11-09 00:27:25 CET

i did something like this on my svn1.1.1 for my backup/hook script

# create backup dir
mkdir /var/SVN/SVNBackup
# make apache owner of the backup dir
chown -R nobody:nogroup /var/SVN/SVNBackup
# copy template
cp $SVN_HOME/repos/project1/hooks/post-commit.tmpl
$SVN_HOME/repos/project1/hooks/post-commit
# change mode
chmod +x $SVN_HOME/repos/repos1/hooks/post-commit
# change owner
chown -R nobody:nogroup $SVN_HOME/repos/repos1/hooks/post-commit
# modify post-commit
vi $SVN_HOME/repos/repos1/hooks/post-commit
(cd /usr/local/svn/repos/repos1/hooks;
/usr/local/svn/bin/hot-backup.py ${REPOS} /var/SVN/SVNBackup &)
# Now every commit, SVN will backup to SVNBackup

On Sat, 6 Nov 2004 07:04:44 -0800 (PST), Rydinare <rydinare@yahoo.com> wrote:
>
> Hello again. I'm running Subversion 1.1.0 on Fedora Core 2. I've been
> having a lot of problems getting the hook scripts to work. First, I made a
> new test repository and then was trying to use the post-commit hook script.
> It wouldn't run. I made sure it was executable. Then, I moved all of the
> .tmpl files out. It still didn't run. So, I added a start-commit and
> pre-commit script in, thinking that perhaps they had to be there before the
> post-commit would run. I was getting an error with the start-commit upon a
> 'svn commit' command, but at least that gave me confidence that something
> was going on. However, I realized that it wasn't executable, so I fixed the
> permissions. Now, I'm back to square one, where nothing seems to be
> happening. I added echo commands, put text into stderr. I still see
> nothing. I added UNIX commands like piping to a file and even tried out
> code to export the current repository directory, so I could see if something
> would happen. No dice. I'm getting frustrated, since the learning curve
> for the hook scripts seems to be longer than I expected and I have not found
> good documentation on it.
>
> So, here's my questions:
>
> 1) What am I doing wrong?
> 2) Does anyone know of any sites that go into more depth about hook scripts?
> The subversion book on redbean.com kind of glazes over them, IMHO, and
> doesn't go into any real detail that would help me in a case like this.
>
> Thanks in advance for any assistance that you can provide.
>
> Sincerely,
>
> Lawrence
>
> ________________________________
> Do you Yahoo!?
> Check out the new Yahoo! Front Page. www.yahoo.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 9 00:28:08 2004

This is an archived mail posted to the Subversion Users mailing list.