tags:

views:

29

answers:

1

I'm just starting out using subversion with the goal of using it to control my website.

I've set up the repos, imported all the files for the website and I am happily checking things in and out and it's a wonderful experience not having to remember which files I changed on which computer so I can grab the latest version from the live server!

I've set up a testing location where I can svn export my website to test before uploading it to the live server. I'd like the export to be done automatically so I don't have to SSH into the server to do it (which I can't always do, depending on where I am).

I created a post-commit script that simply did:

$ svn export <reposURL> <testingDIR> --force

gave the hook script execute all permissions and the <testingDir> has group write permissions for the web server.

When I did an svn ci from my laptop, I got the error:

Transmitting file data .svn: Commit failed (details follow):
svn: MERGE of '<pathOfRepos>': 200 OK 
(http://svn.mydomain.com)

however a subsequent commit threw an error that my working copy was out of date and appears that the commit did actually succeed, the export didn't.

Can anyone tell me where I've gone wrong?

(Running latest ubuntu/apache/svn)

--Edit:

After a lot of poking around and trying various things, I've managed to work out that the reason it isn't working is because my repository requires a username and password when accessed via the web. I've changed the post-commit script to access the repository locally using a file:// type url and it works fine now.

closing the question.

A: 

you may have to add

exit 0

at the end of your script.

Stefan