我试图在Linux机器上使用Subversion,存储库位于Microsoft sbs2008服务器上。(我可以从Microsoft Windows 7计算机访问存储库。)有人可以告诉我如何使其工作吗?
这就是我所做的。
# sudo mount -t cifs -v -o credentials=~/Files/server-mount-credentials,uid=richard,nocase,nounix,nosuid //sbs2008/local ~/Files/server-mount/ # svn commit -m "" Adding file1 Sending file2 Transmitting file data ........svn: Commit failed (details follow): svn: database is locked
strace显示:
open("/home/rdelorenzi/Files/server-mount/svn_repository/db/rep-cache.db", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 12 ... _llseek(12, 162816, [162816], SEEK_SET) = 0 read(12, "\n\0\0\0\20\1 \0\1 \1N\1|\1\252\1\330\2\6\0024\2b\2\220\2\276\2\354\3\32"..., 1024) = 1024 _llseek(12, 100352, [100352], SEEK_SET) = 0 read(12, "\n\0\0\0\24\0i\0\0i\0\227\0\305\0\363\1!\1O\1}\1\253\1\331\2\7\0025\2c"..., 1024) = 1024 _llseek(12, 52224, [52224], SEEK_SET) = 0 read(12, "\n\0\0\0\24\0k\0\0\231\0\307\0\365\1#\1Q\1\177\1\255\1\333\2\t\0027\2d\2\222"..., 1024) = 1024 fcntl64(12, F_SETLK64, {type=F_WRLCK, whence=SEEK_SET, start=1073741824, len=1}, 0xbf8e15e8) = 0 fcntl64(12, F_SETLK64, {type=F_WRLCK, whence=SEEK_SET, start=1073741826, len=510}, 0xbf8e15e8) = -1 EACCES (Permission denied)
不要通过网络共享来安装Subversion存储库,否则它将无法可靠地运行。
file://访问仅适用于本地单用户访问,尤其是测试和调试。当您要共享存储库时,您确实需要设置适当的服务器,并且这并不像您想的那样困难。阅读“访问存储库”一节,以获取有关选择和设置服务器的指南。[链接]
如David W所述,您需要运行SVN服务器。