anatoly techtonik wrote:
> Done. But I have to patch Trac to provide extension point to my plugin
> and I plugged it in existing class -
> http://trac.edgewall.org/attachment/ticket/781/icachechangesetlistener.diff
> 
> Christian explained that it was rather unusual usage and there was no
> other choice than to use ComponentManager
> http://trac.edgewall.org/ticket/7757#comment:5

Not quite. What he said is that, because the CachedRepository class is
not a Component, you'll have to get access to the environment through
some other means, probably by passing the environment to
CachedRepository.__init__.

But you should *never* instantiate a ComponentManager in Trac. The only
one that should ever exist is the environment.

He also suggested having a look at #7723, where we update the caching
mechanism to work with multiple repositories, and in particular,
introduce an IRepositoryChangeListener, which will probably get an
additional method to notify about revprop changes or something similar
at some point.

> Unfortunately this doesn't happen.

(...)

>   File "/home/.december/trex/fartrac/plugins/mantis_tickets_query.py",
> line 50, in edit_changeset
>     self.log.info("Lookup bug title at Mantis webpage %s" % url)
> AttributeError: 'MantisChangesetQuery' object has no attribute 'log'

Then there's something wrong with the class MantisChangesetQuery. Either
it doesn't inherit from Component, or it isn't initialized correctly.

-- Remy

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to