Extending Subversion by using TortoiseSVN
Though Subversion is a powerful version control system, it’s command-line based interface may not appeal to some users who used other version control systems like Visual Source Safe. And what if you want to remotely access your repository as well?
TortoiseSVN and Apache comes to your aid. TortoiseSVN is a powerful tool for Subversion, which helps you to issue most of the subversion commands from your windows explorer. Subversion has an inbuilt “svnserve” utility which helps you to expose your repository to remote users, but it’s highly recommended to use the flexible Apache Web Server for this purpose. Subversion comes with it’s own apache modules to expose your repository to remote users. However, in this article we will not focus on Apache. I’m planning to write about the apache integration in my next post. Please be patient
Objective:
In this article you will learn how to install Subversion and TortoiseSVN and use them to create a repository, import files into the repository and view the repository.
Step 1: Install Subversion
Download subversion windows installer for Apache 2.2.x. (Download the file called “svn-x.y.z-setup.exe” and run the installer. Installing should be a straight forward option.
You might see the following windows. They are self explanatory.






Now you should have subversion successfully installed in your machine. To verify that, open the command prompt and type “svn –version”. If you see something like below, pat your head, you have successfully installed subversion.

If you couldn’t see the above mentioned message, you might want to check your “Path” environment variable and add your subversion installation directory to the “Path”.
Step 2: Install TortoisSVN
Download TortoiseSVN from here.



That’s it. Now the installer setup might prompt you to restart your system to complete the installation process. Accept it.
Step 3: Create a Subversion Repository
Now, it’s time to create a subversion repository. Though it’s possible to use the subversion’s “svnadmin” command to create the repository, we will use TortoiseSVN to achieve that.
3a) First, choose a appropriate location to keep all your repositories. In my case it’s “F:\Subversion”. Let us call this folder as REPOSITORY_ROOT. Now, let us create an empty directory called “MyRepository” inside REPOSITORY_ROOT. It should look something like this:

3b) Now, right click inside the folder REPOSITORY_ROOT\MyRepository, and click “TortoiseSVN -> Create repository here” menu.

3c) TortoisSVN will now prompt you with a message box like this:

Leave the default option (Native file system), and click “OK”. You can see a bunch of files inside the “MyRepository” folder like this:

Great!! This is your subversion repository.
Step 4: Import files into your subversion repository
4a) Let us add some files inside our newly created subversion repository. Right click a folder of your choice and click “TortoiseSVN -> Import”

4b) Enter the appropriate repository path where you would like to import these files into. In my case it’s “file:///f:/subversion/myrepository/photos”.

4C) When you press “OK”, TortoiseSVN will import all the files/folders inside the folder which you selected for the import operation into the subversion repository.

4D) Press “OK”. Now we have finished importing the files into our new subversion repostiory. It’s now time to view the content of our repository.
Step 5: Viewing the content of your subversion repository
5a) TortoiseSVN provides a nice “Repository Browser” option to view the content of your subversion repository. Right anywhere in your explorer window/desktop and click “TortoiseSVN -> Repo-browser”.

5B) Enter the url of your subversion repository. In my case, it’s “file:///f:/subversion/myrepository” and click “OK”.

5C) That’s it, now TortoiseSVN will list down all the files inside your repository.

Summary:
In this article, you learned to:
- install Subversion
- install TortoiseSVN
- create a new repository using TortoiseSVN
- import files into the subversion repository using TortoiseSVN
- view the content of the subversion repository using TortoiseSVN
What next?
I initially thought of even writing about installing, configuring apache/websvn in this article itself. But it already took me nearly 3 hours to finish writing this. So please bear with me. I’ll come with a Part II of this article where you will learn how to use apache/websvn along with subversion to make the interaction with your version control system a pleasure. See you again.
Added on August 2, 2008:
I have written an article named “Extending Subversion with Apache“. This article is about setting up Apache http server and configuring it to access subversion repositories. It also deals how to setup Authentication and Access control for your subversion repositories using Apache. Hope you find it useful.
SolitaryGeek Poll
What is your favourite Subversion client?
- TortoiseSVN (47%, 103 Votes)
- The one that comes with my IDE (NetBeans, Eclipse, etc) (30%, 65 Votes)
- Subversion Command Line Client (13%, 29 Votes)
- Other (Please mention your choice in the comments) (5%, 11 Votes)
- RapidSVN (5%, 10 Votes)
Total Voters: 218
Related posts:
I’ve been using TortoiseSVN for over 3 years and love it. Very recently I jumped boat to Mercurial(hg). Just like TortoiseSVN there is TortoiseHg, has a lof of catch up to do.
Mercurial is a Distributed Version Control System, so you can do commits even offline(sweet). In addition HG is lightening fast and comes with builtin Web support so you can publish and share your repositories on the web. Hg has integrations with NetBeans and Eclipse if you ar eon the Java bandwagon.
Just my 2 cents
Hi Ramesh,
Ya I’ve been hearing a lot about Mercurial these days. And recently, NetBeans switched their source code repostiory completely to Mercurial. I’m looking forward to evaluate mercurial as well. It would be great if you can point out some good article/tutorial to help me started with mercurial.
Thank you Ramesh for this great article.
Thanks Affar for your comments.
By the by, I’m James
Sorry James.
I don’t know how I missed your name.
Sorry again…
Hi Selvakumar,
Such a nice compilation of the setup of Subversion and TortoiseSVN.
I appreciate your great job. Your effort of about 3 hours helped me a lot to do things in 15 minutes.
Thanks.
Hi Selvakumar,
Thanks for such precisely complied set by set doc….
Great Job
Kanwar
Ever since the upgrade to TSVN 1.5 there are some small differences.
Here is a link to a few 5 minute videos that show how to use the new SVN (no prior experience required).
Hopefully they help you as well.
http://pollvu.blip.tv/
hamy
very clear and useful article. Thanks for your time and effort. Krishna
Interesting subject. I m really glad to read your blog. I m impressed with your good work. I have gone through many blogs but I found yours the most interesting
Saw your blog bookmarked on Delicious.