TortoiseSVN 1.7 Beginner's Guide

4.3 (3 reviews total)
By Lesley Harrison
  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Setting up TortoiseSVN

About this book

TortoiseSVN is a Subversion client that gives you quick and easy access to all of Subversion's features. Perhaps you are aware of the importance of version control in software development or document management, but do you know how to use TortoiseSVN for efficient project management? Here is the first book about version control with TortoiseSVN.

TortoiseSVN 1.7 Beginner's Guide provides a comprehensive coverage of TortoiseSVN in its entirety. It is easy to follow the instructions with clear explanations and screenshots. This book will introduce the important features of TortoiseSVN and at the same time, give you a deeper and clearer understanding of the basic functionality, providing the answers to many questions that are encountered when using TortoiseSVN. TortoiseSVN is a client to SVN, but with this book and TortoiseSVN, you don't need to know anything about SVN, or wade through boring version control theory to get started using one of the most powerful version control applications in the world.

The book begins by introducing you to the basics of TortoiseSVN and tools needed to get started with version control. It then dives deep into details, covering the methods available to check and commit changes and keep track of data. Chapters cover conflict management, branching and merging of a project to avoid disturbing the main development version, using TortoiseSVN with popular bug-tracking systems, and much more.

By following the practical steps in this book, you will learn every aspect of using TortoiseSVN—from setting up the subversion server, to working with revision logs, and providing security and protection for your subversion server.

Publication date:
January 2011


Chapter 1. Setting up TortoiseSVN

TortoiseSVN is a free and open-source Subversion client for Microsoft Windows. It is not tied to any particular Integrated Development Environment (IDE); instead, it is a shell extension which integrates into the Windows Explorer, giving you easy access to Subversion repositories from within applications you're already familiar with. This means that it can be used with any software, and by all members of your development team.

In this chapter, you will learn how to set up TortoiseSVN, and how to set up a Subversion server to use it with. You will also learn a little bit about the TortoiseSVN user interface, so that you have an idea of the basic options provided by the software. Later chapters will explore each of those options in detail.

In this chapter, we shall:

  • Install TortoiseSVN

  • Create a repository

  • Install SVNserve – a simple, easy-to-set-up Subversion server

  • Install Apache + Subversion – a more flexible Subversion server

So let's get on with it...


Choosing your TortoiseSVN version

The first thing you need to do is choose the right version of TortoiseSVN for your computer. TortoiseSVN is available in two versions, one for 32-bit versions of Windows, and one for 64-bit versions of Windows. The 32-bit version can be used on both 32 and 64 bit versions of Windows, allowing you to use Subversion with older 32-bit applications on more modern operating systems, while the 64-bit version will work on 64-bit versions of Windows only.

You may already know which version you need, in which case, you can skip this section and go straight on to Installing TortoiseSVN. However if you aren't sure what flavor of Windows your computer is running, follow the below instructions to identify which version you need.


Checking your operating system edition

If you aren't sure whether you're running a 64-bit or 32-bit version of Windows, you can check quite easily. If you didn't install the operating system yourself, it's a good idea to double check. Remember that it's possible to run a 32-bit operating system on a 64-bit processor and it's not uncommon for department stores to sell pre-built computers with a 32-bit operating system, even if the processor powering the computer is a 64-bit one.


Time for action – checking Windows Vista / 7's architecture

To check the architecture of a Windows Vista or Windows 7 computer, follow these steps:

  1. Click the Start button.

  2. Click inside the Start Search box.

  3. Type msinfo32.exe and then press the Enter key.

  4. A System Information window should appear. Look in the right-hand pane for System Type. If you have a 32-bit version of Windows, the System Type will be x86-based PC. If you have a 64-bit version of Windows, the System Type will be x64-based PC.

What just happened?

You have now identified the architecture of your Windows Vista or Windows 7 computer's operating system. Armed with this knowledge, you will be able to make the correct decision as to which version of TortoiseSVN to download.


Time for action – checking Windows XP's architecture

To check the architecture of a Windows XP computer, follow these steps:

  1. Click the Start button.

  2. Click Run...

  3. In the box that appears, type winmsd.exe and then hit the Enter key.

  4. A System Information window should appear. Look in the right-hand pane for System Type. If you have a 32-bit version of Windows, the System Type will be x86-based PC. If you have a 64-bit version of Windows, the System Type will be x64-based PC.

What just happened?

You have now identified the architecture of your computer's XP based operating system. You can use this knowledge to choose the correct version (or versions) of TortoiseSVN for your computer.


Time for action – checking Windows Server 2003 architecture

To check the architecture of a Windows Server 2003 based computer, follow these steps:

  1. Click the Start button.

  2. Click Run.

  3. In the box that appears, type sysadm.cpl and then press the Enter key.

  4. On the General tab of the window that appears, you should see Microsoft(R) Windows (R) Server 2003, Enterprise Edition if you are running the 32-bit edition. If you are running the 64-bit edition, you will see Microsoft(R) Windows (R) Server 2003 Enterprise x64 Edition.

What just happened?

You have just identified the architecture of the version of Windows that is installed on your computer. It is important to know whether you are running a 32-bit or 64-bit operating system so that we can install the correct version of TortoiseSVN.

If you have a 32-bit version of Windows, you should install the 32-bit version of TortoiseSVN. If you have a 64-bit version of Windows, you can install both the 32-bit and 64-bit versions of TortoiseSVN side-by-side. Doing this will enable TortoiseSVN's features for both 32-bit and 64-bit applications.


Why is 32-bit called x86?

You may be wondering why 64-bit is called x64 , but 32-bit is called x86. The reason is part of the history of computing. x86 is a CPU instruction set which is used in most modern processors. There are three subsets of the x86 instruction set – x86-16 (16 bit), x86-32 (32-bit), and x86-64 (64-bit). The 32-bit version of the x86 instruction set was first used in the 80386 processor, and quickly became an industry standard.

The term x86 really refers to backwards compatibility with the original 8086 instruction set, but the popularity of the x86-32 subset means that most people use the term x86 to refer to a modern 32-bit processor.

Installing TortoiseSVN

Now that you know which version of TortoiseSVN you need, it's time to download and install it. The good news is TortoiseSVN is a small download, and has an easy-to-use installer.


Administrator privileges needed

You will need Administrator privileges to install TortoiseSVN. Most home computers run with the default user being the admin user, but if you are following this book at work, you may need to request assistance from your company's IT department.


Time for action – installing TortoiseSVN

  1. Go to, and click the Download link in the sidebar at the left-hand side of the screen.

  2. If you have a 32-bit version of Windows, download the 32 Bit version of the installer. Users of 64-bit windows can download both the 32 Bit and the 64 Bit versions, although in most cases only the 64-bit version will be required. The 32-bit version is needed only if you want TortoiseSVN to work with legacy applications.

  3. Once the download completes, right-click on the .msi file, select Properties, navigate to the Digital Signatures tab and confirm that the signature is present. It should look something like the following screenshot:

  4. Next, double-click on the install file to run it.

  5. Depending on the version of Windows you have, you may see a security warning similar to the one shown in the next screenshot. If the warning appears, click Run to dismiss it and continue with the installation.

  6. When the installer welcome screen appears, click Next.

  7. Read the license agreement. If you agree to the terms, select I accept the terms of the License Agreement and click Next.

    In most cases, the default options presented on the Custom Setup screen will be acceptable. If you do not want the additional icons, or one of the dictionaries, you can remove them by clicking on the down arrow next to the relevant option, and then clicking the red cross next to Entire feature will be unavailable. I recommend you leave Register diff/patch files checked, as this will ensure that TortoiseUDiff is set as the default for opening .diff and .patch files. Once you are happy with the list of features, click Next.

  8. Next, click Install.

    Depending on the speed of your computer, the installation may take a few minutes. When it completes, you should see a window similar to the one shown in the following screenshot:

  9. After clicking Finish, you will be prompted to reboot. Click Yes if you are ready to reboot, or click No if you need to save some work or close some applications before rebooting. Make sure you do reboot before using TortoiseSVN.

What just happened?

We have just installed TortoiseSVN. Remember that if you have a 64-bit version of Windows, you can use both the 32-bit and 64-bit versions side-by-side if required. So, if you have just installed the 32-bit version, don't forget to install the 64-bit version. The installation process is the same for both versions. In most cases, users of 64-bit versions of Windows will be fine with the 64-bit version of TortoiseSVN. However, if you find that some of your older applications lack the context menu functionality of TortoiseSVN, then it's likely that they are 32-bit applications, and therefore need the 32-bit version of TortoiseSVN to be installed.

The effects of the installation may not be obvious. The most obvious change is that you now have some new right-click options – try right-clicking on a text file on your hard drive to see the options that TortoiseSVN has added. We will be exploring a few of these options later on in this chapter. The new right-click options are shown in the following screenshot:

The right-click menu is context sensitive – right-clicking a folder, for example, will give different options to right-clicking a file. Right-clicking on a shortcut, or multiple files at once, will also give different options. We will explore these in greater depth later.

Language packs and spellchecking

TortoiseSVN has been translated into several different languages. You can see a list of the available language packs at:

The language packs are offered as executable installers. Simply download the ones you need, double-click the file to execute it, and follow the on-screen instructions.

TortoiseSVN also comes with a spellchecking feature, which allows you to check the spelling of commit log messages. The installer automatically sets up the British English and American English language files, however some people may need to spell check using different languages –for example, Australian English differs slightly from British English and American English.


Time for action – adding new spellchecking dictionaries

  1. Download the dictionary of your choice (for example, English (Australian)) from

  2. Extract the .zip file, and look at the file names – they should match the standard formatting of language_COUNTRY – for example en_AU.aff and en_AU.dic – if there are extra characters or words in the file name, remove them.

Copy the files to the /bin/ folder inside your TortoiseSVN installation. Restart TortoiseSVN – your dictionary should be available for use.

What just happened?

You have installed an extra dictionary for spell-checking purposes. When you install a new language, the spell-checking functionality for that language is installed alongside it. However, it is possible to install spell-check dictionaries separately. This is useful for people who live in a country, who speak a dialect not covered by the standard TortoiseSVN language files.

Now, when you go to submit a changelog, spell-checking will be enabled.

If you have more than one dictionary installed, you can select the one you want to use via the Project Language option in the Project Settings menu – we will explore those options in more detail later.


Creating a repository

Now that you have our client installed, you can make a repository. This is where the master copy of the code that we are working on (and any previous versions of the code) will be stored. You can then import code into the repository. Before we make any changes to the code, we will have to create a "working copy" of the code – this is useful because it helps if something goes wrong and a developer breaks the "working copy", there will still be a functional copy in the repository, which the developer can re-download.


Time for action – creating a repository

  1. Create a new folder on your C:\ drive. If you're using Windows XP, create the folder in C:\svn_repository. Users of Windows Vista or 7 should create the folder under their user folder.

  2. Navigate to that folder, right-click inside it, and then from the TortoiseSVN menu, select Create repository here.

  3. After a couple of seconds, you should see a message saying that the repository was successfully created, and several files and folders should appear inside the repository folder.

  4. Congratulations, you've made your first repository!

What just happened?

You've just set up a repository. This is a central location where the code for your software projects is stored. In Chapter 2, Getting Started With TortoiseSVN, you will learn how to check out code from this repository, so that you can work on it – uploading your changes once you are done. The copy that you have checked out is called the "Working Copy" because it is the copy you are directly working on – not because of the status of the code!

The repository will keep track of each version, so if you make a change today and then decide later on that the change was a bad idea, you can roll back to a version of the code that existed before you made the undesired change.

Before we explore those features, it's a good idea to organize the repository so that it's easy to work with in the future.

There are a couple of different ways of organizing a repository. If you're planning on having only one project in the repository, you can get away with creating three top-level directories to handle branches, tags, and the trunk.

If you will be hosting more than one project within your repository, then you should create a folder for each project, and then put the branches, tags, and trunk folders in there, shown as follows:


The above layout is just an example. Subversion itself does not care what layout you use. If you have a different idea for the folder layout, then you can use that. The most important thing is that the layout is consistently enforced, and understood by all the members of your team.

Create your chosen folder structure in a temporary folder on your hard drive, then right-click on the folder and select TortoiseSVN | Import to import the structure to your new repository.

Now let's set up a Subversion server so that other members of the team at Shiny Moose Software can take advantage of the features that Subversion offers.


Time for action – testing your repository

Now that you've made your repository, it's time to check that you can access it.

  1. Create a new folder that you will use to as your working area while you are developing your application. You can place the folder anywhere you wish. For ease of access, I placed it on my desktop.

  2. Right-click inside that folder, and select SVN checkout.

  3. Click on the ... button next to the URL of repository option, and browse to the path of your repository.

  4. Notice that the local path is formatted like this: file:///C:/svn_repository/MooseHiragana - the UNIX-style slashes, and the file:/// notation is important – Windows-style slashes won't work.

  5. Click OK.

  6. View the working folder again; you should see a Hiragana folder inside it. The folder icon should have a small green tick. The tick means that the copy's status is "Normal".


Setting up the SVNServe server

To make full use of your Subversion client, you need a Subversion server. It is possible to run the client and the server on the same machine, although for larger development teams, a stand-alone server will offer better performance.

The simplest way to set up a Subversion server is to use SVNServe. This method generally provides good performance too. I recommend that you use an SVNServe-based server unless you require some of the more advanced features offered by an Apache and Subversion-based server.


Time for action – setting up SVNServe

  1. Download the CollabNet Subversion Server and client for Windows from - you will need to create an account to do this, but don't worry, registration on CollabNet is free, and they won't share your e-mail address with anyone.

  2. Run the installer, and follow the on-screen instructions. As we want SVNServe only, deselect the Apache(MOD_DAV_SVN) option and click Next.

  3. Ensure that the Install svnserve to run as a Windows service option is checked. For most people, the default Port is OK. Choose a Repository Path which matches the path you created for your repositories in the previous "Time For Action". In the case of Shiny Moose Software, the default path is correct.

  4. In most cases, the options on the Automatic Updates screen can be left at the defaults. If you use a proxy to connect to the internet (which is unlikely, unless you are installing the server in an office environment), then tick the relevant box, and fill out the proxy details when prompted.

  5. Finally, click Finish.

What just happened?

We have just set up a simple SVNServe-based Subversion server. At the moment, we can't do much with the server. It allows anonymous read access, but no write access. That means it's great for letting people download our code, but not so useful for letting people submit any changes they decide to make.

We could allow anonymous write access – but that wouldn't really be a good idea – after all, what's to stop a competitor, or simply a mean-spirited person, from changing our code? Also, how will you know which member of your team submitted which changes? Giving each user of your repository a username makes it a lot easier to track who is doing what, and also to restrict what each person can do. Instead of allowing anonymous write access, let's set up some simple authentication, so that we can control who can and cannot edit our code.

Simple authentication for SVNserve

SVNserve has a simple authentication feature which allows you to specify who can and cannot modify code in the repository. Let's set up that feature now.


Time for action – setting up simple authentication for SVNserve

  1. Navigate to the /conf/ folder in your repository, and open svnserve.conf.

  2. Paste the following lines underneath the line that says [general].

    anon-access = none
    auth-access = write
    password-db = users
  3. Save the file, and create a new file called users (with no extension) in the same folder.

  4. Drag the users file over a Notepad window to edit it, and enter the following text (where AUSERNAME is any username and APASSWORD is the password you want that user to have:


What just happened?

You have set up your Subversion server so that unauthenticated users cannot access the server, and authenticated users can read from and write to the server.

The code we added to the config file in step 2 tells SVNserve that anonymous access is not permitted, and that authorized users (those listed in the users file) should have write access to the repository.

Have a go hero – adding more users and repositories

Now that you know how to make a repository, and how to set up some security, why not try making a new repository, and using different login details for it. Imagine that Shiny Moose Software decides to produce a second game called GermanMoose – they want to give the same people who are working on the Hiragana game access to the GermanMoose repository, but they also want to give a new employee, called Dieter, access to that repository so that he can work on translations.

Create a new repository, and make a copy of the users file, with a username and password for Dieter added to it. Check that you can access the folder with the right permissions.


Setting up an Apache + Subversion server

An Apache and Subversion-based server is a more flexible (and more complicated) Subversion solution. It is up to you whether you choose to use this setup. If you are happy with the functionality and performance of a SVNserve-based setup, then it would be wise to use that instead.

An Apache and Subversion-based setup is useful if you want to allow users to browse your repository via a web browser, or if you want to use SSL encryption for extra security. Another benefit of Apache and Subversion is that your server can use any authentication method that Apache supports.

If you do not need any of those features, then you may prefer SVNserve as it is easier to deploy and manage, and also performs slightly faster in most cases. By far the easiest way to set up an Apache server on Windows is to use VisualSVN, a combined installer for Apache, VisualSVN, and an administrative panel.


Time for action – installing VisualSVN

  1. Download VisualSVN from

  2. Run the installer, and click Next when prompted.

  3. Set the path for your repository. Windows XP users can accept the defaults. Windows Vista and Windows 7 users may need to change the repository folder path to one inside their user directory.

  4. Once the installation is done, you should see a window which looks like the following screenshot:

  5. You can create a new repository by going to Action | Create New Repository, and entering the name of the repository there.

What just happened?

You have just installed VisualSVN. This offers an easy-to-use management console, and gives you a working Subversion server right out of the box. The default setup is ready-to-go, but there are some extra features you will want to look at if you're using the server in a production environment.

You will find a full guide to the more advanced features of VisualSVN, such as SSL, at

VisualSVN is the quickest and easiest way to get a working Subversion server. This method is the best choice for most people.

For the sake of completeness, the following instructions explain how to set up Apache and Subversion separately. If you are using VisualSVN, you can skip the rest of the sections in this chapter.


Time for action – installing Apache

  1. Download Apache from: I recommend you choose the newest stable binary installer that includes OpenSSL. You will find the Windows installers under Other Files | Binaries | Win32.

  2. Run the installer, and follow the on-screen instructions.

  3. For the Server Information, enter a descriptive Network Domain and Server Name. If you will be using Subversion on your local network, I recommend you use a domain name ending in .local. If you want your server to be accessible over the internet, you will need to use a valid domain.

  4. Leave the radio button that says for All Users, on Port 80, as a Service -- Recommended selected, as shown in the following screenshot:

  5. On the next screen, choose Typical install, then click Next.

  6. Select a path to install Apache to (for most people, the default will be fine), then click Next.

  7. Depending on the speed of your computer, the installation process may take several minutes.

  8. To confirm that Apache is installed correctly, open your web browser and go to http://localhost, you should see a screen containing a message saying It works!, as follows:

What just happened?

You have successfully installed the Apache web server for Windows. The It works! page you viewed in your web browser may not look impressive, but is a simple HTML web page!

The Apache server will be used by Subversion to allow users to access your repositories over the network (or the internet, if you choose to set your firewall up to allow that) using a web browser.


Time for action – installing Subversion

  1. Download Subversion from – make sure you select the correct version of Subversion for your Apache installation.

  2. Install Subversion, and follow the on-screen instructions.

  3. If Subversion detected Apache, skip to step nine. If it did not, follow steps 4-8.

  4. Go to c:\Program Files\Subversion, and open the \httpd folder. Copy and to c:\Program Files\Apache Group\apache2\modules

  5. Go to c:\Program Files\Subversion\bin and copy libdb44.dll and int13_svn.dll from that folder to Apache's \bin directory.

  6. Open Apache's httpd.conf file in Notepad, or your favorite programmer's text editor. You can find the file at c:\Program Files\Apache Group\Apache2\conf\

  7. Uncomment the following two lines by removing the # sign at the beginning of them:

    #LoadModule dav_fs_module modules/
    #LoadModule dav_module modules/

    By uncommenting the preceding lines, we are telling Apache to load the mod_dav modules.

  8. Add the following two lines to the end of the LoadModule section in http.conf:

    LoadModule dav_svn_module modules/
    LoadModule authz_svn_module modules/
  9. Open httpd.conf, and at the end of the file, add the following:

    <Location /svn>
    DAV svn
    SVNListParentPath on
    SVNParentPath c:\svn_repository
    AuthType Basic
    AuthName "Subversion repositories"
    AuthUserFile passwd
    Require valid-user

    The preceding code tells apache to use Basic Auth security on the /svn folder, and tells it where to find the file containing the usernames and passwords. Basic Auth is a simple form of security where a user is prompted by their browser for a username and password when they navigate to a protected folder. Basic Auth is not encrypted, so is not suitable for protecting areas which contain sensitive data.

  10. Finally, open a command prompt (Start | Run | CMD), navigate to the c:\Program Files\Apache Group\Apache2.2 folder, and enter:

    bin\htpasswd –c passwd USERNAME

    Where USERNAME is the user ID you plan to use to access the Subversion server.

  11. When prompted, enter a password for that user.

  12. Now you should be able to access your Subversion server by navigating to http://localhost/svn in your web browser – enter the username and password when prompted:

What just happened?

You have just created a basic example of an Apache + Subversion server. From here you can add extra security with SASL Authentication and Encryption.

An Apache + Subversion server setup is useful for developers who want more robust authentication, and the ability to allow access to their repository via the web.

The basic authentication should be sufficient for an internal server. You can have as many users as you want. Each employee at Shiny Moose Software has their own login details, which makes it easy for the lead developer to see who is working on which part of the program, and what changes they have made.


Adding more users

You can add more users to the server by using the command: bin\htpasswd passwd USERNAME. This will allow you to give each member of your team their own user ID and password, so that you can keep track of who has changed which file, and what changes they made.

Pop quiz – subversion concepts

  1. The 32-bit version of TortoiseSNV

    a. Comes on 32 floppy discs.

    b. Is used on 32-bit Windows and on 64-bit Windows by 32-bit applications.

    c. Is able to handle only 32 repositories at once.

  2. A "working copy"

    a. Is a copy of the source code that still works.

    b. Is an illegal copy of your source code that is being downloaded by software pirates.

    c. Is the copy that you have checked out of the repository.

  3. Apache and Subversion

    a. Is used by people who prefer Apaches to Tortoises.

    b. Is more flexible and offers more security options, but is harder to set up than SVNserve.

    c. Is easy to set up, but offers fewer options than SVNserve.



This chapter focused on setting up TortoiseSVN and a Subversion server for it to be used with.

Specifically, we covered:

  • Identifying which TortoiseSVN version you need – the 32-bit version is designed for 32-bit Windows installs, and also works with 32-bit applications on 64-bit Windows installs. The 64-bit version can only be used on 64-bit Windows installs, and with 64-bit applications.

  • Installing TortoiseSVN.

  • Installing SVNserve – an easy-to-install and effective Subversion server, this runs as a Windows Service.

  • Installing Apache and Subversion – a more sophisticated way to run a Subversion server.

We also touched on securing your server – we will explore that in more detail in Chapter 9, Using SSH With TortoiseSVN.

So far, you have installed TortoiseSVN and used it to create a repository. You have also set up a server, so that each member of your team can access the repository. You may be wondering when you will get to see TortoiseSVN in action – well, the good news is that you don't have to wait any longer – Chapter 2, Getting Started With TortoiseSVN will give you your first taste of using TortoiseSVN – you will learn how to use the repository browser, check out a Working Copy, and commit any changes you made to the copy.

About the Author

  • Lesley Harrison

    Lesley Harrison is an avid gamer who has enjoyed playing a range of online games at a competitive level, from the first MUDs to today's spectacular AAA experiences with 3D graphics. Today, Lesley runs her own video gaming company, Myth Games, and works as a freelance web developer. Lesley has written several books for Packt Publishing, including the WordPress_MU Beginner's Guide and the TortoiseSVN Beginner's Guide. In her spare time Lesley volunteers within several Open Source projects. Away from the computer she recently found a love for Seiken Ryu Karate, and has reached the rank of 2nd Kyu.

    Browse publications by this author

Latest Reviews

(3 reviews total)
Very good...everything went well....very satisfied.
I did receive the book in a timely manner. My only concern was that I was NOT able to track the shipping (from vendor to me). When I emailed to inquire about the expected delivery date, the package had arrived the following day. I also received the email response in a timely manner.
Quickly got me back into Subversion after a long absence.
Book Title
Access this book, plus 7,500 other titles for FREE
Access now