Version Control tools manage the changes made to programs or documents and are mostly used in Software/application development. I have already talked about a very few differences between two of the most popular version control tools – CVS Vs SVN.
I will be using Subversion(SVN) for future developments and hence I will dedicate this post to downloading, installing and running of Subversion server.
1) Subversion can be downloaded from this location at subversion.tigris.org
2) Click on the Windows Binaries under the tab ‘Get Subversion’
3) Click on the Collabnet (Certified Binaries) which will take you to this link.
4) You will need to register to download the CollabNet Subversion Server and Client v1.6.2 (for Windows)
5) It is around 12MB. After downloading, double to start the installing process.
6) DO NOT change any settings. Just go Next and Next, unless you know what you are doing (which if true, you wouldn’t be here reading this 😛 ). That’s it the installation process is done!
To run subversion, go to your Subversion installed directory in your program files and then double click on svnserve.exe
Configuring Subversion for Windows:
We already gave it a repository location while installing. But usually it does not create the configuration files yet. So, we need to create the repository again.
Because I’m creating a repository in my C: drive with name ‘svn_repository’ I will have to type
svnadmin create “c:svn_repository”
without quotes in the command prompt and press enter. This creates 4 folders and two files in that location.
Go to /conf/svnserve.conf file
Open svnserve.conf file using a notepad or any other editor and then uncomment/modify these lines to look like this.
anon-access = read
auth-access = write
password-db = passwd
Now open the /conf/passwd file and uncomment and modify these two parameters to look like this:
harry = harryssecret
sally = sallyssecret
You can add your own users and passwords and even edit these. It’s up to you 😉 try something funny 😛
Now, we have a repository, we have set the configurations, we have set some authenticated users. Are you ready to go to next step?
Now open two command prompt windows. We need one to be open for our server and the other, we will use as our command follower 😉
In the first one start our server by typing:
svnserve –daemon –root “c:svn_repository”
Yep – the server is started.
In the second window, create a project by typing this…
svn mkdir svn://localhost/myproject
You will get three folders at the root folder of your project. Now, either a notepad or a wordpad should have launched, if it does not , you need to set up an environment variable.
Setup an environment variable name SVN_EDITOR to C:windowsnotepad.exe as shown in the picture below…
Close that command prompt window and open it and run the create project command again. This time, a notepad will launch.
Type anything you want at the notepad and then save and close it. As soon as you close it, the command prompt will want you to enter the computer user/pw first and then it will ask for an authenticated user/pw in the passwords file we gave it a few minutes back.
Password for ‘sally’: ************
Committed revision 1.
As soon as you press enter, it will say you have committed a revision! Congrats! Everything seems to be working as it should! Kewl you jsut checked a change into subversion!