I have setup a Subversion machine in our office LAN. Subversion is served by Apache.
Then I started a Java project and performed some migration from CVS (all Java projects!). It all ran fine, I can clearly use SVN from Eclipse using Subversive.
Then I started our first C# project. When committing it to Subversion, I always get a 400 error when Tortoise (driven by VisualSVN or used stand-alone) tries to upload a .cs
file
TortoiseSVN version info (as of today, it is up to date):
TortoiseSVN 1.8.5, Build 25224 - 64 Bit , 2014/02/18 20:05:11↩⏎
Subversion 1.8.8, -release↩⏎
apr 1.5.0↩⏎
apr-util 1.5.3↩⏎
serf 1.3.4↩⏎
OpenSSL 1.0.1f 6 Jan 2014↩⏎
zlib 1.2.8
Here is TortoiseSVN log (partially localized):
Errore: Commit fallito (seguono dettagli):
Errore: Unexpected HTTP status 400 'Bad request' on
Errore: '/svnroot/cst/!svn/txr/21-y/path/to/trunk/XsdValidationService/XmlValidationResult.cs'
Errore: Additional errors:
Errore: PUT of
Errore: '/svnroot/cst/!svn/txr/21-y/path/to/trunk/XsdValidationService/XmlValidationResult.cs':
Errore: 400 Bad request
Here is Apache configuration
default-server.conf
<Location /svnroot/repo>
DAV svn
SVNPath /srv/svn/repos/repo
SVNAutoversioning On
# Repository Display Name
SVNReposName "SVN Repository"
#SecFilterEngine off
#Authorization
# Do basic password authentication in the clear
AuthType Basic
# The name of the protected area or "realm"
AuthName "CompanyName"
# Make LDAP the authentication mechanism
AuthBasicProvider ldap
# Active Directory requires an authenticating DN to access records
AuthLDAPBindDN []
# This is the password for the AuthLDAPBindDN user in Active Directory
AuthLDAPBindPassword []
# The LDAP query URL
AuthLDAPURL []
# Require a valid user
Require valid-user
AuthUserFile /dev/null
allow from all
</Location>
Here is Apache access log
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "MKCOL /svnroot/cst/!svn/txr/21-w/path/to/project/XsdValidationService HTTP/1.1" 201 71 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "MKCOL /svnroot/cst/!svn/txr/21-w/path/to/projectProperties HTTP/1.1" 201 71 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "MKCOL /svnroot/cst/!svn/txr/21-w/path/to/projectSchemas HTTP/1.1" 201 71 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "PROPPATCH /svnroot/cst/!svn/txr/21-w/path/to/project/XsdValidationService HTTP/1.1" 207 491 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "PROPPATCH /svnroot/cst/!svn/txr/21-w/path/to/project HTTP/1.1" 207 470 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "PUT /svnroot/cst/!svn/txr/21-w/path/to/project/EDWin.sln HTTP/1.1" 201 71 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "PUT /svnroot/cst/!svn/txr/21-w/path/to/projectSchemas/ED-AUTO-1-0.xsd HTTP/1.1" 201 71 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "PUT /svnroot/cst/!svn/txr/21-w/path/to/projectSchemas/ED-ACC-SME-1-0.xsd HTTP/1.1" 201 71 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "PUT /svnroot/cst/!svn/txr/21-w/path/to/projectSchemas/ED-RMBS-1-7.xsd HTTP/1.1" 201 71 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:09 +0100] "PUT /svnroot/cst/!svn/txr/21-w/path/to/projectXmlValidationResult.cs HTTP/1.1" 400 5268 "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
192.168.0.167 - [USERNAME] [07/Mar/2014:17:20:10 +0100] "DELETE /svnroot/cst/!svn/txn/21-w HTTP/1.1" 204 - "-" "SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.5.25224"
I have no error displayed in error log.
I noticed that if Tortoise, for some reason, commits files in a different order, only the first .cs
causes troubles. I have not implemented any filter hook script yet.
How can I solve this problem?
The standard default-server.conf
contains the following directive (along with the comments):
# Include all *.conf files from /etc/apache2/conf.d/.
#
# This is mostly meant as a place for other RPM packages to drop in their
# configuration snippet.
#
# You can comment this out here if you want those bits include only in a
# certain virtual host, but not here.
#
IncludeOptional /etc/apache2/conf.d/*.conf
In my openSUSE 13.1 installation, Apache comes with Mono. Though mod_mono
is not loaded in /etc/sysconfig/apache2
(a2dismod mono
command), the /etc/apache2/mod_mono.conf
always loads Mono runtime and associates, in particular, .cs
files to Mono.
Now, when I commit C# code files, with .cs
extension, Apache by default lets Mono handle those requests, which ultimately causes the following exception that can be captured only using Wireshark:
[System.ArgumentException]: Directory does not exists
Parameter name: value
at System.IO.FileSystemWatcher.set_Path (System.String value) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher:set_Path (string)
at System.Web.HttpRuntime.SetupOfflineWatch () [0x00000] in <filename unknown>:0
at System.Web.HttpRuntime.Process (System.Web.HttpWorkerRequest req) [0x00000] in <filename unknown>:0
at System.Web.HttpRuntime.RealProcessRequest (System.Object o) [0x00000] in <filename unknown>:0
at System.Web.HttpRuntime.ProcessRequest (System.Web.HttpWorkerRequest wr) [0x00000] in <filename unknown>:0
at Mono.WebServer.MonoWorkerRequest.ProcessRequest () [0x00000] in <filename unknown>:0
An ASP.NET exception in a Subversion request smelled enough bad to let me investigate
I simply commented out the above Apache directive and commited without problems.