我的Trac学习经验

 

All thing is on google:trac – The Trac Project. My knowledge about Trac is just 1%100 of the website.

The dependency relationship:

dependency

 

I only use Trac and Subversion, for information about Apache + Trac + Subversion, read google: trac 手记.

The internal relationship of Trac is:

internal

 

These are something noticeable:

1.       Trac on Windows should start with Trac on windows – The Trac Project; or Trac on *, just go to Trac FAQ.

2.    “easyinstall” is the best convenient way to install a plugin or Trac. You can find plugins and other kind extension(script, macro, ect.) at Trac Hacks, you also can the information about how to them, you should notice that the usages of plugins are not the same. Almost all of them need settings in trac.ini. Some of them can be set under admin(if you install the accountmanagerplugin, you can see it on the front page of the Trac project). You can add the plugin name, or the link, like http://trac-hacks.org/svn/accountmanagerpluginafter it.

3.    Some very useful plugin include:

·         Advancedticketworkflowplugin: Advanced workflow operations Trac plugin

·         Autocompleteusers: complete the known trac users, AJAX style

·         Tracaccountmanager: User account management plugin for Trac

·         Tracspamfilter: Plugin for spam filtering

4.       When the trac.ini changed, the Trac web server should restart.

5.       The TicketCreationStatus is “new”, when you custom you own ticket workflow, unless you install a plugins such as “TicketCreationStatus”, you should note this.

Otherwise, your ticket workflow would not run.

6.    What is macros on Trac? Macro is a convenient sentence that can do many thing. In C, you can use macro, while in Trac, when you edit a wiki page, you can use it to display some useful information.

7.    Workflow is the lifecycle of a ticket. What is ticket? Thicket is a message, such as bug, task, etc. that one user pass to another. You can custom a project’s workflow in its trac.ini file(at conf folder), below the [ticket-workflow]. The workflow of Trac is action based. Trac workflows are build around actions and moving from one state to another, rather than around states and the actions that can be performed in that state. You define an action, for example: action_name = status_name [, status_name] -> [*|status_name], and if a ticket’s status is at the left side of the ->, the you can see the action in the action list, when you view this ticket.

8.    You can start with Custom Workflows - Getting started and testing your workflow to create your own ticket workflow.

9.    If You want duplicate a trac project, just duplicate the folder of the trac project. Specially, the db/trac.db is the file store wiki page and ticket(maybe, I didn't test it), and the attachments/* store the attachments for a page, and conf/password store the user configuration. You can duplicate them independently.

 

BAKUP

Custom Workflows - Getting started and testing your workflow

I've been meaning to write this up for a while, but just don't seem to get around to it. Custom workflows in Trac 0.11 are probably the coolest new feature in it. That and the supremely easy install and upgrade facilities via the python setuptools, easy_install command. Trac 0.11 Install Whilst I do love how easy installing trac has become that even Big Mad Kev can install it ;oD, this isn't about configuring trac with apache and svn. You can find that out from Andy Allan's posts, as well as my own "svn for idiots" post and from the Edgewall wiki, so I'll shut up and crack on.To build your own trac workflows you are going need a few things.
Firstly, you're going to need to have Python and Trac installed.
Secondly, I highly recommend installing GraphVis
Lastly, you will at least need the contrib/workflow folder out of the trac svn trunk folder.
Starting with the last of these; why do you need this? and how do I get it?
The why is because there are some example workflows and a couple of utilities. 
The how is from the command line like this :svn export http://svn.edgewall.org/repos/trac/trunk/contrib/workflow/ workflowThis will export the workflow folder from the trac repo into a folder called "workflow" under the folder you are currently in.
You need to have subversion installed to run this command line or you can simply point subclipse or subversive in eclipse at the trac repository and pull the folder into eclipse. One of the utilities is "showworkflow". This is a handy utility is you're on *nix as it will generate a graphical representation of your workflow in a PDF. This requires that you have graphviz, that I mention above, installed. 
If you're on windows, don't worry. The other utility in the contrib folder is a python script called workflow_parser.py. This utility is the reason why I say you need Python and Trac installed. Running this script against your workflow will generate a file that you can give to graphviz, which will then generate a visual representation of your workflow in any number of file types.
This script, unfortunately, isn't standalone and does import a couple of elements from your trac installation, so you will need python and trac available to run it. Here's how to call the workflow parser:python workflow_parser.py simple-workflow.ini > simple-workflow.dotYou need to pass in the ini file and pipe the output to a file. By default workflow_parser.py streams the file to the console. Having installed GraphViz, you'll find a three utilities available to you; dot, neato and twopi. They all seem to me to give pretty much the same output, but dot seems to give the clearest layout. Open up dot and you'll get a utility that looks like this.

GraphViz dot utilty

You don't have to do a lot with this. 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值