Friday, September 18, 2009

svn configration for windows

Installing Subversion

- Double-click on the installer and run through it. Shouldn't take too long. Once installed, add an environment variable for SVN_EDITOR. You can do this by right-click on my Computer > Properties. Go to advanced. Hit the Environmental Variables button. Just add another in there called SVN_EDITOR with a value of C:\windows\notepad.exe


Creating a Repository

- Now you need to create a repository. Go to the command prompt (Start > run > cmd). type "svnadmin create D:\Programming\MySVNRepos". (Change the path to whatever path you want to use.) The repos is basically a special directory that will hold your files as well as various subversion config options.

Modifying Security and Authentication Settings

- Next up, you need to modify the permissions and u

sers. Navigate to the folder you just created. In my example, I used D:\Programming\MySVNRepos". In this directory, you will find a few folders. One folder will be called conf. Navigate to it and double-click on the svnserv.conf file. Opening it with notepad will be fine.


- The svnserv.conf file in a configuration file for the svnserv executible. For our purposes, just uncomment out the following lines:


[general]

anon-access = read

auth-access = write

password-db = passwd


- Save your changes. And double-click on the passwd file in the same directory. The file stores all usernames and passwords in the format:


$username = $password


- Make sure the [Users] line is uncommented and you can just add a new line for your username and password. For example, if you wanted your username to be josh and your password to be testing, just create a line like this:


josh = testing


- Save it and you're done configuring.

Serving Your Repos for the First Time

Now, you can test it out. Go to the command prompt again and type:

svnserve --daemon --root "D:\Programming\MySVNRepos"

Change the path to your specified path. Once this is done, the daemon should be listening and waiting for requests.


Creating your First Project folder

Click on startà runà and type following url

svn://localhost it will opne the following window.

Then right click on svn://localhost add a new folder as shown below .

Subversion will ask for your username and password.

However, keep in mind, it may also ask for your computer's Admin password. If it does, you can simply type in your computer's admin password. Once you hit return, you can then go ahead and type in your subversion username and then your subversion password. Your subversion username and password is exactly what you typed in the passwd file. (i.e. user: josh pass:testing)

Then create a project folder (I created test folder) on C, D or any drive. Right click on that project folder and do the svn checkout as per following.

Give the svn repository path as per the following..

After finishing the checkout click on ok.

Then copy the folder actual project folder into new project folder in my case it is test folder and I copied modernfamily actual project folder under test test folder.

After finishing the coping right click on modernfamily (your might be dfferent project folder) folder and add the files as show below.

After clicking on add tag it will appear the following window just click on ok tab as shown below.

Wait till adding thefiles and click on OK tab as per below…

After finishing the file adding then come to the root folder that is test folder right click on it and do the coming as shown below…


It will appear following window jist click on OK tab.


After finishing the commit again click on Ok tab that window is not shown here.


Running svnserv as a Windows Service

If you're running XP (Win2k, Win2k3, or Vista), you can tell the process to run as a service. Stop your existing svnserv daemon by closing out of the existing command prompt window. Now, go to the command prompt (again). Type:

sc create svnrepos binpath= "\"C:\program files\subversion\bin\svnserve.exe\" --service --root \"D:\Programming\MySVNRepos" displayname= "Subversion Repository" depend= Tcpip start= auto

(Note: add your repo path in command)


After adding service go to the services an check Subversion repository service is added. If it is added then start the service.


SVN Checkout on client system.

Make new folder and give your project folder name. Right click on same folder and click on svn checkout and give your repository path.


svnadmin hotcopy path/to/repository path/to/backup --clean-logs


Svnadmin dump reponame > reponame.dump For backup


Svnadmin load newrepo < style=""> For restore dump file


http://www.linuxfromscratch.org/blfs/edguide/chapter03.html


http://svnbook.red-bean.com/en/1.1/ch09.html


http://www.yolinux.com/TUTORIALS/Subversion.html


http://subversion.tigris.org/


0 comments:

Post a Comment