客户端的Hook脚本执行
我正在开发一个 SVN 项目,我需要从客户端执行我的预提交挂钩脚本。有什么方法可以执行它们吗?
I am working on a SVN project, and I need to execute my pre-commit hook script from the client side. Is there any way to execute them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您按照本文建议使用命令行,请创建一个作为 svn 命令别名的脚本文件:https://web.archive.org/web/20221127195259/http://top-frog.com/2009/04/23/client-side-pre-and-post-svn-hooks-with-unix -别名/
您只需将包含脚本文件的目录放在系统路径环境变量中包含 SVN 可执行文件的目录之前即可。
Create a script file that is an alias for the
svn
command if you are using the command-line as this post suggests: https://web.archive.org/web/20221127195259/http://top-frog.com/2009/04/23/client-side-pre-and-post-svn-hooks-with-unix-aliases/You just need to put the directory containing the script file in your system's path environment variable before the directory containing the SVN executable.
唯一可能的解决方案是使用 TortoiseSVN,它有机会在客户端执行特殊的 Hook 脚本(仅来自 TortoiseSVN)。否则,无法运行 Hook 脚本,因为它们始终在服务器端运行。
The only possible solution is to use TortoiseSVN which has the opportunity to execute special Hook Script (only from TortoiseSVN) on the client side. Otherwise it's not possible to run Hook Scripts, cause they run allways on the server side.