Question: How can I set my server up to access files in a repository?


Info: I have this small server project I've been working on now for about 8 months. I've gotten some things accomplished, notable for this question are that I have both Apache and SVN running. What I'm looking to do is set up Apache to access files inside of a repository. It would be a lot nicer to my web development via a repository than FTP. (I'm a college student, left my server at home. So all my management is done remotely.)

I had hoped that the most recent commit on server side would just be in a folder than I could access, such seems to not be the case. Is there something I must do make the last commit show up so that Apache can load those files? or do i have to actually check the code out to a different folder on the server and have Apache access those files?


Details:

Ubuntu Linux 9.04

Apache 2.2.11

SVN 1.5.4

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

You could do a post-commit hook to update your local checkout on your server, something like putting :

/usr/bin/svn update --accept theirs-full /home/where/your/checkout/is

in your post-commit hook file in your repository's hooks directory. (The --accept theirs-full is there in case you one day modify the checkout and there's a conflict later.)

link|improve this answer
how do i do an initial check out? as I currently don't have this checked out on the server at all. I typed what you gave me there and it resulted in: Skipped '/projects/www' I'm guessing I have to check out to somewhere locally before I can do an update. – Narcolapser Feb 22 '10 at 0:43
You do the initial checkout the same way you'd do it somewhere else, svn checkout http://.... – mat Feb 22 '10 at 8:36
Oh, and you have to do it with the user the web server runs in, as the svn update will be done by that user. – mat Feb 22 '10 at 8:50
ah, there we go. that's what i was looking for. Thanks! – Narcolapser Feb 22 '10 at 15:31
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.