Subversion Howto

From Edgar BV Wiki
Revision as of 14:37, 29 October 2008 by Red (talk | contribs)
Jump to navigation Jump to search

TortoiseSVN manual Nightly build of the manual (especially chapter 5 + are interesting for using TortoiseSVN)

Create a new repository:

In W:\websites\Admin\subs\ make a new directory with the project name (eg. test) Right click on test and choose 'create repository here' This creates a directory with conf/, db/, hooks/, locks/, format and README.txt You can then surf to http://wip.tripnet.int/svn/test/ to see the repo in the browser. (it will be empty) Then import the standard structure. Find the directory '0 Naam van opdracht' and right click on it. Choose TortoiseSVN -> Import... and put in the url of the repository (http://wip.tripnet.int/svn/test/). This creates revision 1. To work with the repository you need to check out the repository to your working copy.

Making a working copy:

make a directory wip on your local hd, eg. d:\wip\ Inside that directory make a directory with the same name as the project you will check out into it, eg: d:\wip\test right click on the directory and choose 'SVN Checkout...'

In the URL of repository put the location of the repository (http://wip.tripnet.int/svn/test/) and make sure it goes to the right destination URL.

Then in d:\wip\test\ you will find the files and directories of '0 Naam van opdracht'. This is where you do all your work!

Adding files to the repository:

In the working copy, create a new file. Right click on the file, TortoiseSVN -> Add. You can add files by copying them into the directory as well: either select all the files and right-click-drag them in and then choose 'SVN Add files to this WC', or normally drag them in, select them in the working copy and then right click, TortoiseSVN -> Add.


Server Side:

/etc/apache2/mods-enabled/dav_svn.conf

<Location /svn>

 DAV svn
 SVNParentPath /export/home/wip/websites/Admin/subs/

</Location>

This will enable SVN on the server. Adding the following inside the <Location> tags above allows for PAM authentication using libapache-mod-auth-pam

 # Added for PAM authentication
 AuthType Basic
 # To silence error msg in /var/log/*error.log
 AuthUserFile /dev/null
 # It seems if below is off, Zend causes "zend_mm_heap corrupted" errors in the apache error log
 AuthPAM_FallThrough off
 AuthName "SubversionRepository"
 AuthPAM_Enabled on
 require valid-user
 require group designers
 # Required to get mod_auth_pam working in apache > 2.0 
 AuthBasicAuthoritative off
 <LimitExcept GET PROPFIND OPTIONS REPORT>
 Satisfy all
 </LimitExcept>

You also need to add the user www-data to the group shadow: adduser www-data shadow

wiki source another source subversion FAQ

keywords: subversion, svn, SVN