post-commit-hooks and plugins

35 views
Skip to first unread message

Sam Halliday

unread,
Oct 3, 2012, 12:30:27 PM10/3/12
to trac-...@googlegroups.com
Hi all,

The new post-commit-hooks system for SVN in 1.0 (and possibly 0.12) looks a lot cleaner than before, with the actual script itself being very sparse and all logic in the trac side of things.

However, I had a post-commit-hook which parsed numbers in brackets and used them for an "hours" field so I could do time tracking from commit logs.

How would I (or bobbysmith007, author of "timing and estimation plugin") go about implementing this functionality?


Regards, Sam

Peter Suter

unread,
Oct 3, 2012, 2:01:22 PM10/3/12
to trac-...@googlegroups.com
On 03.10.2012 18:30, Sam Halliday wrote:
> How would I (or bobbysmith007, author of "timing and estimation plugin")
> go about implementing this functionality?

You could use the same hook script (which calls trac-admin, which
triggers all IRepositoryChangeListener plugins) and write a small
IRepositoryChangeListener plugin. [1]

The CommitTicketUpdater is actually itself such a plugin, so you could
just take that as an example. [2]

--
Peter

[1]
http://trac.edgewall.org/wiki/TracDev/ApiChanges/0.12#IRepositoryChangeListener
[2]
http://trac.edgewall.org/browser/trunk/tracopt/ticket/commit_updater.py#L60
Reply all
Reply to author
Forward
0 new messages