Introduction Source Control is a must while developing big projects with big teams ideally you should use a source control if you are not working alone on the project. With Visual Studio there are a no of options available but today in this article i will discuss about Collabnet Subversion in combination with ANKH Subversion and Tortoise SVN. Although other options available are also good and have their own unique features but if you want a source control combination for free then this is the combination which is best suited to you. Among other options Source Gear Vault and Source Fortress which are also good source control tools. Other option available is VisualSVN which is a Visual Studio Plugin, which integrates within the Visual Studio the power of Subversion and Tortoise but its not free so the best combination available is Collabnet Subversion+Tortoise SVN + AnkhSubversion.
Packages to download and install
- Collabnet Subversion —-> http://www.collab.net/downloads/subversion/
- Tortoise SVN ——–> Tortoise SVN is the best Subversion GUI available.——–>http://tortoisesvn.net/downloads
- Ankh SVN Plugin for Visual Studio ——> Ankh is an open source Subversion Plugin for Visual Studio —>http://ankhsvn.open.collab.net/servlets/ProjectProcess?pageID=3794
Steps to download and install Collabnet Subversion + Tortoise SVN + Ankh Subversion
- First download and install Collabnet Subversion. Download url —> http://www.collab.net/downloads/subversion/
- It will ask for default repository just let it be on the default location ie c:svn_repository or if you change the repository then remember the path which you used for the new repository because we will require that repository in future while configuring new projects or else we can create a new repository to enter new projects.
- Collabnet Subversion will automatically ask you to install apache tomcat let it install the tomcat for you on its default port as 80 do not change the port initially as in some case if you initially give a different port it will not work after installations.
- But when you install it on default port 80 many of your IIS related applications or sharepoint sites may seize to work but don’t worry we will change it later.
- Now after installing Collabnet Subversion just go to the installation directory and just search for the httpd folder and there you will find httpd.config file where just modify the listening port to 85 or any other port just keep in mind many firewalls generally block port above port 3000 so just check with your firewall if you are using a port number above 3000.
- Now just install the tortoise SVN client from ———> http://tortoisesvn.net/downloads
- After installations also install ANKHSVN from ———> http://ankhsvn.open.collab.net/servlets/ProjectProcess?pageID=3794
- We are using 2 clients because this tortoise SVN do not integrate itself with Visual Studio its only directory based where as this AnkhSVN gets itself attached with visual studio very well you can update and commit changes directly from Visual Studio.So the million dollar question is why not use only ANKH svn so the million dollar answer is that ankh svn is not having its own client GUI its only integrated from visual studio and its easy to do checkouts for the first time from tortoise and it helps in repository manipulations directly from the front end ui or else we have to do everything with the command line for the Collabnet svn server to create repository on the server .
Configuring and creating repositories the easiest way
- Now after you have installed Collabnet Subversion you need to create repositories so i am describing the simplest way to create repositories.
- Create a folder in your disk where you want to save all your projects for subversion say you called it svn.
- Now inside svn start creating folders like ProjA and ProjB for different projects.
- After creating the repositories you have to configure the config files in order to provide right authorization and authentication.
- I will describe here the simplest form i.e using authentication you can also implement groups and other stuff that you can change in the auth file.
- So to create repository the simplest and the easiest way is to use Tortoise SVN client you can also create it using command prompt but i prefer the Tortoise SVN way.
- Right click inside the ProjA folder you just created and you will have a TortoiseSVN shell menu item saying Create Repository here click on this and the repository files , config files and database files are created.
- After creating the repository just go to the conf folder and open you will find svnserve.conf file.
- Open this file in notepad and remove everything from this file except what is given below
# anon-access = read
auth-access = write
password-db = passwd
# authz-db = authz
realm = subversion
- Now save this file and open another file in the same folder named passwd, open this file also with notepad, in this file write your usernames and passwords for the users who are authenticated for this repository.
abc = abc
user = password
- Save this file and you are done.
- On the client open the server using Repo Browser from Tortoise SVN you will get repo browser option by right clicking anywhere in the explorer and exploring the Tortoise Shell options.
- In the repobrowser type snv://yourservername/yourrepositoryname/ and you will be able to acess the repository.