Changes between Initial Version and Version 2 of Ticket #11437
- Timestamp:
- Mar 13, 2014, 5:56:43 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11437
- Property Cc added
- Property Milestone undecided → 1.0.2
-
Ticket #11437 – Description
initial v2 1 When the Trac environment is first created the default data is [browser:/branches/1.0-stable/trac/env.py@11981:576#L544 written to trac.ini], which provides a convenience that we don't experience when installing plugin. At least, when the plugin is initially installed, it would be nice to have the default data added to trac.ini. Currently the user must manually type the section and option name if they wish to change any configuration values. I think that most users would expect that the defaults for all configuration values be found in trac.ini. 1 When a Trac environment is first created the default data is [browser:/branches/1.0-stable/trac/env.py@11981:576#L544 written to trac.ini]. However, when installing a plugin the default data is not written to trac.ini. 2 3 When the plugin enabled it would be nice to have the default data added to trac.ini. Currently the user must manually type the section and option name if they wish to change any configuration values. I think that most users would expect that the defaults for all configuration values be found in trac.ini. 2 4 3 5 A quick implementation that is not ideal, but demonstrates the idea is found in log:rjollos.git:t11437. 4 6 5 One issue with the quick implementation is that all of defaults are added, not just those of the plugin being installed. Maybe this is okay, but if a user likes to remove a lot default options to simplify the file, they may be surprised to have their changes undone (#7378).7 One issue with the quick implementation is that all of defaults are written to trac.ini, not just those of the plugin being installed. Maybe this is okay, but if a user likes to remove a lot default options to simplify the file, they may be surprised to have their changes undone (#7378). 6 8 7 9 #8290 had me thinking of a different solution, that plugins could add the information through existing `IEnvironmentParticipant` method, or new methods or helper functions that we add. The downside of course is that every plugin then needs to be modified to implement the behavior. 8 10 9 Side note: it might be useful to have a `trac-admin $ENV config clean` command to remove options from trac.ini that are no longer defined in an enabled Component. For example, with th:AccountManagerPlugin, many options were renamed going from 0.3 -> 0.5, and the users must manually clean up these sections. This comes up rather frequently when users post their configuration sectionto tickets and it contains a mess of old and new configuration options. Of course, it causes no harm to leave them, it is just more confusing and error prone to manage the trac.ini file. We could, by default, create a backup of the trac.ini file whenever //clean// is run.11 Side note: it might be useful to have a `trac-admin $ENV config clean` command to remove options from trac.ini that are no longer defined in an enabled Component. For example, with th:AccountManagerPlugin, many options were renamed going from 0.3 -> 0.5, and the users must manually clean up these sections. This comes up rather frequently when users post their configuration to tickets and it contains a mess of old and new configuration options. Of course, it causes no harm to leave them, it is just more confusing and error prone to manage the trac.ini file. We could, by default, create a backup of the trac.ini file whenever //clean// is run.