Integrate with triggers and the activity module
Damien Tournoud - June 21, 2009 - 23:35
| Project: | Version Control API |
| Version: | 6.x-1.0-rc2 |
| Component: | API module |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
To be able to implement the "timeline" feature of Trac, you will need to create a trigger for commits, define tokens for version control operations and integrate operations with the activity module.

#1
Here is a first shot at this. Very early release, there are several issues in the activity module that make it impossible to implement that properly for now.
#2
There's already an implementation of hook_token_list() and hook_token_values() in versioncontrol.rules.inc, we might want to merge these two (generally, I find your token names more sensible) and put the token hooks into versioncontrol.module itself.
Also, VERSIONCONTROL_OPERATION_{BRANCH,TAG} is not necessarily the creation of a branch/tag, but might also tell that the branch/tag is renamed or deleted. Lacking conditions, triggers are generally not smart enough to handle that kind of distinction, so we might split those cases up into different trigger hooks.
Other than that, the patch looks good.