Friday, February 11, 2011

svn version control tips and pitfalls

Here is a step by step procedure to do the following
1) svn repository to be created on a machine labpc (with your login name mylogin) with ipaddress lab_ipaddress at location /svnrepos

The data to be imported is in /media/data

There are two users on this machine lab_user home_user .These users modify or update the repository from two different locations labpc and homepc

All computers run Ubuntu OS

2) Prefer web access

I will update the post later on web access. For now I will post instructions on setting it up.

On labPC
1) run $ svnadmin create /svnrepos
svn import /media/data /svnrepos
2) Change /svnrepos/conf/svnserve.conf to look like this

[general]
anon-access = none
auth-access = write
password-db = passwd

3) Modify the pasword file /svnrepos/conf/passwd
to

User1 = passw1
User2 = pass2

4) on homepc
change /etc/hosts and add the following line

lab_ipaddress mysvn.server.purdue.edu

the mysvn.server.purdue.edu could be changed to anything

5) on homepc, Add the following lines to .ssh/config

Host mysvn.server.purdue.edu
User mylogin
Port some_number

6) Finally try $svn list svn+ssh://mylogin@mysvn.server.purdue.edu/svnrepos

Common pitfalls

1) the svnserve.conf should have no leading spaces
2) the port number specified in step 5 should not be a port that is commonly used...

More to come later

No comments:

Post a Comment