i have two different versions of my site. A development (test.domain.com) and a production (www.domain.com), both running on the same slice at /var/www so both my partner and I can see the site.
I want to create a svn repository that I can share with my partner. Currently, I have it set up as /home/username/repository/ as the article indicated. But since it's in my home folder...my partner shoudn't be able to access it. My question is, where should I place repository so my partner and I can both access using ssh+svn? My initial thought was to place it in /var or /www folder or inside test.domain.com folder, but one of the comments said that I should never set up svn as a root...so I'm little confused on how my svn structure should be...
/home/www/* is owned by root:www-data with permissions drwxr-x--- /home/www/example1.com/www.example1.com is owned by apache:www-data with permissions drwxr-x---
My svn repository lives under /home/svn-repos and is owned by apache:www-data with permissions drwxr-x--
All svn data is stored in a bdb database rather than as files and directories (using the --fs-type bdb switch when a repository is created). I then use the post-commit hook to export the latest snapshot to the dev folder of the site for which changes are being committed (basically it deletes the old dev.domain.tld directory and recreates it with an export of the latest snapshot). Once it's exported the snapshot, it sets the owner of the directory to apache:www-data with permissions drwxr-x---
Finally, for going from development to production, I have a shell script that deletes the contents of /home/www/domain.tld/www.domain.tld and then copies over the new contents from /home/www/domain.tld/dev.domain.tld
An advantage of the above is that you can also setup a read-only ftp server for your webdev team which points to /home/www As long as the ftp server uses virtual accounts for your users and actually browses files/directories with a system account other than apache (e.g. ftpuser:www-data) users can download files but not alter them i.e. all changes have to be done through svn.
Hope the above is useful (and sorry if it sounds complicated, don't worry it isn't - I'm just tired and am having problems writing clearly!)
[ Edit ]
Forgot to mention, the above assumes you are using webdav to control subversion i.e. doing it through apache.
Note to anyone else reading: This seems to require that you make your website files and directories writeable by apache. I always thought this was supposed to be a bad idea as it means if the apache process gets compromised a malicious user could delete all the site contents. Is there a way to avoid making site contents writeable by apache when using webdav with subversion?