Hi all,
I'm currently working on a plugin that publishes trac
changes via IRC
to a channel. The first thing I had to add was a commit hook
that
creates a trac environment, gets the repo, syncs it and then
call my
newly created ICommitListener. Then I looked at some other
plugins
(reposearch, the codetags plugin which is currently broken
because we
were too lazy to write a commit hook) and they are all
suffering from
a missing ICommitListener.
It would be very simple to add that listener and trigger it
via a
generic hook. This listener could look like this::
class ICommitListener(Interface):
def after_commit(chgset):
pass
It would also be possible to add a "before_commit"
that could stop the
commit but for that the versioncontrol api would need an
update.
The current trac-post-commit-hook script could then call
the
after_commit functions of all those implementors and the
current
"ticket-updating" goes into the trac core as
regular component. It's
not a problem that the execution of those after_commit does
not happen
in the context of the webserver most of the time, the only
problem i
see is that the useres might be different. But for that it
would be
enough to add a warning to the configuration page that tells
the user
to use the same users contexts for both the web server and
the svn/hg
user. Most of the time those are the same anyways.
Regards,
Armin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Trac Development" group.
To post to this group, send email to trac-dev googlegroups.com
To unsubscribe from this group, send email to
trac-dev-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---
|