Friday, March 20, 2009

Subversion On Windows XP/2K3

What happened?
So I downloaded SVN from the official site. You can select binary packages for either "Apache 2.0" or "Apache 2.2". (In case you're wondering, download the binaries with the filename similar to "svn-win32-1.5.4.zip")
Personally I dont really care as I dont integrate it with Apache, but its best to pick the version which matches in case you change your mind later down the track.
Extract the contents of the file to where you want SVN to be installed.
Accept the default location.


Creating a service

Before typing up the commands, be sure to note that the syntax requires a space AFTER the "=" sign.

sc create subversion binpath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service --root C:\ServerFiles\svn_repository" displayname= "Subversion" depend= tcpip start= auto

A breakdown of the command arguments is shown below.
  • "sc create subversion"
    Creates a service named "subversion".
  • "binpath= "
    The executable file.
  • "--service"
    Run it within the Windows native service wrapper.
  • "--root= "
    The root folder for repositories.
  • "displayname= "
    A nice name for the service in the Service Manager.
  • "depend= "
    Dependencies for this service.
  • "start= "
    The starting method.

Creating a Repository :-
Friends its time to move on. How to create repository.
1. First download TortoiseSVN (Do not forget to restart your PC)
2. Identufy location for all you repository.
(lets say d:\all_repos)
3. Go to directory d:\all_repos
create a new directory with the name of your project. (lets say MyProject)
4. Go to directory d:\all_repos\MyProject
Right click -> TortoiseSVN -> Create repository here (it will ask you couple of question)
and repository is ready.
[ the same you can do it using command line:-
svnadmin create d:\all_repos\MyProject
if you want to specify the database to be use , you need to provide options]

Now you can start using your repo.




No comments:

Post a Comment

Followers

About Me

Pune, Maharashtra, India