Creating a Quick SVN Repository
I've recently started to use TortoiseSVN to handle my configuration control needs on a Flex project that I've started working on at home. The other day I purchased a portable external hard drive, with the intention of using it as a way of sharing my project files between my desktop PC and my laptop. I thought that I could also use the drive to backup my work and that I could locate my SVN repository on there too. I could have simply relocated my existing SVN repository from my local hard drive to the new external drive but I couldn't quickly find out the easiest way to do this. Also, I thought that working out how to create the repository from scratch would be a good reason to write a blog post about how to do so. So here goes.
I carried out the following steps.
1) Created a new folder on my external hard drive, named 'svn_repo'.
2) Right-clicked on this new folder and selected 'Create repository here' from the TortoiseSVN sub-menu
3) Created a new folder structure in a temporary folder on my PC hard drive as follows, where MYPROJECT was the name of my original project's parent folder:
c:\temp\MYPROJECT\branches
c:\temp\MYPROJECT\tags
c:\temp\MYPROJECT\trunk
4) Moved the file contents of my original project folder (MYPROJECT) to the new c:\temp\MYPROJECT\trunk folder (I only files I want checked-in, i.e. all of them in my case, and I didn't copy the MYPROJECT folder itself but the contents).
5) Right-clicked on the new MYPROJECT folder (within c:\temp) and selected 'Import...' from the TortoiseSVN sub-folder. I then typed 'Initial import' into the 'Import mesage' dialogue box.
6) Deleted the c:\temp folder, as it was no longer needed at this point.
7) Created a new MYPROJECT folder where the working copy was to reside, c:\flex\MYPROJECT.
8) Right-clicked on the c:\flex\MYPROJECT folder and selected 'Checkout...' from the TortoiseSVN sub-folder, setting the 'URL of repository' field to 'file:///C:/svn_repo/trunk' and the 'Checkout directory' field to 'C:\flex\MYPROJECT'.
That was it, done. I used version 1.6.1 of TortoiseSVN to achieve this.
Thanks to http://www.shokhirev.com/nikolai/programs/SVN/svn.html
Posted by Graham Blake on 5th May 2009 at 11:17