Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#8288 closed enhancement (duplicate)

Variable substitution and other goodies in trac.ini

Reported by: alvaro.iradier@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.12dev
Severity: normal Keywords: config variables inherit
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

It would be useful to include some variable substitutions when processing trac.ini.

Example ONE

[trac]
authz_module_name = ${PROJECT_NAME}

would translate ${PROJECT_NAME} into the short project name (the folder name).

¿What situation would this be useful in? Considering in some setups, where using a parent environments folder, and a parent subversion repository folder, where each trac env uses a different subversion repo (usually with the same name), this authz_module_name option would be included in the global trac.ini and inherited by all projects.

Example TWO

Inherit the value defined in the global trac.ini, like:

[trac]
repository_dir = ${INHERIT}/transporte

So, the global trac.ini could define the base parent repository_dir, and each project the subdirectory. If the parent SVN folder is moved or renamed, only changing the global trac.ini is necessary.


Please add more examples and situations where this could be useful.

Attachments (0)

Change History (2)

comment:1 by ebray, 15 years ago

I like the syntax buildout uses for this: ${section:option}. Would definitely be useful to me.

comment:2 by osimons, 15 years ago

Resolution: duplicate
Status: newclosed

The need has been raised at various times, and I'm going to close this as a duplicate of #7573 and make a note on that ticket about these suggestions.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.