Hello. This is on 0.10.4, however, trunk doesn't seem to be so much  
different.


I am trying to rewrite some of my modifications to Trac to be  
extensions, so that they require fewer changes to the trac source  
base.  However, there aren't always the extension points needed. I am  
trying to add an extension point that is called when the revision  
cache is updated, and also when a 'resync' is done, so that I can add  
a table to map from revision # to ticket #.   So I am trying to add  
this extension point:

class IRepositoryObserver(Interface):
     """Observe when a revision has 'changed'."""

     def revision_changed(log, cset, cursor, next_youngest):

     def repository_resync(cursor):


.. however, I am finding that not everywhere in trac is set up to  
call extensions - the container must be a Component.
Making Repository a Component gave another complaint about missing  
unicode.

I found I can add this to the top of class CachedRepository ( as  
inspired by the ComponentArchitecture page ):

            compmgr = ComponentManager()

and it seems to work. Is this a good idea?


Note, please don't consider my example above to be a request for a  
new extension point, just yet, and certainly not  necessarily (or  
likely) to be a good API for same. I'm still learning python...



-s


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to