为 Tortoise SVN 创建所需的评论挂钩
有没有人实现了一个要求开发人员在成功提交之前输入 x 字符的钩子? 我查过钩子,但不太明白如何使用 Tortoise 专门针对 Windows 环境为 Subversion 实现这一钩子。
Has anyone implemented a hook that requires developers to input x chars before successful submission? I've looked up hooks but don't really understand how to implement this one for Subversion using Tortoise specifically for a Windows Environment.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需右键单击存储库的顶层即可。 在上下文菜单中,选择 TortoiseSVN,然后选择“属性”,以查看此对话框:
单击右下角,然后选择日志大小。 输入提交和锁定所需的字符数(在下面的示例中为 10)。
从您刚刚修改的顶级目录进行提交。 现在,您的存储库要求所有用户在提交更改之前发表评论。
Simply right-click the top level of your Repository. In the context-menu select TortoiseSVN, then Properties, to see this dialog:
Click the New button near the bottom right, and select Log Sizes. Enter the number of characters you want to require for Commit and Lock (10 in example below).
Do a Commit from the top Level directory you just modified. Now your repository requires all users to Comment before Committing changes.
尝试此,该内容取自此处
请注意,如果您有信任的开发人员,那么使用客户端提交要求也可以发挥作用。
编辑:
然后试试这个?
http://svn.haxx.se/users/archive-2006- 05/0594.shtml
http://blog.tfanshteyn.com/2007/11/ subversion-pre-commit-hooks.html
Try this which was taken from here
Note that using client side commit requirements can work as well if you have developers you trust.
EDIT:
Then try this?
http://svn.haxx.se/users/archive-2006-05/0594.shtml
http://blog.tfanshteyn.com/2007/11/subversion-pre-commit-hooks.html
如果您将 JIRA 与 Subversion 一起使用,请使用提交策略插件。
它可以使用名为 提交消息必须与模式匹配。 更好的是,您可以使用这样的正则表达式来仅计算非空白字符:
该附加组件允许将所有这些规则保留在一个中心位置(JIRA),并且它提供了其他几个条件来检查提交者、提交的文件和很快。
免责声明:这是一个商业附加组件,我是一名开发人员。
If you are using JIRA together with Subversion, then use the Commit Policy add-on.
It can verify the number of characters in the commit messge with the condition named Commit message must match a pattern. Even better you can use a regex like this to count only the non-whitespace characters:
The add-on allows keeping all these rules in a central place (JIRA) and it offers several other conditions to check the committer person, the committed files and so on.
Disclaimer: this is a commercial add-on, and I'm a developer working on it.