Saturday, February 6, 2010
Subversion userid case-sensitivie validation for Active Directory
replace strcmp with strcasecmp in the following two lines. This is for Subverison 1.4.0. Just search for strcmp in the same file for newer version.
./subversion/libsvn_repos/authz.c
line 156: else if (strcasecmp(user, group_user) == 0)
line 189: else if (strcasecmp(name, b->user) != 0)
Monday, October 26, 2009
Hudson config for SVN credentials
http://${HUDSON_HOST:PORT}/scm/SubversionSCM/enterCredential
the file on the server is under:
${HOME}/.hudson/hudson.scm.SubversionSCM.xml
Not sure if it supports multiple repositories with different credentials.
Reference:
http://www.testearly.com/2007/06/12/subversion-authentication-in-hudson/
Friday, August 28, 2009
integrate Subversion with Windows Active Directory
Tuesday, April 1, 2008
subversion with apache integration apr-util issue
I was compiling subversion 1.4.0 to be integrated with apache httpd 2.2.8. Everything went smoothly during the compilation process until I tried to access subversion through http, it shows the error message below everytime and resulted in error 500 in the browser:
[Mon Mar 17 16:04:17 2008] [error] [client 10.225.32.40] Could not fetch resource information. [500, #0][Mon Mar 17 16:04:17 2008] [error] [client 10.225.32.40] Could not open the root of the repository [500, #22][Mon Mar 17 16:04:17 2008] [error] [client 10.225.32.40] Can’t set position pointer in file ‘/path/to/repo/db/revs/11857′: Invalid argument [500, #22
It turns out that subversion linked with a different version of apr-util than apache httpd, see blow:
[user@hostname bin]$ ldd ./httpd grep aprlibaprutil-1.so.0 => /path/to/httpd-2.2.8/lib/libaprutil-1.so.0 (0×00ca0000)libapr-1.so.0 => /path/to/httpd-2.2.8/lib/libapr-1.so.0 (0×0035b000)
[user@hostname bin]$ ldd /path/to/httpd/modules/mod_dav_svn.so grep aprlibaprutil-0.so.0 => /path/to/subversion/lib/libaprutil-0.so.0 (0×00111000)libapr-0.so.0 => /path/to/subversion/lib/libapr-0.so.0 (0×00ca4000)
The reason is that subversion-deps-1.4.0.tar.gz comes with an older version of apr-util than the one in apache httpd 2.2.8.To resolve this issue, simply copy the new version of apr and apr-util source to subversion build directory and recompile:
cp -pR ../httpd-2.2.8/srclib/apr/ apr
cp -pR ../httpd-2.2.8/srclib/apr-util/ apr-util
make clean; ./configure –prefix=/path/to/subversion –with-apxs=/path/to/httpd/bin/apxs ; make ; make install
Wednesday, January 16, 2008
remove unwanted revisions in subversion
There’s no easy button to remove the unwanted revisions in subversion. The svndumpfilter that came with subversion distribution is the tool that is able to exclude or include revisions with filename/dirname, unfortunately if there are “copies” in revisions that refers to the stuff that you wanted to filter out, svndumpfilter would break without finishing filtering the rest of revisions.
This problem can be avoided by writing a script to utilize svndumpfilter, svnlook and etc., copy path/files that has dependcies on other revisions. There are already scripts such as svndumpfilter2 and svndumpfilter3 out there. svndumpfilter2 is a python script that eliminates the copy dependencies revisions that you wanted to filter out. You can download svndumpfilter2 from: http://tartarus.org/~simon-anonsvn/viewcvs.cgi/svn-tools/svndumpfilter2
Assuming the directories that you want to keep are trunk, branches tags:
$SVN_HOME/bin/svnadmin dump /path/to/repo ./svndumpfilter2 /path/to/repo trunk branches tags > clean.dump
$SVN_HOME/bin/svnadmin load /path/to/repo < clean.dump
Your repo is now clean without those revisions taking up your HDD space.