With a little searching, I found WebSVN which offered a few different, yet clean interfaces and a nice set of options. Here's how I set everything up:
First we create a svn repository. We want to specify the FSFS type because the Berkley DB causes to many permission issues when apache runs as a different user than you.
$ cd ~/
$ mkdir svn
$ svnadmin create --fs-type fsfs svn
Now, we want to lay out our repo into a nice format. We could create a seperate repo for each project, which WebSVN supports, but in a small shared hosting account we want to keep the used disk space to a minimum. Therefore a single, carefully layed out repo should serve just fine. The Subversion Book has some nice suggestions for this sort of thing. Here's how I did it. First I created a temporary directory and then imported it like so (Be sure to replace <username> with your ASO username):
$ mkdir tmpdir
$ cd tmpdir
$ mkdir ProjectA
$ mkdir ProjectA/trunk
$ mkdir ProjectA/branches
$ mkdir ProjectA/tags
$ mkdir ProjectB
$ mkdir ProjectB/trunk
$ mkdir ProjectB/branches
$ mkdir ProjectB/tags
$ svn import . file:///home/<username>/svn -m 'Inital repository layout'
Adding ProjectB
Adding ProjectB/trunk
Adding ProjectB/branches
Adding ProjectB/tags
Adding ProjectA
Adding ProjectA/trunk
Adding ProjectA/branches
Adding ProjectA/tags
Committed revision 1.
Now, let's make sure it worked. Then delete the temp dir:
$ svnlook tree /home/<username>/svn
/
ProjectB/
trunk/
branches/
tags/
ProjectA/
trunk/
branches/
tags/
$ cd ../
$ rm -r tmpdir
Now we want to install WebSVN. Get it via svn You may not want to use truck as I did here - use a stable tag as suggested by the devs. Note that you must use the username and password (both 'guest').
$ svn co http://wedsvn.tigris.org/svn/websvn/trunk www/websvn --username guest
Authentication realm: <http://wedsvn.tigris.org:80> CollabNet SCM Repository
Password for 'guest': guest
A www/websvn/licence.txt
...
U www/websvn
Checked out revision 445.
Finally, we point WebSVN at our repo and alter any other settings we want:
$ cd www/websvn
$ cp include/distconfig.inc include/config.inc
$ vim include/config.inc
// Uncomment and edit this line:
$config->addRepository("My Projects", "file:///home/<username>/svn");
That should do it. Don't forget to replace <username> with your ASO username.
You can see my slightly modified (and currently empty) repo here. Both the config.inc file and install.txt file included with the package have very good documentation on the options available to you.
The one gripe I have is that it requires Enscript for syntax highlighting, which ASO currenyly does not have installed. I'm using it on my test box at home and it works great. I requested it via ticket so we'll see what happens. I realize I could probably hack WebSVN up to use some bloated php package, but who wants that?




Sign In
Register
Help


MultiQuote

- 