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.

Advertisements

4 Comments on “Subversion For Dummies”

  1. Gareth Gulson says:

    I am assuming there is a specific reason you need to use SVN?

    If not take a look at http://tortoisesvn.tigris.org/ for a windows shell extension to make things a bit easier to maintain and work with.

  2. Riaan says:

    If you haven’t yet, try VisualSVN out for the server.

  3. openlandscape says:

    Gareth,

    I know about Tortoise (who doesn’t), but where is your sense of system admin adventure, you know getting close to the metal, that kind of thing? Or maybe its just a sign of my desperation from writing specs the past 6 months? 🙂

    Riaan,

    I e-mail you at work & you don’t reply. I do a post on my blog & I get comment in 24hours? Clearly an indication that this Web 2.0 communcation thing is taking over 🙂 I knew about VisualSVN, but I thought its not free unless you’re hosting an OSS app with it (which obviously is not what I am using it for). So I kind of ignored that one, but will look into it.

  4. Mark Goosen says:

    Just to note…

    when your creating the trunk and branches you don’t require the ‘mkdir’ command as all this does is create a physical folder within the repository ‘db’. This isn’t required as the following command ‘svn mkdir’ creates it within the repository structure itself


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s