如何让 Trac (CommitTicketUpdater) w/Mercurial 关闭|解决提交时的票证?
我的快速问题是: 一切似乎都正常,只是 Trac 票证在提交时没有获得状态更新。更改集注释已附加到票证中,但票证本身并未得到解决
我刚刚完成了此设置:
- Windows 7 x64
- IIS 7.5
- isapi-wsgi 0.4.2
- Python27 32
- 水银1.8
- 跟踪0.12
我已经运行 Trac 并与存储库链接(我可以查看变更集、浏览等)
我使用 AD 进行身份验证,因此我的所有用户名均采用以下格式:MYDOMAIN\bbarker
设置CommitTicketUpdater > 按照此处的说明进行操作。
当我提交新代码并链接到票证时:
$ hg commit -m "[修复 #1] - 等等等等..."
$hg 推
Trac 将变更集附加到票证中:
5 秒前由 MYDOMAIN\bbarker 更改
在[29283792837498273948729374]中:
[修复 #1] - 等等等等......
(上面的 #1 是票证的链接)
但无论我如何尝试,票证状态都不会更新。
我还需要做些什么才能让它发挥作用吗?
下面是我的设置片段
trac.ini
[组件]
traceext.hg.* = 已启用
tracopt.ticket.commit_updater.* = 已启用
tracopt.ticket.commit_updater.committicketreferencemacro = 已启用
tracopt.ticket.commit_updater.committicketupdater = 启用[hg]
节点格式=短
show_rev = 是[门票]
...
commit_ticket_update_envelope = []
commit_ticket_update_commands.close =
commit_ticket_update_commands.refs = <全部>
commit_ticket_update_check_perms = true
commit_ticket_update_notify = true[轨迹] ... repository_dir = C:\repositories\project
repository_sync_per_request = 默认
存储库类型 = hg
.hg/hgrc
[挂钩]
;如果 Mercurial-plugin 安装在 Trac 插件目录中
提交 = python:C:\Trac\hooks.py:add_changesets
更改组 = python:C:\Trac\hooks.py:add_changesets[轨迹]
env = C:\Trac\tracproject
trac-admin = C:\Python27\Scripts\trac-admin.exe
My Quick Question is this: Everything seems to be working, except that Trac tickets don't get status updates upon commit. Change-set notes are appended to the ticket, but the tickets themselves are not being resolved
I've just done this setup:
- Windows 7 x64
- IIS 7.5
- isapi-wsgi 0.4.2
- Python27 32
- Mercurial 1.8
- Trac 0.12
I've got Trac running and linked up with the repo (I can view the changesets, browse etc)
I'm using AD for auth, so all my usernames are in this format: MYDOMAIN\bbarker
Setup the CommitTicketUpdater following the instructions here.
When I commit new code, and link to a ticket:
$ hg commit -m "[fixes #1] - blah blah blah..."
$ hg push
Trac appends a change-set to the ticket:
Changed 5 seconds ago by MYDOMAIN\bbarker
In [29283792837498273948729374]:
[fixes #1] - blah blah blah...
(The #1, above, is a link to the ticket)
But the ticket status is never updated, no matter what I try.
Is there anything additional I need to be doing to get this to work?
below are snippets of my settings
trac.ini
[components]
tracext.hg.* = enabled
tracopt.ticket.commit_updater.* = enabled
tracopt.ticket.commit_updater.committicketreferencemacro = enabled
tracopt.ticket.commit_updater.committicketupdater = enabled[hg]
node_format = short
show_rev = yes[ticket]
...
commit_ticket_update_envelope = []
commit_ticket_update_commands.close =
commit_ticket_update_commands.refs = <ALL>
commit_ticket_update_check_perms = true
commit_ticket_update_notify = true[trac]
...
repository_dir = C:\repositories\project
repository_sync_per_request = default
repository_type = hg
.hg/hgrc
[hooks]
; If mercurial-plugin is installed in a Trac plugins directory
commit = python:C:\Trac\hooks.py:add_changesets
changegroup = python:C:\Trac\hooks.py:add_changesets[trac]
env = C:\Trac\tracproject
trac-admin = C:\Python27\Scripts\trac-admin.exe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
唷!明白了...
接下来,到“T”,来自 Trac 网站的指示是我的错误。
我想是吧。
基本上,我已将其从上述站点复制到我的 trac.ini 文件中:
阅读下面的内容后,我只是假设将 commit_ticket_update_commands.close 保留为空值将采用默认值。
这实际上将默认值覆盖为空值,这解释了为什么所有命令都不起作用,但我的提交消息仍然附加到相应的票证中。
因此,只需删除或注释掉 .ini 中的该行就可以解决我的问题
(或者,没有覆盖默认值)
因此,经过一些调试、测试、网络搜索后,我真的只需要重新查看 Trac 提供的说明。现在回想起来,这是非常明显的:)
Phew! Got it...
Following, to the 'T', the directions from the Trac site was my error.
Well kind of, I guess.
I had, basically, copied this from the above site into my trac.ini file:
Reading the below I just assumed that leaving the commit_ticket_update_commands.close to an empty value would assume defaults.
This actually overwrites the defaults to an empty value, which explains why none of the commands worked, yet my commit messages were still being appended to the corresponding tickets.
So simply removing, or commenting out, that line in the .ini resolved my problem
(or, didn't override the defaults)
So after some debugging, testing, web scouring, I really just needed to re-look at the instructions provided by Trac. It's pretty obvious looking back on it now :)