Printer FriendlyEmail Article Link

Configuring SVN server on ubuntu and checking out projects into iTest from SVN server.

1. Open the terminal and Type "apt-get install subversion"
2. Create a directory that will hold our repository/repositories.
    mkdir -p /var/lib/svn
3. Create a repository for any project called "myproject" inside the /var/lib/svn directory,as follows.
     svnadmin create /var/lib/svn/myproject
Now we configured the repository successfully.
 Using file protocol:
1. Importing files into the repository.
    svn import /home/folder/my_project file://localhost/var/lib/svn/myproject
2. Checkouts can be done as follows:
    svn co file://localhost/var/lib/svn/myproject /home/folder/somedir
   Using The http:// Protocol
1. For the http:// protocol, we need to configure WebDAV on an Apache2 server. Therefore we install Apache2 and the Apache2 SVN     module now:
    apt-get install apache2 libapache2-svn
2. Configure the Apache2 SVN module by editing the file /etc/apache2/mods-available/dav_svn.conf:
    vi /etc/apache2/mods-available/dav_svn.conf
   Please add the following pice of code at end of the file.
  <Location /svn>
   DAV svn
   SVNParentPath /var/lib/svn
   AuthType Basic
   AuthName "Subversion Repository"
   AuthUserFile /etc/apache2/dav_svn.passwd
     Require valid-user
3. Restart Apache
   /etc/init.d/apache2 restart
4. Because we will read and write to our repositories as the Apache user (www-data) and group (www-data) from now on, we must change the owner and group of /var/lib/svn and its subdiretories to the            Apache user and group now: 
    chown -R www-data:www-data /var/lib/svn
5. Create the password file /etc/apache2/dav_svn.passwd that contains all users that will have access to SVN
    htpasswd -c /etc/apache2/dav_svn.passwd username
6. Checkout as follows using the http:// protocol.
     svn co --username username http://localhost/svn/myproject /home/folder/somedir
7.You can checkout projects from repository using "Check out Projcts from SVN" option in iTest.Then specify the URL of the SVN repository to checkout the projects.

Product : iTest Enterprise