Subversion Installation Guide Under Windows

Published July 26, 2009 by Siva

A) Download Subversion

You’ll need the latest version of..

The Subversion Windows binaries

http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91

The “run Subversion as a windows service” wrapper

http://www.robgonda.com/blog/files/robGonda/UserFiles/File/SVNService.zip

The TortoiseSVN shell integration utility

http://tortoisesvn.net/downloads


B) Install Subversion

Execute the setup file & complete the installation.

The Subversion bin path automatically set in windows environment variables.

Default location is : C:\Program Files\Subversion\bin

You’ll also need another environment variable, SVN_EDITOR, set to the text editor of your choice. I used c:\windows\notepad.exe

subversion1

C) Create a Repository

  1. Open a command prompt and type
svnadmin create "E:\SVN_Repo"
  1. Navigate to the folder we just created. Within that folder, uncomment the following lines in the /conf/svnserve.conf file:
[general]
anon-access = read
auth-access = write
password-db = passwd

Next, uncomment these lines in the /conf/passwd file:

[users]
Siva = letmein
admin = asd123

D) Verify that everything is working

  1. Start the subversion server by issuing this command in the command window:
            svnserve --daemon --root "E:\SVN_Repo"
  1. Create a project by opening a second command window and entering this command:
            svn mkdir svn://localhost/myproject

It’s a standard Subversion convention to have three folders at the root of a project:

/trunk
/branches
/tags

  1. At this point, Notepad should launch:

subversion2

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

  1. You’ll now be prompted for credentials. In my case I was prompted for the administrator credentials as well:
            Authentication realm:  0f1a8b11-d50b-344d-9dc7-0d9ba12e22df
            Password for 'Administrator': *********
            Authentication realm:  0f1a8b11-d50b-344d-9dc7-0d9ba12e22df
            Username: Siva
           Password for 'Siva': ************
Committed revision 1.

Congratulations! You just checked a change into Subversion!

E) Start the server as a service

  1. Stop the existing command window that’s running svnserve by pressing CTRL+C.
  2. Copy the file SVNService.exe from the zip file of the same name to the subversion\bin folder.
  3. Install the service by issuing the following commands:
   svnservice -install --daemon --root "E:\SVN_Repo"
   sc config svnservice start= auto
  net start svnservice
  1. Test the new service by listing all the files in the repository:
   svn ls svn://localhost/
You should see the single project we created earlier, myproject/ 

F) Set up the shell extension (SVN Client Configuration)

  1. Run the TortoiseSVN installer. It will tell you to restart, but you don’t need to.
  2. Create a project folder somewhere on your hard drive. Right click in that folder and select “SVN Checkout…”
    subversion3
    type svn://localhost/myproject/ for the repository URL and click OK.
    subversion4
  3. Create a new file in that directory. Right click the file and select “TortoiseSVN, Add”

subversion5

The file hasn’t actually been checked in yet. Subversion batches any changes and commits them as one atomic operation. To send all your changes to the server, right click and select “SVN Commit”

subversion6

And we’re done!

You now have a networked Subversion server and client set up on your machine.

Note that the default port for svnserve is 3690.

Advertisements

2 comments on “Subversion Installation Guide Under Windows

  • Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: