链接 SVN 提交问题
我知道我可以使用 #number 将提交链接到问题。但我正在寻找一种通过 svn 提交更改问题状态的方法。
我正在寻找类似于 Trac 的东西 http://trac.edgewall.org/wiki/TimeTracking< /a> .如果您的 svn 评论是“此任务即将完成(参考 123)”,那么它会在问题日志中添加该消息。
有谁知道是否有办法做到这一点?
I know I can use #number to to link the commit to an issue. But I'm looking for a way to change the issue status through the svn commit.
I'm looking for something similar to what Trac have http://trac.edgewall.org/wiki/TimeTracking . If your svn comment is "This task is almos done (refs 123)" then it add the message on the issue's log.
Does anybody knows if there is a way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来这是在 redmine OOTB 中:
您可以使用设置中定义的正确引用关键字来更新问题状态。
请参阅 redmine wiki 或 <一个href="https://stackoverflow.com/questions/7282684/automaticly-close-redmine-task-with-commit-comment/7292711#7292711">这个问题的答案(下面的截图)
在 svn 消息中使用正确的引用关键字(如上所述)时,修订版本将与问题相关联,并显示在右侧名为关联修订版本的第二列中消息的历史记录(请参阅此问题作为示例)。
如果您使用修复关键字,则会在问题日志中添加一个条目,修改状态并更新% Done 字段。
Looks like this is in redmine OOTB:
You can update the issue status by using the proper Referencing keywords as defined in your settings.
See the redmine wiki or the answer to this question on SO (screenshot below)
When using the proper Referencing keywords in your svn message (as above), the revision gets associated to the issue and is being displayed in a second column called Associated revisions to the right of the message History (see this issue as an example).
In case you use Fixing keywords , an entry is also added to the issue's log, the status is modified and the % Done field is updated.
在提交消息中引用问题
从存储库获取时,会扫描提交消息以查找引用或修复的问题 ID。
这些选项允许您定义可在提交消息中使用的关键字以自动引用或修复问题,以及适用于已修复问题的状态。
默认关键字是:
用于引用问题:refs、references、IssueID
用于解决问题:修复、关闭
没有为已解决的问题定义默认状态。如果您想启用自动关闭问题,则必须指定它。
如果您想在不使用关键字的情况下引用问题,请在引用关键字(管理/存储库)设置中输入一个星号:*。在这种情况下,消息中找到的任何问题 ID 都将链接到变更集。
使用默认关键字的有效提交消息示例:
此提交引用 #1、#2 并修复 #3
此消息将引用问题 1 和 2 并自动修复问题 3。
关键字后的问题 ID 可以用空格、逗号或 & 分隔。
Referencing issues in commit messages
When fetched from the repositories, commit messages are scanned for referenced or fixed issue IDs.
These options lets you define keywords that can be used in commit message to reference or fix issues automatically, and the status to apply to fixed issues.
Default keywords are:
for referencing issues: refs, references, IssueID
for fixing issues: fixes, closes
There's no default status defined for fixed issue. You'll have to specify it if you want to enable auto closure of issues.
If you want to reference issues without using keywords, enter a single star: * in the Referencing keywords (Administration/Repository) setting. In this case, any issue ID found in the message will be linked to the changeset.
Example of a working commit message using default keywords:
This commit refs #1, #2 and fixes #3
This message would reference issues 1 and 2 and automatically fix issue 3.
After a keyword issue IDs can be separated with a space, a comma or &.
如果是 TortoiseSVN,您必须找到、安装、配置适当的问题跟踪工具插件
对于命令行 SVN(我想),大多数事情都可以用
post-commit hooks
In case of TortoiseSVN you have to find, install, configure proper plugin for your issue-tracking tool
For command-line SVN (I suppose), most things can be done with
post-commit hooks