简体   繁体   English

我可以重复使用Mercurial配置项吗?

[英]Can I reuse a Mercurial config item?

Here is what I mean: 这是我的意思:

[paths]
default = some/path/to/something
another_path = [paths.default]/something/else

Can it be done somehow? 能以某种方式完成吗?

Thanks ;) 谢谢 ;)

No, the Mercurial config format has no concept of variables or re-use. 不,Mercurial配置格式没有变量或重复使用的概念。

See the hgrc documentation : 请参阅hgrc文档

The values are either free-form text strings, lists of text strings, or Boolean values. 这些值可以是自由格式的文本字符串,文本字符串列表或布尔值。 Boolean values can be set to true using any of "1", "yes", "true", or "on" and to false using "0", "no", "false", or "off" (all case insensitive). 布尔值可以使用“ 1”,“ yes”,“ true”或“ on”中的任何一个设置为true,并使用“ 0”,“ no”,“ false”或“ off”设置为false(所有大小写均不区分大小写) )。

Individual settings may support some form of variable parsing, but this does not apply to values in the configuration file in general. 单个设置可能支持某种形式的变量解析,但这通常不适用于配置文件中的值。 Variable support (environment or otherwise) is the exception, not the norm. 可变支持(环境或其他)是例外,不是常规。 For example, %include (to include another configuration file) does support environment variables via the Python os.path.expandvars() function , but this does not apply to any other syntax. 例如, %include (包括另一个配置文件)确实通过Python os.path.expandvars()函数支持环境变量,但这不适用于任何其他语法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM