我找不到任何文档 - 有可能吗?
最佳答案
您在 TortoiseHg 配置对话框 ( thg userconfig
) 中找到的字段的帮助是:
Defines the regex to match when picking up issue numbers.
Defines the command to run when an issue number is recognized. You may include groups in issue.regex, and corresponding {n} tokens in issue.link (where n is a non-negative integer). {0} refers to the entire string matched by issue.regex, while {1} refers to the first group and so on. If no {n} tokensare found in issue.link, the entire matched string is appended instead.
换句话说,如果你像这样配置它们
[tortoisehg]
issue.regex = [Ii]ssue(\d+)
issue.link = https://www.mercurial-scm.org/bts/issue{1}
那么您将有一个适合 Mercurial 项目本身的设置:如果提交消息包含文本“issueNNN”或“IssueNNN”,那么 TortoiseHg 现在将把它作为一个链接到用于问题 NNN 的 Mercurial 错误跟踪器。对于 Bitbucket 的问题跟踪器,您需要一个类似的链接
https://bitbucket.org/<user>/<repo>/issue/{1}/
然后在正则表达式中捕获问题编号。之所以可行,是因为 Bitbucket 足够聪明,可以忽略问题编号之后的 URL 的其余部分——你可以在那里写任何你想要的东西,或者像上面那样什么都不写。非常简单的功能,但在您经常根据提交消息查找错误时也非常有用。
关于tortoisehg - 如何将 bitbucket.org 的问题与 TortoiseHg 中的问题跟踪集成?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3987719/