Subversion For Dummies

Currently at Intervate Cape Town I am looking after our Subversion source control (in fact I am doing a small presentation to the team tomorrow). Anyways I am by no means a Subversion guru, I only know enough to live with it in harmony.

However there are a few admin tasks I have to perform every now and then, which I tend to get vague on by the next time I have to do it. So this is my short reminder list of how to do these things.

Create a New Repository

I use the following structure for my project repositories

project_repository/trunk
project_repository/branches
project_repository/branches/1.0
project_repository/branches/1.1
project_repository/branches/2.0

1. Create the repository root directory on Windows:

mkdir project_repository.

2. Create the Subversion repository. We use a single project per repository configuration. Nothing stops you from using multiple projects in a repository.

svnadmin create c:\svn_repositories\project_repository

3. Create the required sub-directories.

cd c:\svn_repositories\project_repository
mkdir trunk
svn mkdir file:///c:/svn_repositories/project_repository/trunk -m “Initial setup”

… and so forth. Note the message is required, otherwise Subversion won’t commit.