0

我是一家软件公司的新实习生,老板让我修改svn tortoise中的hook code或者post-commit操作。但我现在不知道 Visual Basic 源代码文件在哪里。它位于哪里?谢谢你

4

1 回答 1

4

这些钩子通常位于 ROOT_OF_SVN_REPO/hooks 目录中。存储库上的许多 pre、post 操作都会有 *.tmpl。

C:\MyRepo\hooks:
 |- post-commit.tmpl
 |- post-lock.tmpl
 |- post-revprop-change.t
 |- post-unlock.tmpl
 |- pre-commit.tmpl
 |- pre-lock.tmpl
 |- pre-revprop-change.tm
 |- pre-unlock.tmpl
 |- start-commit.tmpl

您需要创建一个不带扩展名的 .tmpl 文件的副本

C:\Temp\hooks>copy post-commit.tmpl post-commit
        1 file(s) copied.

然后编辑它以调用包含验证逻辑的脚本,即在 post-commit 末尾替换以下行

mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf

cscript my-post-commit.vbs "$REPOS" "$REV" <other args>

希望这可以帮助。

于 2012-09-04T02:23:08.133 回答