Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7767685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:44:16+00:00 2026-06-01T15:44:16+00:00

I have an SVN repo set up on my server and am having post-commit

  • 0

I have an SVN repo set up on my server and am having post-commit issues. I am using SmartSVN as my client on my iMac. I connect through ssh+svn from SmartSVN. I am able to successfully connect to the SVN and make changes to it, but my post-commit script is not working after I commit from my SVN client.

I created my post-commit shell script named post-commit.sh and put it in the hooks directory thinking this was all you had to do in order to get it working. Basically what the script does is SVN checkout to a temporary workspace, then upload the necessary files to my development subdomain on my server. I do this so that I can have a testing environment for all changes that users make for my web application. The file originally looked liked this.

rm -rf /home/modionzc/tempworkspace/artistcondevspace/*
cd /home/modionzc/tempworkspace/artistcondevspace
svn checkout file:///home/modionzc/svnrepos/artistcondevrep
rm -rf /home/modionzc/public_html/devsuper/application/*
rm -rf /home/modionzc/public_html/devsuper/css/*
rm -rf /home/modionzc/public_html/devsuper/js/*
rm -rf /home/modionzc/public_html/devsuper/images/*
cp -r /home/modionzc/tempworkspace/artistcondevspace/artistcondevrep/trunk/application/* /home/modionzc/public_html/devsuper/application/
cp -r /home/modionzc/tempworkspace/artistcondevspace/artistcondevrep/trunk/css/* /home/modionzc/public_html/devsuper/css/
cp -r /home/modionzc/tempworkspace/artistcondevspace/artistcondevrep/trunk/js/* /home/modionzc/public_html/devsuper/js/
cp -r /home/modionzc/tempworkspace/artistcondevspace/artistcondevrep/trunk/images/* /home/modionzc/public_html/devsuper/images/
cp /home/modionzc/artistconconfig/appconfigfiles/config.php /home/modionzc/public_html/devsuper/application/config/config.php
cp /home/modionzc/artistconconfig/appconfigfiles/database.php /home/modionzc/public_html/devsuper/application/config/database.php
cd /home/modionzc/public_html/devsuper
chmod -R 755 *
chmod 644 $(find *.* ! -type d)

It runs perfectly normally when I run it manually from the command line and updates the necessary files. Now for some reason it is not being called whenever I commit from my SmartSVN. The changes are made through the repository and if I run the script manually I can see that the updates were actually made. I did some research and found out that it could be permission issues or that I’m not using absolute paths. I am using absolute paths throughout the script. The permissions to the file is set to 755. The only thing that I can think of is the actual SVN user doesn’t have permission which are the users created in the conf file. I have looked through the SVN manual and over the internet for a fix without much success.

One suggestion was to to make a log file to see any errors that are caused when the script is called. So now my post-commit script calls another file that has the commands above and outputs the command line returns to a file called svna.log. The post-commit.sh file looks like this now.

cd /home/modionzc/hooktest/
/home/modionzc/hooktest/ac_post_commit.sh &> svna.log

Where ac_post_commit.sh has the original code above.
Again if I call it manually all the responses go to the file as necessary, but if I commit my work from SmartSVN the log file is actually empty.

FYI – for some reason my post-commit.sh has a * at the end of it and is listed as post-commit.sh* when I ls the files in the hooks directory.

Please, any help with this would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:44:17+00:00Added an answer on June 1, 2026 at 3:44 pm

    I found out that the issue on the svn forums while looking at another persons post here http://www.svnforum.org/threads/40951-How-repository-hooks-works?highlight=post-commit . The problem lies with the fact that the post-commit file cannot have a .sh appended to the end of it. It needs to be named just “post-commit”. This does need to have the path to the type of script that you are writing in the first line which was mentioned by Mensi above but was not the problem with the script. Thanks for your help anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started to set up a new SVN repo on AWS, and am
We have a continuous build setup on our SVN repo using cc.net. The trunk
I have set up a Linux Server and installed Apache and SVN and dav_svn
I am using svn on MacOS X. I have set up a repository with
Hi I have SVN repo that I frequently use for change management. However after
should i after i have created a svn repo, import one project folder into
I have a branch in a badly structured svn repo that needs to be
In my git repo which is tracking a svn repo I have made a
We have a single SVN repository with multiple related projects. Like so... \repo \Project1
This is maybe unusual so let me set the scene: We have an SVN

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.