developer | thinker | tinkerer

Quickly Setup New Projects Using SVN

We have a standard directory structure for each of our projects:


Testing contains our Selenium scripts (and in the future - unit testing scripts). Build contains our Ant scripts.

At the office I'm in charge of setting up new SVN repositories and one of the things I've done to speed up setting up new projects is to create a 'template' project directory. This contains all the folders listed above along with some default buildfile and testing scripts.

I first created this layout in a new repository. I then added our standard buildfiles and testing suite files. I then created a SVN dumpfile using the svnadmin dump command. You end up with a dumpfile containing the contents of your repository.

Now when I create a new project I simple create the new project's repository, and then use the svnadmin load command to import my 'default' dumpfile contents.

/usr/bin/svnadmin create --fs-type fsfs /var/www/svn/projectname
sudo chown -R apache:apache /var/www/svn/projectname
sudo svnadmin load /var/www/svn/projectname < /var/www/svn/tmp/template.dumpfile --ignore-uuid -q

Now when the first person checks out the project - they already have the required directory structure, buildfiles and testing templates.

The Semi-Annual CFEclipse Sucks Post (and what you can do about it) Beating Free Software

More like this...