Re: [CPyUG] SVN提交时关闭Trac的ticket

19 views
Skip to first unread message

Zoom.Quiet

unread,
Jan 14, 2011, 2:38:23 AM1/14/11
to pyth...@googlegroups.com, trach...@googlegroups.com
在 2011年1月14日 下午3:29,twinsant <twin...@gmail.com> 写道:
> 总结自己的教训,简化大家以后遇到这个问题的对策:
>
> 用trac admin或修改trac.ini 增加tracopt.ticket.commit_updater.*=enabled
> 把trac.ini里的repository_sync_per_request设置成空
> cp
> /path/to/repository/hooks里的post-commit.tmpl和post-revprop-change.tmpl到post-commit和post-revprop-change
>
> 蚂蚁一直忽略了这句话,认为hooks下的文件直接生效,所以老琢磨为啥后面的修改不生效,这说明不认真看文档真可怕阿!
>

嗯嗯嗯,对E文反应不敏感,,,
所以,RTFM 永远是提问前第一步准备...

PS:
0.12 靠谱到可以支持多种仓库的同时影响检入自动传票变更!
比如说:
- SVN 仓库管理文档
- Hg 仓库分多个子仓库包含多个产品开发线
统一在trac 中,影响所有传票的 代码检入处置

PPS:
有关 trac 的欢迎来 trachinese 列表分享...

> the easiest way to install a hook on Unix platforms is to simply copy the
> appropriate template file to a new file that lacks the .tmpl extension
>
> 各自增加
>
> trac-admin /path/to/trac/env changeset added "$REPOS" "$REV"
> trac-admin /path/to/trac/env changeset modified "$REPOS" "$REV"
>
>
> 2010/12/31 jinguoli <micro...@gmail.com>
>>
>>
>> 2010/12/31 twinsant <twin...@gmail.com>
>>>
>>>
>>> 2010/12/31 Zoom.Quiet <zoom....@gmail.com>
>>>>
>>>> 在 2010年12月31日 上午10:09,twinsant <twin...@gmail.com> 写道:
>>>> >  谢谢回复,修改了trac.ini还是不成。
>>>> >
>>>> > 如何安装:post-commit hook?
>>>> >
>>>>
>>>> http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks
>>>>
>>>> 你得先明白 SVN 和 Trac 的关系:
>>>> - 两者没有任何关系!
>>>> - Trac 是项目管理系统,可以关联多种版本仓库不仅仅是SVN
>>>> - 对SVN 的提交行为,天然的和任何外部系統没有任何关系!
>>>> - 所以,SVN 有Hook 接口,可以扩展影响关键的6种行为,自动调用定制的脚本来交互外部系统
>>>> - 所以,Trac 开放丰富的API,可以通过各种渠道来自动化控制各种Trac 元素!
>>>> 是也乎,是也乎
>>>>
>>>> User->SVN->hook->Trac plugin->Ticket
>>>>
>>>> 所以,想通过 ci 行为来自动化变更 Trac 的传票,是个联级行为:
>>>> - 你得先配置好 ci 的 hooks ,并测试成功
>>>
>>> 哪里有ci的hooks教程呢?
>>>
>>>> - 再安装好对应的Trac 插件,并测试成功
>>>
>>> trac 0.12自带插件么?
>>
>>
>> 其实你仔细看文档这些东西都是有的。
>> http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync
>>
>>>
>>>
>>>>
>>>> - 然后,联调,并测试确认可用
>>>>
>>>>
>>>> > 2010/12/31 jinguoli <micro...@gmail.com>
>>>> >>
>>>> >> Automatic reference to the SVN changesets in Trac tickets
>>>> >>
>>>> >> You can configure SVN to automatically add a reference to the
>>>> >> changeset
>>>> >> into the ticket comments, whenever changes are committed to the
>>>> >> repository.
>>>> >> The description of the commit needs to contain one of the following
>>>> >> formulas:
>>>> >>
>>>> >> Refs #123 - to reference this changeset in #123 ticket
>>>> >> Fixes #123 - to reference this changeset and close #123 ticket with
>>>> >> the
>>>> >> default status fixed
>>>> >>
>>>> >> This functionality requires a post-commit hook to be installed as
>>>> >> described in TracRepositoryAdmin, and enabling the optional commit
>>>> >> updater
>>>> >> components by adding the following line to the [components] section
>>>> >> of
>>>> >> your trac.ini, or enabling the components in the "Plugins" admin
>>>> >> panel.
>>>> >>
>>>> >> tracopt.ticket.commit_updater.* = enabled
>>>> >>
>>>> >> For more information, see the documentation of
>>>> >> the CommitTicketUpdater component in the "Plugins" admin panel.
>>>> >>
>>>> >>
>>>> >> 2010/12/30 twinsant <twin...@gmail.com>
>>>> >>>
>>>> >>> 哪位前辈指点下?目前我们配置的Trac好像无法在svn ci注释里关闭ticket了。。。
>>>> >>>
>>>>
>>>> ...
>>>>
>>>> --
>>>> 人生苦短, Pythonic!
>>>> 俺: http://about.me/zoom.quiet
>>>> 开: http://code.ijinshan.com/
>>>> 豆: http://www.douban.com/group/zoomquiet
>>>> 书: http://code.google.com/p/openbookproject
>>>> 蟒: http://code.google.com/p/kcpycamp/wiki/PythoniCamp
>>>>
>>>> --
>>>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>>>> 发言: pyth...@googlegroups.com
>>>> 退订: python-cn+...@googlegroups.com (向此发空信即退!)
>>>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>>>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>>>
>>> --
>>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>>> 发言: pyth...@googlegroups.com
>>> 退订: python-cn+...@googlegroups.com (向此发空信即退!)
>>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>>
>>
>>
>> --
>> jinguoli
>> 我的世界,我的精彩
>> http://jinguoli.me
>>
>> --
>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>> 发言: pyth...@googlegroups.com
>> 退订: python-cn+...@googlegroups.com (向此发空信即退!)
>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>
> --
> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> 发言: pyth...@googlegroups.com
> 退订: python-cn+...@googlegroups.com (向此发空信即退!)
> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>

--
人生苦短, Pythonic! 冗余不做,日子甭过!备份不做,十恶不赦!
俺: http://about.me/zoom.quiet
开: http://code.ijinshan.com/
豆: http://www.douban.com/group/zoomquiet
书: http://code.google.com/p/openbookproject
蟒: http://code.google.com/p/kcpycamp/wiki/PythoniCamp

Zoom.Quiet

unread,
Jan 14, 2011, 4:09:58 AM1/14/11
to pyth...@googlegroups.com, trach...@googlegroups.com
收录:
http://wiki.woodpecker.org.cn/moin/MiscItems/2011-01-14

在 2011年1月14日 下午4:11,twinsant <twin...@gmail.com> 写道:
>
>
> 2011/1/14 Zoom.Quiet <zoom....@gmail.com>


>>
>> 在 2011年1月14日 下午3:29,twinsant <twin...@gmail.com> 写道:
>> > 总结自己的教训,简化大家以后遇到这个问题的对策:
>> >
>> > 用trac admin或修改trac.ini 增加tracopt.ticket.commit_updater.*=enabled
>> > 把trac.ini里的repository_sync_per_request设置成空
>> > cp
>> >
>> > /path/to/repository/hooks里的post-commit.tmpl和post-revprop-change.tmpl到post-commit和post-revprop-change
>> >
>> > 蚂蚁一直忽略了这句话,认为hooks下的文件直接生效,所以老琢磨为啥后面的修改不生效,这说明不认真看文档真可怕阿!
>> >
>>
>> 嗯嗯嗯,对E文反应不敏感,,,
>> 所以,RTFM 永远是提问前第一步准备...
>

> 坦率说,那个文档重点不突出,用户体验极差。。。

--

Reply all
Reply to author
Forward
0 new messages