在想实现在两台svn服务器之间实现数据同步,发现 执行 svnsync init 时不能正常进行。

两台服务器的操作系统均为 Windows,服务器端安装的svn为VisualSVN Server。svn安装完成后,均能通过客户端连接上,但在使用 svnsync 命令执行 init 操作时,提示失败。

命令操作及结果如下:

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

E:\>svnsync init https://10.8.210.177/svn/eyoubao https://19.9.21.177/svn/eyouba
o
svnsync: E175002: DAV request failed; it's possible that the repository's pre-re
vprop-change hook either failed or is non-existent
svnsync: E175008: At least one property change failed; repository is unchanged
svnsync: E175002: Error setting property 'sync-lock':
Repository has not been enabled to accept revision propchanges;
ask the administrator to create a pre-revprop-change hook

这是什么原因呢?望高手们能够指点一下,或者有在两台服务器之间实现svn同步经验的朋友们能够分享一下经验,不胜感激!

在同步的目标服务器端该版本库的hooks文件夹内增加一个钩子脚本,pre-revprop-change.bat,里面写上一行命令:
exit 0
然后就应该一起OK了。追问

感谢回答,按照所说操作后,又产生了一个新的提示:
C:\>svnsync init https://10.8.210.177/svn/eyoubao
https://10.9.21.177/svn/eyoubao
svnsync: E000022: Destination repository already contains revision history; consider using --allow-non-empty if the repository's revisions are known to mirror their respective revisions in the source repository
请问这是怎么回事?谢谢!

追答

这个错是说目标库不是空的,你在做同步的初始化时,目标库必须是空的,也就是说对目标库所在文件夹执行创建版本库操作后,没有对它进行过commit、import等操作。

如果目标库的确是空的,那么可能是你的命令行中把源库、目标库写反了。

温馨提示:答案为网友推荐,仅供参考
相似回答