# Subversion

Jump to: navigation, search
 This article or section may require a cleanup.We are hoping to create articles that meet certain standards. Please discuss this issue on the talk page. Editing help is available.

Subversion (official site) is a version-control system that keeps track of changes in your files on a server. Subversion helps to coordinate work among multiple people. For an introduction - read the book - it is really great.

## Subversion on Dreamhost

The current version of Subversion on Dreamhost is 1.5.1. If you want to install a newer version, please see Subversion_Installation. If your server is still running old 1.3.x version, let us know and we can upgrade it for you. Subversion 1.4.x features repository mirroring, more efficient transfer and storage of binary files in comparison with previous versions.

You can install and configure Subversion repositories from control panel.

## Quick Start

To set up a Subversion repository at svn.yoursite.com for a project called "myproject", follow these steps:

1. Create svn.yoursite.com:
1. Go to your DreamHost control panel and click Domains, then Manage Domains
2. Click Add New Domain / Sub-Domain
3. Enter "svn.yoursite.com" in the Domain To Host field, enter "svn.yoursite.com" in the Web Directory field, and select Remove www.
4. Click Fully Host This Domain Now!
2. Wait a few hours until the new DNS information propagates (that is, when visiting svn.yoursite.com in a web browser doesn't give an error--the page will look like an empty directory listing once the DNS info has propagated).
3. Set up a Subversion repository:
1. Click Goodies, then Subversion
2. Enter "My Project" in the Project Name field, "myproject" in the Project ID field, and make sure that svn.yoursite.com is selected for the URL. Use "myproject" as the directory name.
3. Replace the dummy usernames and passwords with a username and password for yourself.
4. Click Create My New Project Repository Now!

As soon as the DreamHost Subversive Robot actually creates your repository, you can begin using it. For instance, to import a directory:

svn import some_directory http://svn.yoursite.com/myproject -m "Initial import"

You can create additional users for your Subversion project at any time by going to Goodies, Subversion and editing the project. Using this method, users cannot change their own passwords.

### Gotchas

Warning: If you create a new repository at an existing domain, the domain may be moved to a new Apache service and the DNS information will change. This will affect you if you have your DNS info hosted somewhere else than Dreamhost (you'll have to get the new IP address and update your DNS info). This is only the case with domains that have been hosted with DreamHost for more than a year or so. Anything added more recently than that will probably not be affected.

Warning: Repositories don't act like normal directories: You will not be able to use .htaccess files, cgi scripts, etc. in your repository directory. For instance, if you setup your repository at http://svn.example.com/, you will not be able to password protect that directory using .htaccess. You must use the Public/Private field in the Subversion panel page. Changes made in the Htaccess/WebDAV panel also do not apply to your SVN repository.

This also means you can't install ViewVC in the main repository directory. To work around this, put your repository in http://svn.example.com/svn/ and the ViewVC cgi in http://svn.example.com/. Remember, you'll need to use a .htaccess file to configure http://svn.example.com/, but the Public/Private field in the Subversion panel to protect http://svn.example.com/svn/.

Hastily-made repositories often don't work: If you create your repository before its intended host is fully created (and resolved), you may have an inaccessible repository. Assuming it doesn't yet contain any information (how could it?), just delete it and recreate it. (Alternatively, you may be experiencing a DNS propagation delay if you can access your repository via http within the DreamHost system, but see an empty directory from outside DreamHost [Apache 1.3x serving your empty domain]. If you can't wait, try querying the DH DNS servers for your IP and using a local hosts file or NetInfo to temporarily resolve your svn host. Remember to undo this when DNS records have propagated.)

Some have reported success just submitting an edit (with no changes) to their repository in the Control Panel. This operation recreates your reponame.access and reponame.passwd files re-establishing dhapache as their group (and undoing any MD5 passwords you've made manually). Unfortunately, this does nothing to fix your repository if the owner has been changed from dhapache to your username.

It would be nice if the Subversion Control Panel had an explicit option to fix owner and group on a given repository, say, by running:

sudo chown -R dhapache ~/svn/reponame;
sudo chgrp dhapache ~/svn/reponame.access ~/svn/reponame.passwd;


... in the background. As it is, you have to dump, recreate and reload your repository.

Another nice feature would be a Control Panel switch to allow passwords to be created and maintained with MD5 encryption.

Some clients require MD5 passwords: If you get "access denied" warnings, you may need to use MD5 passwords instead of the standard variety created by the DreamHost Control Panel. Use htpasswd -nm username to generate the entry (ala username:passwd-hash) for your reponame.passwd file. And use an editor (ala nano reponame.passwd) to replace your standard password entry.

Don't overwrite your reponame.access and reponame.passwd files with echo "username:passwd-hash" > reponame.passwd Overwriting the files will cause them to have your user's group instead of dhapache, leaving your repository in a read-only or inaccessible state.

Removing repositories through the control panel doesn't seem to remove the ~/svn/<repo-id> directory. (as of Apr 12 2006) Workaround:

cd ~/svn;
mkdir old;
mv <repo-id> old


You have the proper permissions to do this. (You can also use WebFTP to delete or rename the repository directory.)

Warning: It has been reported that DreamHost's "Extra Web Security" (Mod_security) can interfere with proper operation of Subversion on DreamHost servers. If you find that you are having trouble with checkouts, and a check of your error.log shows a "ModSecurity:" error, you can resolve this issue by disabling mod_security for your domain ("Edit" the "Web Hosting" setup in the "Domains -> Manage Domains" section of the panel and uncheck the "Extra Web Security" checkbox).

## Connecting to Subversion Repository

### Using svn+ssh

Allows for a svn client to connect directly with the repository via ssh.

You have to set up a ssh username and password. Subversion users defined in the panel will not be used for authentication.

   svn+ssh://{user}@www.yourdomain.ext/home/{user}/svn/{project}


note: {project} is the ID of your subversion project, NOT the projectname.

You should also check SSH#Passwordless_Login to use this mode without being asked for the password repeated times

See also SVN book for SSH tricks

### Using HTTP

1. Use the HTTP path that you used in the Subversion panel.
2. Sign in using username and password specified in the panel.
Is there any way for svn users to change their password in this mode? No. Only through panel.
Is there any way to use https instead of http? Yes, but first you will need a unique IP address and Secure Server installed on your domain.

### Using the Command Line (CLI)

• Locally (assuming your project is hosted on Dreamhost and can be accessed from your shell).
svn list file:///home/{user}/svn/{project}

• HTTP.
svn list {projectURL}

• SSH Tunnel.
svn list svn+ssh://{user}@www.yourdomain.ext/home/{user}/svn/{project}


note: {project} is the ID of your subversion project, NOT the projectname, which can be found on the Subversion panel.
note: {projectURL} is the Project URL chosen by you on the Subversion panel.

## How to use: quick reference

 The instructions provided in this article or section require shell access unless otherwise stated. You can use the PuTTY client on Windows, or SSH on UNIX and UNIX-like systems such as Linux or Mac OS X.Your account must be configured for shell access in the Control Panel.More information may be available on the article's talk page.

### Creating Repository via Command-Line

If you didn't use the Dreamhost Subversion Panel, you can create the repository at a directory. If you used the Quick Start method then skip this step and go to the next one.

svnadmin create /home/user/path/to/repository


#### Gotchas

Handmade repos are read-only (via http): If you find that you have to tweak and reload your dumpfile a few times, it can be handy to use the CLI tools (e.g. rm -rf and svnadmin create) to wipe and recreate your repository until you get it right. But then you'll want to use the Control Panel to delete and recreate your repository. Your test repositories will not function properly in production (they won't permit any changes).

The Panel creates the repository with dhapache as the owner, and the reponame.access and reponame.passwd files with dhapache as the group. Trying to create your own production repo with svnadmin create is futile because you don't have authorization to change those ownerships and group memberships (and you're not a sudoer).

Don't overwrite dhapache files: Don't overwrite your reponame.access and reponame.passwd files with echo "username:passwd-hash" > reponame.passwd (e.g. if you're trying to use MD5 passwords). Use an editor and paste in the new data. Overwriting the files will cause them to have your user's group instead of dhapache. If your repository is relatively mature when you make this mistake, and you have no backup, you will be out of options.

### Importing Folders and Files

Once the repository is created you can add folders and files that you have in another location. It is better to use this method to keep the revisions number down when first creating the repository.

svn import /home/USER/path/to/source file:///home/USER/path/to/repository --message="Importing Project"


You have to put a message in and change the text inside to whatever you are doing at the time.

### Loading a dumpfile

Sometimes, you would have an existing repository that you want to migrate to your Dreamhost svn repository. You will need to take a dump of your existing repository and load it into your Dreamhost repository.

• Dump your existing repository
 svnadmin dump path-to-repo | gzip > dumpfile.gz

• Upload dumpfile.gz to your home directory.
• Load this into your repository.
If you set up using the Dreamhost Subversion Panel, then the repository will be under the $HOME/svn/{repo-id} where the repo-id is the id you used to setup the repository in the panel. Decompress the dumpfile first. gunzip -c home_dir/dumpfile.gz | svnadmin load svn/repository_id  Command should show all files being imported, if not then check the instructions and try again. ### Using TortoiseSVN TortoiseSVN is a Windows GUI integration program for svn. Use at your own risk, it is not officially supported. #### Using HTTP 1. Download the TortoiseSVN client from the official site 2. Run the installer 3. Create a folder somewhere and leave it empty. Any name and location on your own computer will do. A folder under My documents or on your desktop might be convenient. 4. Open the context menu of the folder (by right clicking on it for example) and you will notice a few new items somewhere halfway the menu, in particular SVN Checkout... and TortoiseSVN which is a submenu. 5. Choose SVN Checkout.... A new window called Checkout wil open. 6. In the Repository section, fill out the URL of your repository. Don't forget to start with http://. For example : http://svn.mysite.com/myrepository/. 7. You can immediately type the full path in your svn that you would like to check out or you can now click the button with the ... besides the URL field. This will let you browse the contents of your repository and choose a specific folder. It might take a minute to load. 1. If you get a 405 error that says something about not having permission, you may have mistyped the URL for your repository and ended up on your regular webserver instead of inside the repository. If you have this problem repeatedly, use a command shell to do the checkout. 2. Note that your repository is completely empty if you just created it. The repository browser allows you to create folders and move them around, but that's about it. 8. The Checkout directory should already be filled in, there are two checkboxes (Only check out the top folder and Omit externals) which you should leave unchecked. If you just plan to have a simple repository you probably won't be needing them at all. Otherwise read about them in the TortoiseSVN help (folder context menu > TortoiseSVN submenu > Help). 1. You may rename the local directory if you wish, but do not give it a name ending in .com (as suggested below for the server), as this can cause problems with some Windows security programs that flag the directory as an executable file. 9. Leave Revision at HEAD revision for now. Go ahead and confirm this dialog with the OK button. You should now see a log screen and after a few seconds it should say complete at revision 0. 10. At this point you can start working in the folder, if you already have a project you were working on just move it all into this folder. 11. Now pull up the folder context menu and choose SVN Commit... 12. This brings up a window where you can choose which files should be included in the SVN. If you're working with software and compiling things a lot of temporary files and binaries get generated that are absolutely not necessary since they can be easily regenerated from the source code. You should uncheck these to avoid needless traffic and storage usage. Congratulations, at this point, you're in business! You can now make changes and commit them, revert if you want to undo (TortoiseSVN submenu) everything after the last commit and much more. The TortoiseSVN help is always available for more details. Note that this method sends everything over the internet in cleartext, which may or may not be much of a problem to you.  #### Using an SSH tunnel This walkthrough assumes username is myname, with a website at www.mysite.com, and that the repositories are in ~/svn starting with a project named myproject. You can choose your own directory names. Step 1: Create the repository following the Repository section of this guide. Step 2: Download and install SVN client ##### Create Session Key If you don't create the public session key, you will have to type your password in for every action in the browser and for every time TortoiseSVN connects to the server. Start in your home directory cd ~  Generate the key set using the passphrase of your choice and put the public key in a .ssh directory (note: the name "rsakey" isn't required) Write down your passphrase as you will need it later. ssh-keygen -b 1024 -t rsa -N SomeLongTextForPassphrase -f rsakey  Create the .ssh folder mkdir .ssh  Move the public key inside of the folder and rename it. mv rsakey.pub .ssh/authorized_keys  Change permissions on both the folder and file for security. chmod 700 .ssh chmod 600 .ssh/authorized_keys  Download and install the Putty tools (scroll down to the Windows-style installer). This is an SSH client with authentication tools. Download your "rsakey" file (your private key) from the server to your local machine (the rsakey should be in your home directory). Use your Windows FTP client.  Load it into the PuTTYgen tool (puttygen.exe) and enter your passphrase when it asks for it. Use SSH-2 (RSA) which will be the default.  Save it as a private key from PuTTYgen in a safe place as rsakey.ppk. ##### Setup New Session 1. Run PuTTY Pageant. Pageant will put an icon of a computer wearing a hat into the System tray. 2. Load a private key into it. Double click on the icon and then click on Private Key File. 3. Type in the Passphrase. • Run Putty and make a new session: • Hostname: www.mysite.com • Protocol: SSH • Saved Sessions: mysiteSSH • Connection->Data->auto-login username: myuser • Connection->SSH->preferred protocol: 2 • Connection->SSH->Auth->private key file: path\to\rsakey.ppk • Click "Save" on the sessions panel to save this config. • Open PuTTY if you want to test your session. PuTTY will notice that Pageant is running, retrieve the key automatically from Pageant, and use it to authenticate. You can now open as many PuTTY sessions as you like without having to type your passphrase again. You may get a message saying, "The server's host key is not set in the registry." (Insert what this means here.) • Now find your local project directory, and copy what you want to add to Subversion into a temporary directory (let's call it "ImportMe"), organizing it carefully -- it's smart to put your files in a "trunk" directory so that working with new branches and tags later is simple. • Right-click on the ImportMe folder and select "Import..." from the TortoiseSVN submenu. You will be adding everything inside this folder into the root of the "myproject" repository. • In the import dialog, enter the URL of Repository like this. Replace "mysiteSSH" with the name of your PuTTY stored session and "myusername" with your real username. If you just want a straight SSH tunnel, we'd use myuser@www.mysite.com here instead of mysiteSSH: svn+ssh://mysiteSSH/home/myusername/svn/myproject ...and click "Okay". This will load your project files into the repository. • Next, check out the files you want to work with into your project directory (but make sure you aren't overwriting files when you check out or you'll get errors). This is the "SVN Checkout..." option in the folder context menu. Everything should be pretty self-explanatory from there on. ##### Other References Guide from TortoiseSVN site (generate RSA key instead of DSA key). ##### Notes • TortoiseSVN (1.1.3) - Go into Settings and enter TortoisePlink as the SSH client under the Network tab to connect to your repository. You can use svn+ssh://myusername@mysiteSSH/home/myusername/svn/myproject to specify your username directly in the URL. Along with Pageant for key-based authentication, using TortoiseSVN is very transparent and easy to use. Also screen is getting over worked for overnight checkouts (yes overnight) screen svn co &> ~/log_co & ^ad  ### Multiple User Access to Repository (I have only tried this in a bundy shell, not externally (with TortoiseSVN, for example) • Create at least two users (mysvnadmin, mysvnuser) • Create the repository and import the project with mysvnuser. • Login (ssh) to mysvnuser's account: $ su mysvnuser
$svn co file:///home/mysvnadmin/repos/project work$ svn add file
$svn commit -m "added file"$ svn log
r1 | mysvnadmin | 2005-09-04 08:03:47 -0700 (04 Sep 2005) | 1 line
initial import
r2 | mysvnuser | 2005-09-04 23:34:13 -0700 (04 Oct 2005) | 1 line
added file


I had no trouble with svn+shh (on bundy):

$svn co svn+ssh://mysvnuser@bundy.dreamhost.com/home/mysvnadmin/repos/project work  Note: The mysvnadmin user must have "Enhanced Security" turned off in order to share data between the two users. There is a checkbox on the User setup screen (under Manage Users) that allows you to toggle enhanced security. ### Using Apache basic authentication The Dreamhost panel provides a way to create user accounts only for Subversion- the above steps require each user to have a Unix account with shell access so they can log in via SSH. If you want to do per-directory permissions in your repository using those accounts, you need to manually edit the .access file as described here: However, if you make changes to the user list using the Dreamhost control panel, it will overwrite any changes you make to the .access file. You can manually add and administer the usernames and passwords for Subversion by using htpasswd to add/edit users to the .passwd file for your repository. This is not recommended though, because after manual editing either the .access or .passwd files, the group changes from dhapache to whatever the auto-generated group for your account is. This prevents the Apache module from being able to read the files. You then need to change the permissions so that they can be read by apache: chmod 644 Note that this is giving "world" read access to those files, which potentially is a security risk. Using control panel automatically resets group back to dbapache, but you will lose your per-directory settings. Using Apache and these passwords isn't very secure anyway without https access, so this is all more for convenience. If you need security, create Unix accounts with SSH shell access as described above. ### Using Subversion for Web development #### Using Your Repository (via Command Line) Now that you imported your files to the Repository, you might be wondering how to leverage version control to your advantage. First thing you need to do (if you haven't set it up already) is set up a Development area and a Live area. For the purposes of this HowTo, http://svn. http://dev.yoursite.com/ will be our development area and http://www.yoursite.com will be the Live area. 1 ssh into your Dreamhost account. From your home directory, we'll be issuing the following commands. 'svn help' can be very useful. 2 Back-up your site tar -cvvf yoursite.tar yoursite.com/  3 Check out your repository to your development area svn checkout http://svn.yoursite.com/yourProject dev.yoursite.com  4 Check out your repository to your live area svn checkout http://svn.yoursite.com/yourProject yoursite.com rm -rf yoursite.com mkdir yoursite.com svn checkout http://svn.yoursite.com/yourProject yoursite.com  Note: If the yoursite.com directory is the directory you initially imported from, you may get errors. I recommend starting from scratch (why I had you back up the site to begin with) NOTE: These instructions are for use on the server. If you are using Windows for development, do not create a folder with a name ending in .com, as this can cause problems with some Windows security programs that flag the directory as an executable file. #### Publishing from Dev to Live All the changes you made in your Dev area are now ready to go Live. 1 Go to your dev directory cd dev.yoursite.com  2 Commit your changes svn commit -m "Your change log notes"  3 Go to your live directory cd ~/yoursite.com  4 Update Live svn update  #### Automatic Post-commit Checkout Subversion can be a very useful tool for developing Web sites or Web-based applications. You may wonder, though, how that would work. After you commit your changes to your repository, how do you have them reflected on your site? The easiest method is to have your site's directory on the server be a working copy checked out from your Subversion repository. If you elect to do this be certain to modify your site's .htaccess to prevent users from browsing Subversion's control files. Something simple in the root of your site such as the following will suffice. RedirectMatch 403 /\.svn  Additionally you can configure your site to automatically check out the current sources from your repository by using Subversion's "hook scripts". In short, the script called hooks/post-commit will be executed by the web server each time new sources are checked into your repository. Be advised that when the web server executes this script it is running in the security context of the dhapache user -- this user does not and should not (for security reasons) have the necessary permissions to modify the files in your web site's directory. As such we need to arrange for the post-commit script to run the update in the security context of a user with the privileges necessary to update your site. Users familiar with UNIX systems will recognize that this is a task for a setuid binary. Unfortunately the DreamHost /home/ directories are NFS filesystems which are, for security reasons, mounted with setuid disabled. Fortunately the workaround is trivial -- simply set up your update script as a CGI script and have the Subversion post-commit hook invoke this script. Instructions follow. 1. Create a private directory on your website to host your updater script such as /home/username/mysite.com/cgi-bin/pri 1b. And set its permissions so that only the user has write access to it. chmod 755 pri  2. Secure the private directory by creating a .htaccess file with contents similar to the following. AuthName "Dialog prompt" AuthType Basic AuthUserFile /home/username/mysite.com/cgi-bin/pri/.htpasswd Require valid-user  3. Using the htpasswd utility create the .htpasswd file by running the following command in your /home/username/mysite.com/cgi-bin/pri directory. For security reasons make up a new username and password and do not re-use the username and password of a user you have created on your server or a user you have given access to your subversion repository. htpasswd -bc .htpasswd someuser somepasswd  4. Now that you have created and secured a directory for this special CGI script to live in, create a script in that directory called do_update.cgi with the following contents. #!/bin/sh set -f echo "Content-type: text/plain; charset=iso-8859-1" echo /usr/bin/svn update /home/username/mysite.com  4b. Don't forget to give execution privilege to your file. Only the user can have write access to it. chmod 755 do_update.cgi  5. Finally, modify your /home/username/svn/projectname/hooks/post-commit to invoke your CGI script so your site will update after each commit. #!/bin/bash wget --http-user=someuser --http-passwd=somepasswd -qO - http://mysite.com/cgi-bin/pri/do_update.cgi  5b. Don't forget to give execution privilege to your file. Again, only the user can have write access to it. chmod 755 post-commit  Alternatively, if you run many subversion web projects, you could create a directory in your web space, and create CGI script to update each of them. For example, having all projects in http://mysite.com/projects/proyectname For this, instead of using script in step 4, use this: #!/bin/sh set -f echo "Content-type:text/plain; charset=iso-8859-1" USERNAME=someuser SITE=mysite.com PROJDIR=projects PROJ=echo "$QUERY_STRING" | grep -oE "(^|[?&])project=[^&]+" | sed "s/%20/ /g" | cut -f 2 -d "="
export LC_CTYPE=en_US.UTF-8 # added for support of non-ascii file names
echo "[Server $SITE] Updating:$PROJ in $PROJDIR" /usr/bin/svn update /home/$USERNAME/$SITE/$PROJDIR/$PROJ --username user --password pass 2>&1  and save it as svn_update.cgi. Remember to set permissions afterwards. Then, instead of the script in step 5, use this: #!/bin/bash wget --http-user=someuser --http-passwd=somepasswd -qO - http://mysite.com/cgi-bin/pri/svn_update.cgi?project=myproject  And specify a diferent 'myproject' at the end of the wget line of the script. ## Upgrading to Newest Subversion If you would like to install a newer version of subversion (e.g., for repository syncing), then you will need to go to this page http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&expandFolder=74  and download both the subversion-x.x.x.tar.bz2 and the subversion-deps-x.x.x.tar.bz2. The "deps" file contains all the subversion dependencies. ### Compilation and Installation Compiling subversion is pretty straightforward but you may encounter some compilation errors depending on the version. In general, follow these steps to compile and install subversion locally: mkdir tmpwork cd tmpwork wget http://subversion.tigris.org/downloads/subversion-x.x.x.tar.bz2 wget http://subversion.tigris.org/downloads/subversion-deps-x.x.x.tar.bz2 tar -xjf subversion-x.x.x.tar.bz2 tar -xjf subversion-deps-x.x.x.tar.bz2 cd subversion-x.x.x ./configure --prefix=/home/{yourlogin} --with-ssl [See version specific config information below] make make install  That will install the new subversion into your user directory. You'll need to change the path to include your ~/bin directory to use the new binaries. To do that type this: alias svn='/home/USERNAME/bin/svn' #### 1.5.6 For 1.5.6, a compilation error will occur if you use the above configure command: relocation R_X86_64_32 against a local symbol' can not be used when making a shared object; recompile with -fPIC so when configuring use this: ./configure --prefix=/home/{yourlogin} --with-ssl --enable-shared ` #### 1.6.6 Just did an install with v1.6.6 and the standard configuration compiled fine. You'll want to add the path to your installed version to both your .bash_profile and .bashrc Be aware that if you upgrade your repository (svnadmin upgrade) to the 1.6 format, you will not be able to access it via http (use svn+ssh instead). ## Interfacing with Subversion from PHP You'll need to install the PECL extension SVN. Detailed instructions are available here: http://hp.jpsband.org/xhtml-compiler/docs/compile-svn.txt ## Setting up post commit emails ### Using Post-commit.tmpl 1. Load up ~/svn/(repository name)/hooks/post-commit.tmpl file in a text editor. 2. Change /usr/lib/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV" something@example.org to: /usr/lib/subversion/hook-scripts/commit-email.pl --from SVNADDRESS@YOURHOST.COM "$REPOS" "$REV" YOURADDDRESS@example.org 3. Save the file as post-commit (remove the 'tmpl' file extension). The new file should be owned by your user (NOT dhapache). Run chmod a+x post-commit to give the file world-executable permissions. (Note: The --from section is crucial because the script will fail if it does not have a "from" address. Any e-mail address will do.) Try a commit with your svn repository, and you should receive a commit notification e-mail. ### Using Adam Doppelt's Ruby Script A much more aesthetically pleasing script is also available here: Post-commit email in Ruby 1. Copy the script (svn-email.rb) to: /your-svn-repository/hooks/svn-email.rb 2. Load up the file in a text editor and change the line MODIFY_THIS@MODIFY_THIS.COM to an e-mail address like SVN@YOURHOST.COM 3. Save the file 4. Load up post-commit.tmpl in a text editor. Comment out (using the # symbol) the line: /usr/share/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV" commit-watchers@example.org 5. Insert a line below like this: /home/your_username/svn/your-svn-repository-name/hooks/svn-email.rb "$REPOS" "\$REV"
6. Save the file as post-commit (remove the 'tmpl' file extension). The new file should be owned by your user (NOT dhapache). Run chmod a+x post-commit to give the file world-executable permissions.

Try a commit with your svn repository, and now you should have a very pretty html-based e-mail.