Redmine 和 SVN:如何在提交发生后将修订链接到问题?
这样我们就成功地将Redmine与SVN集成了。这是一个成熟的集成(已经几个月了)。 Post-commit-hook 更新 Redmine 中的存储库。 SVN 提交中的评论可以完美地导入到 Redmine 中,它能够在问题和修订、日志时间、整个 9 码之间创建链接。
然而,由于时间限制问题,存在一个紧急错误,必须快速修复并在没有评论的情况下提交。这个问题甚至不在Redmine 中。这发生在凌晨 3:35,此时最佳实践的价值就像北极冬季出售的一袋冰一样重要。
现在,今天早上,我们将该问题输入到 Redmine 中,并希望将凌晨 3:35 的疯狂修订与其联系起来。那怎么办呢?
我曾经能够通过删除 Redmine 数据库中的一些记录并运行存储库更新任务来解决这个问题。但我现在不太记得了,真的真的不想再去那里了。
有办法吗?一个功能?一个插件?一个脚本?任何事物?
预先感谢
更新
哦,顺便说一下,我们已经更新了该修订版的评论,其中包含Redmine期望的有效标签和单词。
So we have Redmine successfully integrated with SVN. It's a mature integration (a few months now). Post-commit-hook updates the repository in Redmine. Comments in SVN commit get beautifully imported into Redmine, which is able to create links between issues and revisions, log time, the whole 9 yards.
However, for time constraint issues, there was an urgent bug which had to be fixed quickly and committed without comments. The issue wasn't even in Redmine. This happened at 3:35AM, when best practices are as valued as a bag of ice for sale in the Arctic winter.
Now, this morning, we entered the issue into Redmine and want to link that crazy 3:35AM revision to it. How can that be done?
I was once able to hack that by erasing some records in Redmine database and running the repository update task. But I do not really remember right now and really really do not want to go there anymore.
Is there a way? A functionality? A plugin? A script? Anything?
Thanks in advance
Update
Oh, by the way, we already updated the comment for THAT revision, containing the valid tags and words Redmine expects.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使redmine重新读取项目的svn日志的一种可能的解决方案是从项目设置中删除存储库,再次输入它并转到存储库选项卡,它可能会从头开始加载所有内容。
这是一种解决方法,也许还有更好的方法,但它应该仍然有效。从 redmine 项目设置中删除存储库不会影响您实际的 svn 存储库。
One possible solution to make redmine re-read svn log of the project is to delete the repository from project settings, enter it again and go to repository tab, it will probably load everything from the beginning.
It's a workaround and perhaps there's a better way, but it should still work. Deleting repository from redmine project setting will not affect your actual svn repository.
另请参阅 user3402809 对我的问题的回复将修订与 Redmine 问题相关联。如果您在 Redmine 中拥有“管理相关问题”权限,它会提供更简单且侵入性较小的方式。
See also reply from user3402809 to my question Associating revisions with a Redmine issue. It provides simpler and less intrusive way providing you have "Manage related issues" permission in Redmine.
我不是 100% 相信这一点,但是……
在 redmine 代码中,有一个名为 fetch_changesets 的方法,它可以从所有项目的存储库中获取变更集。上面的评论说:
下面还有另一种方法,名为
scan_changesets_for_issue_ids
,它被称为重新扫描评论。这些位于 models/repository.rb 中,因此您可以修改它们以通过 1 个新方法清除、获取和重新扫描所有内容。显然,您需要设置 SVN 以允许更改历史提交消息。I'm not 100% on this but....
in the redmine code there is a method called
fetch_changesets
that, grabs the changesets from repositories for all projects. The comment above it says:there is another method under that called
scan_changesets_for_issue_ids
which is what's called to rescan the comments. These are in models/repository.rb so you could modify them to clear, fetch and rescan all in 1 new method. Obviously you'll need to set SVN up to allow changing of historical commit messages.从存储库修订条目中,您可以手动将问题添加到相关问题列表中。
这不是真正的网址,但您会明白的。
http://server/projects/projectname/repository/reponame/revisions/nnn
有一个“相关问题”段落,以及一个标题为“添加”的链接。
它将插入一个小表格,允许您输入相关的问题编号。
From the repository revision entry you can manually add the issue to the list of related issues.
This is not a real url, but you will get the idea.
http://server/projects/projectname/repository/reponame/revisions/nnn
There is a paragraph for "Related issues" , and a link with the caption "Add".
It will insert a little form that allows you to enter the related issue number.