从DAV安装的subversion repo中的文件在写入后不久就被清零了

我有一个颠覆回购

"SVNAutoversioning on" 

这通常允许webDAV客户端在没有签出 – 编辑 – 提交周期的情况下对文件进行更改,为了方便起见,这对于存储库的一些子集来说工作良好。 在这种情况下,我正在使用颠覆集中版本,而不是源代码pipe理。

服务器间歇性地将文件清零,geany / gedit提供了一个重载(我学到的是一个no-no),重载的文件是空的。 我认为这可能与gtk临时文件有关,但它可以用vi或kate复制。

如果我在vi中编辑一个文件,这里是成功确认的例子。

 "mnt/here/bootstrap.d/edited-file" 110L, 4077C written 

并上市确认该文件具有非零大小;

 > ls -la mnt/here/bootstrap.d/edited-file -rw-r--r-- 1 me me 4.0K Jan 11 07:42 mnt/here/bootstrap.d/edited-file 

然而几秒钟后,列表被改变,显示文件的归零

 > ls -la mnt/here/bootstrap.d/edited-file -rw-r--r-- 1 me me 0 Jan 11 07:42 mnt/here/bootstrap.d/edited-file/chef-client 

svn回购日志显示了一些可能是有责任的交易。

 ==> svn.limepepper.co.uk-error.log <== [Wed Jan 11 01:47:06 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' MOVE projects:/some/path/in/repo/this-file-gets-zeroed projects:/some/path/in/repo/this-file-gets-zeroed~ [Wed Jan 11 01:47:06 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' MOVE projects:/some/path/in/repo/this-file-gets-zeroed~ projects:/some/path/in/repo/this-file-gets-zeroed~ [Wed Jan 11 01:47:06 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' GET projects:/some/path/in/repo [Wed Jan 11 01:47:06 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' GET projects:/some/path/in/repo [Wed Jan 11 01:47:06 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' GET projects:/some/path/in/repo [Wed Jan 11 01:47:06 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' HEAD projects:/some/path/in/repo/this-file-gets-zeroed~ [Wed Jan 11 01:47:07 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' LOCK projects:/some/path/in/repo/this-file-gets-zeroed ==> svn_logfile <== [11/Jan/2012:01:47:07 -0600] service lock (/some/path/in/repo/this-file-gets-zeroed) ==> svn.limepepper.co.uk-error.log <== [Wed Jan 11 01:47:07 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' DELETE projects:/some/path/in/repo/this-file-gets-zeroed~ [Wed Jan 11 01:47:07 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' GET projects:/some/path/in/repo [Wed Jan 11 01:47:19 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' PUT projects:/some/path/in/repo/this-file-gets-zeroed [Wed Jan 11 01:47:20 2012] [info] [client 87.194.yyy.xxx] Access granted: 'service' UNLOCK projects:/some/path/in/repo/this-file-gets-zeroed ==> svn_logfile <== [11/Jan/2012:01:47:20 -0600] service unlock (/some/path/in/repo/this-file-gets-zeroed) 

svn repo DAV被挂载为;

 http://myserver/pathtorepo on /home/me/mnt/mountedhere type fuse (rw,nosuid,nodev,noexec,relatime,user_id=500,group_id=500,allow_other,max_read=16384) The server details are; # rpm -qa | egrep "httpd|mod_|subversion|dav|neon" httpd-tools-2.2.17-1.fc14.i686 httpd-2.2.17-1.fc14.i686 mod_auth_mysql-3.0.0-12.fc14.i686 mod_perl-2.0.4-11.fc14.i686 mod_python-3.3.1-14.fc14.i686 httpd-manual-2.2.17-1.fc14.noarch subversion-libs-1.6.17-1.fc14.i686 subversion-1.6.17-1.fc14.i686 mod_dav_svn-1.6.17-1.fc14.i686 neon-0.29.5-1.fc14.i686 mod_ssl-2.2.17-1.fc14.i686 

我已经决定使用安装好的DAV来解决问题,因为它看起来非常不可靠,但是我会有兴趣解决这个问题,因为它之前和之后都是这样使用的。

我使用tcpdump转储stream量,并检查了davfs2客户端和Subversion版本库之间的协议交换。

在客户端释放锁的时候,本地文件似乎被清零了,基本上服务器确认了释放锁,但包含了一个如此的标题;

 Content-length: 0 

在答复,这似乎导致dav2客户端零本地文件。

在configuration文件/etc/davfs2/davfs2.conf使用以下指令禁用客户机上的locking;

  use_locks 0 

导致零终止行为停止,但值得进一步调查,以发现这是否是客户端或服务器中的错误。