我在所有Trac环境继承的全局配置中定义了一些自定义票证字段。现在,我只想为单个环境删除其中的一些(但不必取消继承全局配置,因为全局配置设置的不仅仅是自定义字段)。
[ticket-custom]
mycustomfield =
不起作用。有办法吗?
不,继承一般没有限制。因此,一旦继承了配置部件,就无法阻止其传播。
你可以构建一个稍微分散一点的继承,而不是放弃继承来实现你的目标:
global_trac.ini:
all the basic, common stuff
[ticket-custom]
put reduced, common set of custom fields here
global_trac_with_custom_fields.ini:
[inherit]
file = ../global_trac.ini
[ticket-custom]
put full set of custom fields here
your_special_trac_env/conf/trac.ini:
[inherit]
file = ../global_trac.ini
some_other_trac_env/conf/trac.ini:
[inherit]
file = ../global_trac_with_custom_fields.ini