HOME
Andrew Schwabe's Blog: Subversion on Windows + Eclipse Howto: Part 2

Subversion on Windows + Eclipse Howto: Part 2

Ok, here in part 2 we are going to detail the installation process for Subversion on windows. If you follow these directions, it should go pretty smooth, and when you are done, you will have a working subversion server connected to your eclipse for remote development.

Step 1: Download the software you need:

Download Subversion binary installer

I used Setup-Subversion-1.5.1.en-us.msi at the time of writing this. I recommend you get the newest STABLE release.

Download Tortoise SVN installer

I used version 1.5.3 at the time of writing this. I recommend you get the newest STABLE release.

Optional: If you don't have eclipse yet, I highly recommend you get it here (if you don't know which version to get, get the java developers version), along with Aptana tools and either subclipse or subversive. Installation and config of eclipse won't be covered here, but there is plenty of documentation online that a google search will reveal.

Step 2: Install Subversion:

  • Install subversion using the installer you downloaded
  • The installer may ask you about what binding you want for Apache.

    If you are strictly using this guide, then this setting is not relevant, and you can pick whatever you want and continue.
  • Use the default directories for everything unless you know what you are doing!
  • When the install is complete, your system's PATH variable should automatically be updated to include the path to your new subversion
  • Manually add SVN_EDITOR environment variable and point it to notepad


    (You can get to this screen by right-clicking on "My Computer", select Properties, Advanced, Environment variables)

Step 3: Create a new Repository:

  1. Create a new directory on your server for the Subversion repository to live in. For this article, I will be using "d:\SVN"

    (you can specify your own dir here different than what I used, but don't be stupid -- remember to change the directory reference in all the rest of this article)
  2. Create the SVN repository using the directory you just created:

    In a command prompt, type "svnadmin create d:\SVN" to create the repository

    (this dir should now contain a bunch of files)

Step 4: Configure users for your repository:

  1. Edit d:\SVN\conf\svnserve.conf and uncomment the following lines:

    Optionally change anon-access = none to block all non authorized users (highly recommended)

    I've just been made aware that with the new subversion, you need to also uncomment the "realm = NAME" line in this file or else you won't be prompted for a username/password and people will have global write access to your repository! Please make sure you do this!

  2. Edit d:\SVN\conf\passwd and uncomment the following lines:


    or add your own users here, where username is on left, password is on right in clear text (not encrypted)

Step 5: Install subversion as a service:

(Note, if you didn't use d:\SVN as the repository directory, update below BEFORE running)

  1. Download svn_service_install.bat and save it to your hard drive
  2. Make sure you rename it to a .bat file (get rid of the .txt extension)
  3. Run it from a command prompt to install Subversion as a windows service:

Step 6: Test the Subversion installation:

  1. Create a project directory in your subversion repository by typing the following at a command prompt:

  2. At this point, Notepad should launch:


    Enter any comment you want at the top of the file, then save and exit.

  3. You'll now be prompted for credentials. In my case I was prompted for the administrator credentials as well:

  4. Next check that your project is there by getting a repository listing. At a command prompt type in "svn ls svn://localhost" and you should see the test project you created.

Step 7: Subversion is now running!

Double check a few things:

  1. Make sure your windows service is set to aumatically start. By default it may be created as "manual" start
  2. Make sure your firewall allows TCP port 3690 traffic through

Step 8: Connect eclipse to your subversion server:

  1. Add a new repository location
  2. As the URL, enter "svn://yourhost.com/"

It should prompt you for your username/password and give you an option to save your password.

If you followed all these directions, you should have a working Subversion installation! Please let me know if you see any typos or have additional hints/tips for me to add.

Special mention to Vertigo Software for some of the material in this article.

Stay tuned for the next part where we will detail how to use Subversion with server-side code and remote development over FTP.


Comments