我正在尝试使用svnsync复制已使用的存储库(我这样做是为了确保我的存储库的最佳使用,只要它的机器正常工作)但它似乎不起作用.
我有两台机器(我更改了名称,但没有更改其他信息)
SOURCE/hooks,只存在一个可执行文件:pre-revprops-change.svn16/hooks,可执行文件是pre-revprop-change和start-commit.在这台机器上,dav_svn.conf包含指令SVNParentPath /var/svn,使所有存储库都可以在http:// FINAL/svn下访问通过在浏览器中打开每个存储库URL并发出身份验证对话框,我确保URL和login/pwd都是正确的.
我正在尝试执行以下命令
svnsync initialize http://FINAL/svn/svn16 http://INITIAL/SOURCE
Run Code Online (Sandbox Code Playgroud)
但它总是最终显示出来
Authentication realm: <http://FINAL:80> All Subversion Repositories hosted on FINAL
Password for 'ubunut-user':
Authentication realm: <http://FINAL.fr:80> All Subversion Repositories hosted on FINAL
Username: svnsync
Password for 'svnsync':
svnsync: DAV request failed; it's possible that the repository's pre-revprop-change hook either failed or is non-existent
svnsync: At least one property change failed; repository is unchanged
svnsync: Error setting property 'sync-lock':
Revprop change blocked by pre-revprop-change hook (exit code 255) with no output.
Run Code Online (Sandbox Code Playgroud)
我想某处有某种配置问题§.但是什么?在哪里?我已达到极限,网络似乎没有任何帮助,因为我见过的各种文档建议使整个宇宙可执行的钩子是一种有效的解决方案(在我的情况下不是这样).
Rid*_*del 14
事实证明我是笨蛋而不是笨蛋.
在这种错误的情况下,确保所有正常工作的最简单方法是手动调用各种钩子.
它显示我的pre-revprop-change钩子被错误地写了
"#!/bin/sh"
exit 0
Run Code Online (Sandbox Code Playgroud)
显然,删除"解决了问题.
Mil*_*rer 12
只是一点注意,以避免经常出错.
如果出现此类错误,请首先确保pre-revprops-change文件是可执行的.如果没有,执行:
chmod +x $DEST_SVN_REPO/hooks/pre-revprops-change,
其中$ DEST_SVN_REPO - 目标存储库的路径.