Next: , Previous: Quality Assurance, Up: Advanced Uses


3.9 Vars

Every monotone database has a set of vars associated with it. Vars are simple configuration variables that monotone refers to in some circumstances; they are used for configuration that monotone needs to be able to modify itself, and that should be per-database (rather than per-user or per-workspace, both of which are supported by monotonerc scripts). Vars are local to a database, and never transferred by netsync.

A var is a name = value pairing inside a domain. Domains define what the vars inside it are used for; for instance, one domain might contain database-global settings, and particular vars inside it would define things like that database's default netsync server. Another domain might contain key fingerprints for servers that monotone has interacted with in the past, to detect man-in-the-middle attacks; the vars inside this domain would map server names to their fingerprints.

You can set vars with the set command, delete them with the unset command, and see them with the ls vars command. See the documentation for these specific commands for more details.

Existing vars

There are several pre-defined domains that monotone knows about:

database
Contains database-global configuration information. Defined names are:
default-exclude-pattern
The default branch exclusion glob pattern for netsync operations to use. Automatically set by first use of netsync, and by any netsync that uses the --set-default option.
default-include-pattern
The default branch glob pattern for netsync operations to use. Automatically set by first use of netsync, and by any netsync that uses the --set-default option.
default-server
The default server for netsync operations to use. Automatically set by first use of netsync, and by any netsync that uses the --set-default option.

known-servers
Contains key hashes for servers that we have netsynced with in the past. Analogous to ssh's known_hosts file, this is needed to detect man-in-the-middle attacks. Automatically set the first time you netsync with any given server. If that server's key later changes, monotone will notice, and refuse to connect until you have run mtn unset known-servers server-name.