go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  SVN default structure
 
Subject: SVN default structure
Author: Linux
In response to: Configure Apache with Subversion
Posted on: 11/04/2017 05:45:35 AM

Conventionally, every Subversion project has trunk, tags, and branches directories directly under the repository's root directory.

 | /svn/xyz
 | -- [+] trunk
 | ------- [+] projects
 | ----------- [+] project#1
 | ----------- [+] project#2
 | -- [+] branches
 | ------- [+] 1.0
 | ----------- [+] projects
 | --------------- [+] project#1
 | --------------- [+] project#2
 | ------- [+] 1.1
 | ----------- [+] projects
 | --------------- [+] project#1
 | --------------- [+] project#2
 | ------- [+] 2.0
 | ----------- [+] projects
 | --------------- [+] project#1
 | --------------- [+] project#2
 | -- [+] tags
 | ------- [+] 1.0.0
 | ----------- [+] projects
 | --------------- [+] project#1
 | --------------- [+] project#2
 | ------- [+] 1.0.1
 | ----------- [+] projects
 | --------------- [+] project#1
 | --------------- [+] project#2
 | ------- [+] 1.1.0
 | ----------- [+] projects
 | --------------- [+] project#1
 | --------------- [+] project#2
 | ------- [+] 1.1.1
 | ----------- [+] projects
 | --------------- [+] project#1
 | --------------- [+] project#2
 | ------- [+] 2.0.0
 | ----------- [+] projects
 | --------------- [+] project#1
 | --------------- [+] project#2


  • The trunk is a directory where all the main development happens and is usually checked out by the developers to work on the project.
  • The branches directory is used when you want to pursue different routes of development.
  • The tags directory is used to store snapshots of the project for production release.


    Populate the reposiory with the above empty structure:
    $ sudo mkdir /tmp/svn-template
    $ sudo mkdir /tmp/svn-template/trunk
    $ sudo mkdir /tmp/svn-template/branches
    $ sudo mkdir /tmp/svn-template/tags
    $ sudo svn import -m 'Create trunk, branches, tags directory structure' /tmp/svn-template/ http://localhost/svn/xyz --username=admin
    


    Then the 'projects' container:
    $ sudo mkdir /tmp/svn-template/trunk/projects
    $ sudo svn import -m 'Create projects directory under trunk' /tmp/svn-template/trunk http://localhost/svn/xyz/trunk --username=admin
    


    Finally a specific project (a mvn project stored under /opt/maven/hello-one):
    $ sudo mkdir /tmp/svn-template/trunk/projects/hello-one
    $ sudo cp -R /opt/maven/hello-one  /tmp/svn-template/trunk/projects/
    $ sudo svn import -m 'Create project directory' /tmp/svn-template/trunk/projects/ http://localhost/svn/xyz/trunk/projects/ --username=admin
    


     

    > On 11/04/2017 05:43:20 AM Linux wrote:


    First enable the required Apache modules
    $ sudo a2enmod dav
    $ sudo a2enmod dav_svn
    


    $ sudo nano /etc/apache2/mods-enabled/dav_svn.conf
    


    <Location /svn>
    
       DAV svn
       SVNParentPath /var/lib/svn
    
       AuthType Basic
       AuthName "Subversion Repository"
       AuthUserFile /etc/apache2/dav_svn.passwd
       Require valid-user
         
    </Location>
    


    Restart Apache
    $ sudo systemctl restart apache2
    


    or

    $ sudo service apache2 restart
    


    Now you should be able to access from browser by:
    http://10.11.12.13/svn/xyz/
    





    References:

  •  


     
    Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
     
    Get your own forum today. It's easy and free.