Configuration files

Repository.config

Get the configuration file for this repository.

If a configuration file has not been set, the default config set for the repository will be returned, including global and system configurations (if they are available).

The Config type

Config.get_system_config() → Config

Return an object representing the system configuration file.

Config.get_global_config() → Config

Return an object representing the global configuration file.

Config.foreach(callback[, payload]) → int

Perform an operation on each config variable.

The callback must be of type Callable and receives the normalized name and value of each variable in the config backend, and an optional payload passed to this method. As soon as one of the callbacks returns an integer other than 0, this function returns that value.

Config.add_file(path, level=0, force=0)

Add a config file instance to an existing config.

Config.get_multivar(name[, regex]) → [str, ...]

Get each value of a multivar ‘’name’’ as a list. The optional ‘’regex’’ parameter is expected to be a regular expression to filter the variables we’re interested in.

Config.set_multivar(name, regex, value)

Set a multivar ‘’name’’ to ‘’value’‘. ‘’regexp’’ is a regular expression to indicate which values to replace

The Config Mapping interface.

Table Of Contents

Previous topic

Merge

Next topic

Remotes

This Page