On 3/14/13 10:13 AM, Peter Koželj wrote:
Maybe there is a solution in between pure soft links and repository table
translation.
I would go with links which is classical many-to-many table between
products and repositories.
We can then translate the repository table based on the links table instead
of the repository table itself.
If we can can pull this off on the SQL translation level we get "global
repositories" with translated view in product context almoast for free.
Looking at the trac code, we might actually get away w/o introducing new
tables (or changes to the translator layer) by just leveraging current
'repository' table.
afaics the table is a simple attribute (name+value) table for each of
the repositories. So one of the possible solutions for the global
repositories + soft links would be to simply add another repository
attribute that would represent a list of products that 'soft link' the
repository... no database schema/translator changes required... other
changes would include (at least) modifying
'trac.versioncontrol.api.DbRepositoryProvider' and
'trac.versioncontrol.api.RepositoryManager' to properly 'filter'
repositories based on the environment ...
Cheers,
Jure