Wednesday, October 20, 2010

Creating a Local Subversion Repository

A little known feature of TortoiseSVN,The coolest Interface to (Sub)Version Control, is the ability to create local Subversion repositories anywhere you can create a folder. I use this feature all the time both at work and at home when working with any source code to take advantage of all of subversion's powerful features. It is also a great way to replicate Microsoft's Briefcase feature with all the cross-platform abilities of subversion and features.

To Create a Repository
  1. First ensure you have installed TortoiseSVN (Free/Open Source Software).
    • This can be found here. Ensure that if you are running 64-bit Windows that you download and install the 64-bit package, otherwise you will not see any context menus.
  2. Navigate to the folder in which you want to store your local repository.
    • I usually put all my repositories in a folder called Subversion just to keep them neat and to serve as a reminder that you should never modify these folders unless you are using a Subversion client.
  3. Create a new folder and give it a name.
    • I have called mine CLRHook. Its a good idea to give a descriptive name to this folder that way you can quickly look at the folder name to determine its contents as opposed to having to use Repo-browser. Remember that because you're creating an actual repository you must use subversion tools to interact with the files contained within this folder.
  4. Right click on this new folder, Navigate to TortoiseSVN and select Create repository here.
    Create repository here
  5. You should now have a repository that you can commit to, just like you would any other repository. Except instead of using the svn:// protocol to access the repository you will use the file:/// protocol.
    • In this example the repository was created at file:///G:/Subversion/CLRHook.
    • One more thing to note is that TortoiseSVN will use the the username of the currently logged on user when committing to the repository.
In this blog post I have shown you how you can quickly make a subversion repository, go forth and keep on VCS'ing.

    No comments:

    Post a Comment