svn:提交后挂钩
我们使用 VisualSVN Server 进行代码同步...我想在每次提交后添加一些常规操作。它们很常见...创建目录、进行 zip 备份等等。所以我编写了cmd脚本来执行它们,但无法执行它。 我做了以下事情: 在“Hooks”选项卡上我的存储库文件夹的属性中,我写道 1 调用c:\script.cmd 2 c:\script.cmd 我还尝试使用引号...并在脚本末尾写入 exit 0 ,但这没有帮助。
有没有一种简单的方法可以让它发挥作用?
We use VisualSVN Server for code syncronization... and I'd like to add some routine operations after each commit. They're quite usual...create directories, making zip backup and so on. so I wrote cmd script to do them but can't execute it.
I did the following:
In Properties for my repository folder on the "Hooks" tab I wrote
1 call c:\script.cmd
2 c:\script.cmd
I also tried to use quotes...and wrote exit 0 at the end of the script, but it didn't help.
Is there an easy way to make it work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有错误代码吗?
尝试通过从命令行运行脚本来测试脚本。
Windows 似乎对此更加挑剔和/或文档少得多,但尝试通过命令行进入实际存储库并将模板提交后挂钩编辑为实际挂钩并从命令行运行它,那里会发生什么?
顺便说一句,为什么你要在提交后钩子中做这么多事情,这引起了人们的注意。
Any error codes?
Try testing out the scripts by running them from the command line.
Windows seems a lot more finicky about this and/or a lot less documentation, but try going into the actual repository via command line and edit the template post-commit hook to an actual hook and run it from the command line, what happens there?
as an aside, it's raises an eyebrow why you are trying to do so much in post commit hook.