LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-27-2011, 07:27 PM   #1
thetar
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
SVN post-commit not working! Please... someone... help.


I have been searching EVERYWHERE for a solution to my problem, I have been sent to the red-bean "answer" so many times I think I know it word by word.

Here is my problem, I run a WHM/cPanel server and want to make a repository (/home/<user>/svn) update a working copy (/home/<user>/public_html/dev) to work on a dev. subdomain on each site we have.

I have the the SVN part working but can not get anything about the post commit to work. I even simplified it to the point that all the /hooks/post-commit file contained was..

Code:
#!/bin/sh

REPOS="$1"
REV="$2"

echo "post-commit: $REPOS // $REV" >> /home/<user>/svn/hooks/log.txt
of course <user> is my username

This works with the below commands

Quote:
./post-commit repo 123
Quote:
su - nobody
env - ./post-commit repository 1234
Quote:
su - <user>
env - ./post-commit thisrepo 4321
etc. but when I commit a change on a remote working copy it does not log the change. meaning the post-commit does not fire, or the post-commit did not work??

I am very lost, don't know what else to try, I am not sure if it is because I am running it off of mod_dav_svn.so

Quote:
<VirtualHost <ip>:80>
ServerName svn.<url>

<IfModule mod_dav_svn.c>
<Location / >
DAV svn
SVNPath /home/<username>/svn
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /home/<username>/svn-auth
Require valid-user
</Location>
</IfModule>
</VirtualHost>
Everything on the SVN seems to work though.

Any direction that doesn't link to red-bean would be GREAT!!
 
Old 02-28-2011, 03:58 PM   #2
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 50
Hi,

Can you try the following:

1) Remove $1 and $2 and just try to do a simple echo. Just in case.
2) Try to do a svn commit from the command line (not via webdav)

Please let me know how it went. Maybe it will give us more information about the problem.
 
Old 02-28-2011, 07:15 PM   #3
thetar
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you for the response.

I tried removing the variables to make the post-commit even more basic
Code:
#!/bin/sh

echo "post-commit: test  // this" >> /home/rouseinc/svn/hooks/log.txt
that didn't work.

I committed my working copy on the server
Code:
svn commit dev
It commited my changes, but didn't update the log.txt

:-(
 
Old 02-28-2011, 07:36 PM   #4
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 50
Try to put only this in hooks/post-commit:
Code:
echo "asd" > /tmp/foobar
Does pre-commit work? Any other hooks work at all?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to do the first svn commit cstrieder Linux - General 1 01-20-2011 08:29 AM
Security issues with having a pub apache folder in home dir. svn post-commit workarou aimbot Linux - Newbie 1 10-18-2009 03:46 PM
[SOLVED] apache2 SVN post-commit script certificate error Matt202 Linux - Server 5 10-13-2009 04:55 AM
[SVN - post-commit hook] hook failed, did not exit cleanly G00fy Programming 0 01-21-2009 03:15 AM
svn post-commit hook script mcd Linux - Software 1 08-08-2008 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration