问题描述
棘手的问题:我需要做到以下几点:
Tricky question:I need the following to happen:
1) 在点击提交之前,tortoisesvn 应该在提交的代码文件中插入一个法律声明注释.我只讨论客户端事件.
2) Svn:keywords 不起作用,因为这些关键字需要已经在文件中.
2) Svn:keywords are not going to work because those keywords need to be in the file already.
有没有办法给乌龟写插件?
May be there is a way to write plugin for tortoise?
推荐答案
CLIENT SIDE HOOK SCRIPTS(安全但特定于 svn 客户端):
CLIENT SIDE HOOK SCRIPTS (SAFE but svn client specific):
唯一安全的方法是使用客户端钩子脚本.这里有一个关于如何使用 TortoiseSVN 执行此操作的提示:http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-挖设置.html
The only safe way to do it is to use client side hook scripts. Here a hint on how to perform this with TortoiseSVN:http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-settings.html
不要使用服务器挂钩脚本:
DO NOT USE SERVER HOOK SCRIPTS:
服务器端钩子脚本无济于事,不允许在那里修改数据(认为没有强制执行).原因是服务器端脚本无法修改您的本地副本,最终导致数据不匹配.参见 http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks 了解更多详情.
Server side hook scripts won't help, it is not allowed to modify data there (thought not enforced). The reason is that the server side script cannot modify your local copy and you end up in mismatching data. See http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks for more details regarding this.
这篇关于使用 TortoiseSVN 自动插入注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!