Archive for the ‘SVN’ Category

Create new SVN repository into your ubuntu server

Friday, September 23rd, 2011

Here i describe how I add new repositories to my SVN server once I start working on something new and interesting.

First create URL for repository so add following to vhost configuration

  <Location /svn/yourproject>
        DAV svn
        SVNParentPath /svn/yourprojeect
        SVNListParentPath on
        AuthType Basic
        AuthName "Yourproject svn"
        AuthUserFile /etc/subversion/yourproject.passwd
        Require valid-user
  </Location>

Create user and give the user a password

htpasswd -c /etc/subversion/yourproject.passwd youruser

Create directory for your svn and initialize svn repository in there.

mkdir /svn/yourproject/
svnadmin create /svn/yourproject/svnrepository
chown -R www-data:svn /svn/yourproject/
chmod -R g+wrs /svn/yourproject/
service apache2 restart

See also solution to problems that might arise.

SVN server setup using WEB DAV

Tuesday, September 13th, 2011

Good way to use SVN is through https and apache using mod_dav and mod_dav_svn.

While debugging and trying different settings I was able to see all of these error messages before correct combination for configuration was found. Best ways to debug are Eclipse SVN “Edit Repository Location” view that displays useful error message when clicking  finish. Apache access log and error log are also very useful.

Eclipse
Get repository folder children operation failed.
svn: Malformed XML

Netbeans
org.tigris.subversion.javahl.ClientException: Malformed XML

Error while performing action: Repository moved permanently to 'https://marguspala.com/testproject/'; please relocate

PROPFIND requests with a Depth of "infinity" are not allowed for /testproject/.

org.tigris.subversion.javahl.ClientException: svn: PROPFIND of '/testproject': 405 Method Not Allowed (https://marguspala.com)This could have the following meaning(s):
- the folder specified in the repository URL does not exist on the host
- your proxy does not allow the svn command you have invoked

1.2.3.4 - - [13/Sep/2011:12:38:03 +0200] "PROPFIND /testproject HTTP/1.1" 405 659 "-" "SVN/1.6.15 SVNKit/1.3.5 (http://svnkit.com/) r7406

To avoid most of these errors use Location conf exactly like this:

<Location /testproject>
 DAV svn
 SVNPath /svn/testproject
 AuthType Basic
 AuthName "Test svn project"
 AuthUserFile /etc/subversion/passwd
 Require valid-user
 </Location>

Most important is to never ever use trailing slash in Location directive.