Next: , Previous: , Up: Advanced Uses   [Contents][Index]


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-include-pattern

The default global 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-exclude-pattern

The default global 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-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.

delta-direction

This tells monotone whether to store ‘reverse’ deltas (the default), ‘forward’ deltas, or ‘both’ kinds of deltas for reconstructing versions of files. Reverse deltas are faster when inspecting recent files, while forward deltas are much faster for sending over the network. This should probably be set to ‘both’ for a server database, unless disk space is severely limited. Note that as receiving deltas involves reconstructing the file version that the delta was made against, a server using a database with only forward deltas will be somewhat slower at receiving new revisions unless your particular history graph is highly linear.

Changing this value does not affect deltas that have already been stored.

known-workspaces

Records all registered workspaces for the current databases. monotone will track the contents of this variable automatically for you in the background.

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.

server-include

Contains server-specific branch inclusion globs. These overrule default-include-pattern if existant and are recorded automatically the first time you connect to a specific server or use the --set-default option for a netsync operation.

server-exclude

Likewise, this variable contains server-specific branch exclusion globs, which overrule default-exclude-pattern if existant and are also automatically set on the first connection or when the option --set-default is present.


Next: , Previous: , Up: Advanced Uses   [Contents][Index]

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status