Currently, this (loading configured hooks) has been implemented just before opening the environment within trac.web.main.dispatch_request (when the environment & it's path is already known/resolved). The hook paths are loaded from the selected environment's trac.ini and executed appropriately. As this is enough when processing requests within already selected environment, it does not cover tests and other code that might use trac.env.Environment and/or trac.db.IterableCursor (these are the two classes that get replaced atm) out of the (selected) environment request scope.

So I was playing with an idea to introduce global.ini (or boot.ini or something like that) that would be located on a well-known location in the installation tree (trac.env_parent_dir for example) and would hold global (=common for all environments) settings (custom hooks for starters). The question is where this configuration is supposed to be loaded/processed. trac/__init__.py would be one place but I'm not sure that's the right one :)

Any suggestions/comments on this?

Cheers,
Jure


On 1/2/13 7:45 AM, Apache Bloodhound wrote:
#323: Add support for custom hooks configurable through trac.ini
-----------------------------------+------------------
  Reporter:  jure                   |      Owner:  jure
      Type:  enhancement            |     Status:  new
  Priority:  major                  |  Milestone:
Component:  multiproduct           |    Version:
  Keywords:  bep-0003 multiproduct  |
-----------------------------------+------------------
  Multiproduct legacy data schema support (#288) requires `IterableCursor`
  and `Environment` classes to be replaced by custom implementation(s). trac
  code should be changed to invoke configurable 'hooks'. This would enable
  bloodhound_multiproduct plugin to install custom class implementation(s).


Reply via email to