Help links
http://subversion.apache.org/http://www.noah.org/wiki/Apache_webdav_svn
http://www.systhread.net/texts/200707svndav1.php
Install software packets (Ubuntu/Debian Linux)
sudo apt-get install apache2sudo apt-get install subversion
sudo apt-get install libapache2-svn
/etc/init.d/apache2 restart
Configure
mkdir /var/subversionmkdir /var/subversion/repository1
mkdir /var/subversion/repository2
svnadmin create --fs-type fsfs /var/subversion/repository1
svnadmin create --fs-type fsfs /var/subversion/repository2
echo "" > /var/subversion/users.htpasswd
echo "" > /var/subversion/apache_svn.conf
vim /var/subversion/apache_svn.conf
# /var/subversion/apache_svn.conf
#############################################
## webdav entry for Subversion repositories
<Location /svn>
DAV svn
SVNParentPath /var/subversion
SVNAutoversioning on
AuthType Basic
AuthName SVNRepository
AuthUserFile /var/subversion/users.htpasswd
require valid-user
Order deny,allow
</Location>
########################################################################
echo "Include /var/subversion/apache_svn.conf" >> /etc/apache2/httpd.conf
htpasswd /var/subversion/users.htpasswd user1
htpasswd /var/subversion/users.htpasswd user2
chown -R www-data:root /var/subversion
/etc/init.d/apache2 restart
Create repository directories structure
svn co http://89.111.61.188/svn/repository1cd repository1
mkdir myproject
mkdir myproject/tags
mkdir myproject/branches
mkdir myproject/trunk
svn add myproject
svn commit -m "add myproject"
Repository sample directories structure
myproject - subversion repository projectmyproject/clientfiles - all files received from a client
myproject/docs - project related documentation, diagrams and other files
myproject - all project work here
myproject/trunk/myproject - my project
myproject/trunk/myproject/forms
myproject/trunk/myproject/services
myproject/tags
myproject/tags/0.1/myproject
myproject/tags/0.5/myproject
myproject/tags/1.0/myproject
Backup and Resore
Backup:svnadmin dump /var/subversion/repository1 > repository1.dumpfile
Resore:
svnadmin load /var/subversion/repository1 < repository1.dumpfile Hotcopy (as direcotry): svnadmin hotcopy /var/subversion/repository1 /var/subversion/repository1-backup create local read-only repository mirror: svnsync initialize MIRROR_URL SOURCE_URL --source-password ARG --source-username ARG --sync-password ARG --sync-username ARG update mirror: svnsync synchronize DEST_URL
Redmain integration
Redmine is very power project management and team collaboration tool. From Redmain install instruction (DO NOT FOLLOW IT!):
#find / -name reposman.rb
#ruby /opt/redmine-1.0.3/extra/svn/reposman.rb -f --redmine-host http://89.111.61.188:80/ --svn-dir /var/subversion/redmine --url file:///var/subversion/redmine/ --owner www-data
Configure like here:
- Go to redmine -> myproject -> settings -> Repository
- Type http://89.111.61.188/svn/repository1 + login + password
No comments:
Post a Comment