Ticket #3620 (closed defect: fixed)
Opened 5 years ago
Last modified 5 years ago
system defaults in new trac.ini override global trac.ini
| Reported by: | cpinto@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10 |
| Component: | admin/console | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
I have defined a set of standard settings in a global trac.ini file and after doing a trac-admin initenv for a new project I noticed that the trac.ini settings for the project did contain keys defined in the global file with different values.
Attachments
Change History
Changed 5 years ago by cpinto@…
- Attachment trac.ini_global added
Changed 5 years ago by cpinto@…
- Attachment trac.ini_project added
the project's trac.ini after initenv
comment:1 Changed 5 years ago by mgood
- Keywords needinfo added
- Summary changed from trac-admin incorrectly creates a project's trac.ini settings based in global trac.ini settings to system defaults in new trac.ini override global trac.ini
What are you expecting the behavior to be? trac-admin always initializes trac.ini with the standard Trac default values. I guess you were expecting that the new trac.ini would either copy the values from the global config, or omit them so they didn't override the global config.
comment:2 Changed 5 years ago by coderanger@…
comment:3 Changed 5 years ago by anonymous
er, make that if not ...
comment:6 Changed 5 years ago by ilias@…
I would suggest to ommit the values which exist in the global.ini.
Currently I have to manually delete the created entries.
Changed 5 years ago by cboos
- Attachment comment_out_globally_set_options-r3717.diff added
Possible fix for the issue: special case the None value to be an indicator of a globally set configuration option.
comment:7 Changed 5 years ago by cboos
- Keywords review added; needinfo removed
- Owner changed from daniel to cboos
- Status changed from new to assigned
An other possibility: attachment:comment_out_globally_set_options-r3717.diff
With this solution, the entry will be written, but commented out, indicating that the actual value is taken from the global trac.ini file.
This solution makes it easy to:
- fill in a different the value to override the globally configured one
- automatically take into account changes in the global trac.ini
comment:8 Changed 5 years ago by cboos
Any comment on the patch? Otherwise, I'll proceed and commit it later today.
comment:9 Changed 5 years ago by cboos
- Keywords review removed
- Resolution set to fixed
- Status changed from assigned to closed
Above patch committed in r3744.



the global trac.ini file (I've appended a _global suffix so that the file isn't overridden)