gpt4 book ai didi

svn - TortoiseSVN 中的本地 Hook 是什么?

转载 作者:行者123 更新时间:2023-12-02 15:39:16 28 4
gpt4 key购买 nike

我刚刚意识到 TSVN 支持本地 Hook 。

谁能解释一下它们的用途?

我已经使用服务器端 Hook 来强制输入日志消息以进行提交并防止某些文件被 checkin ;还使用提交后 Hook 在提交时发送电子邮件。

我们也使用 AnkhSVN,我的理解是它不支持本地 Hook ,对吗?

最佳答案

这在 Tortoise SVN 帮助文件中有相当详尽的解释(右键单击,Tortoise SVN->Help,然后在索引中搜索 Hooks;有一个链接直接到 4.30.8. Client Side Hook Scripts,其中部分说明(特别是前两段):

This dialog allows you to set up hook scripts which will be executed automatically when certain Subversion actions are performed. As opposed to the hook scripts explained in Section 3.3, “Server side hook scripts”, these scripts are executed locally on the client.

One application for such hooks might be to call a program like SubWCRev.exe to update version numbers after a commit, and perhaps to trigger a rebuild.

For various security and implementation reasons, hook scripts are defined locally on a machine, rather than as project properties. You define what happens, no matter what someone else commits to the repository. Of course you can always choose to call a script which is itself under version control.

继续说目前支持六种类型的 Hook (从 TSVN v1.6.15 64 位开始):

There are currently six types of hook script available

  • Start-commit
  • Pre-commit
  • Post-commit
  • Start-update
  • Pre-update
  • Post-update

关于svn - TortoiseSVN 中的本地 Hook 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10858116/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com