I’m not a huge fan of SVN. It’s crappy for file transfers and it easily locks. But still, it works pretty well for my relatively small needs and it’s super easy to setup. I’d like to talk a little bit about the things you might not know about SVN…
Hooks on the SVN Server
You might not know this but you can add a lot of personalized actions on your repository. You just have to add script files to the “hooks” directory of your repository. For a complete list of hooks file name, look here.
The two most important files you should consider adding are :
- post-commit : This file is executed each time something is commited. With it you can send the change made during the last commit.
- pre-revprop-change : This file controls what property you allow to change on your published files. It’s really useful when you want to allow people to edit some already committed logs.
Useful SVN properties on files and directories
SVN properties can be attached to files and directory to define special behaviors on the other clients or on the server. For a complete list of the SVN properties, look here. Here are for me the most important SVN properties :
- svn:externals : Reference to an external SVN source. This is very useful, you can have the same files copied.
- svn:needs-lock : This will force you to lock file(s) before committing them. This should be only use for special files like binary file that can’t be merged (Word can merge concurrent versions of the same file).
Quick note : A very bad idea I had was to put my SVN files within my dropbox folder. It creates a lot more locks than SVN normally does.