Howto Create a Temporary Local Subversion Repository
UPDATE May 1st, 2007 (forgot the two final steps 8 and 9).
I’ve run into the situation a couple of times where I get started on a client’s office, but due to delays and politics it takes time to get a proper versioning control server set up.
It turned out to be easy when I figured out the where to find the details on it. I’m running windows XP, don’t know how this differs on other operating systems.
- Install TortoiseSVN, find the latest .exe in the binaries folder
- In windows explorer find the root folder for where you want your repository (this should be different than where your code workspace is).
- Create a new folder. In this example, I choose “<code>C:\svn-repo<code>”
- In windows explorer, right click and select “TortoiseSVN” > “Create repository here…”
- Select “native filesystem (FSFS)”
- Check in your code. Go to your workspace folder, right click it an select “TortoiseSVN” > “Import…”
- Now write the url of you file repository. In my case, “
file:///C:/svn-repo/projectname
”
Also remember to put in a commit message - UPDATE (forgot to write these very important steps below):
Now, delete your source files. You just comitted them to the repository. Don’t worry, they will be back in a moment. (If you are the cautious type like me, you probably just move the files to somewhere else…) - Now it’s time to check out the files from subversion. Right click and choose “Check out…” in the context menu. Then select your repository, in my case “
file:///C:/svn-repo/projectname
“. And you’re done!
From now on, your code is versioned, and can later be ported to the real subversion repository (any comments on how this is done would be greatly appreciated). Now, you can commit changes, view and diff changes, merge and roll back. Just like you would do in a normal code repository.
Advanced use
For user and access control it’s possible to modify the config files in the subversion /conf directory. The files in /svn-repo/conf/
has the info (although it’s not very self-explanatory).
The repository is only set up for file access, so you will need to share your repository in order for more developers to use it.
A better (and slightly more complicated) strategy is to use Apache as a frontend webserver and set it up to serve your subversion repository via that. If you want details on that I suggest reading:
- Svn.spears.at: Subversion for Windows with Apache server HOWTO
- Joe White: Mere-Moments Guide to installing a Subversion server on Windows
All in all, this can be a great benefit and speed things up in enterprise environments, where many chefs are involved in the most basic tasks. Please feel free to add your own advice and tips in the comments.
Technorati Tags: svn, subversion, tortoisesvn, windows, xp, local, repository
April 26th, 2007 at 23:44 (GMT-1)
I’d suggest setting up some hosting somewhere and having your repository in a remote location (you can do this over the discussed http protocol), then you don’t have to worry about a volatile repository on your local machine (laptop?) or merging into the main one later.
April 27th, 2007 at 00:04 (GMT-1)
Russel. Thanks for your suggestion. I actually already have access to a subversion server hosted at a remote location. The only thing is, that I often run into “enterprisey” rules about not putting business sensitive data on a foreign server outside corporate firewalls.
Maybe it’s just the clients that I work with…
April 27th, 2007 at 00:08 (GMT-1)
ahh, yes, in that case your not limited by technology but by other factors :(
November 18th, 2007 at 17:30 (GMT-1)
[…] give me the source code.” « AJAX and Web2.0 User Experience Bad For Traffic Counts Howto Create a Temporary Local Subversion Repository […]