Saturday, February 27, 2010

Setting up Subversion

REFERENCES
http://www.codinghorror.com/blog/archives/001093.html
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91&expandFolder=91&folderID=8100

INSTALLATION

1.1 Download latest svn and tortoise files from link above
1.2 Install Setup-Subversion-1.6.6.msi
1.3 Install TortoiseSVN-1.6.5.16974-x64-svn-1.6.5.msi (choose either x86 or x64 version)


REPOSITORY SETUP

2.1 Create folder for the repository on the server e.g D:\SVN\Repository

2.2 Navigate to D:\SVN\Repository, right click and select
'Create Repository here'

2.3 Choose FSFS filesystem

2.4 Create skeleton project structure somewhere: (where trunk is for
the main code, tags and branches for advanced stuff if used in the
future)

svn://localhost
+---PROJECT1
|   +---branches
|   +---tags
|   \---trunk
\---PROJECT2
   +---branches
   +---tags
   \---trunk

2.5 Right click folder Root, select 'Import' and navigate to
file:///D:/SVN/Repository


CREATE SVN SERVICE

3.1 Setup svnserve as Windows service using the following command (note space before auto after start=):
sc create svnserve binpath= "C:\Program Files (x86)\Subversion\bin\svnserve.exe --service --root D:\SVN\Repository" DisplayName= "Subversion Repository" depend= Tcpip start= auto
(logon as Local System)

3.2 Start the service and set to auto start

3.3 Add users and passwords to D:\SVN\Repository\conf\passwd file
   e.g. [users]
        username1 = password

3.4 Set authorisation settings by editing D:\SVN\Repository\conf\authz
   e.g. anon-access = none
        auth-access = write
        password-db = passwd


FIREWALL
Create rules names Subversion for port 3690, inbound & outbound, private network to allow access from other machines on the network.


GET IT WORKING ON A CLIENT MACHINE

4.1 On your machine, create a working code folder for a project, say
D:\CODE\PROJECT1

4.2 Checkout the trunk for that project by right clicking, selecting
'SVN Checkout', then navigating to
svn:///machinename/PROJECT1/trunk

Thats about it.



No comments:

Post a Comment