5
Information on how to configure Bazaar.
7
Location of configuration files
8
===============================
9
Each user gets a pair of configurations files in ``$HOME/.bazaar``. The first
10
one, named ``bazaar.conf``, includes default configuration options. The other
11
file, ``locations.conf``, contains configuration information for specific
12
branch locations. These files are sometimes referred to as ``ini files``.
14
Each branch can also contain a configuration file that sets values specific
15
to that branch. This file is found at ``.bzr/branch/branch.conf`` within the
16
branch. This file is visible to all users of a branch, if you wish to override
17
one of the values for a branch with a setting that is specific to you then you
18
can do so in ``locations.conf``.
22
An ini file has three types of contructs: section headers, section
23
variables and comments.
27
A comment is any line that starts with a "#" (sometimes called a "hash
28
mark", "pound sign" or "number sign"). Comment lines are ignored by
29
Bazaar when parsing ini files.
33
A section header is a word enclosed in brackets that starts at the begining
34
of a line. A typical section header looks like this::
38
The only valid section header for bazaar.conf is [DEFAULT], which is
39
case sensitive. The default section provides for setting variables
40
which can be overridden with the branch config file.
42
For ``locations.conf``, the variables from the section with the
43
longest matching section header are used to the exclusion of other
44
potentially valid section headers. A section header uses the path for
45
the branch as the section header. Some examples include::
47
[http://mybranches.isp.com/~jdoe/branchdir]
48
[/home/jdoe/branches/]
54
A section variable resides within a section. A section variable contains a
55
variable name, an equals sign and a value. For example::
57
email = John Doe <jdoe@isp.com>
58
check_signatures = require
64
Variables defined in a section affect the named directory or URL plus
65
any locations they contain. Policies can be used to change how a
66
variable value is interpreted for contained locations. Currently
67
there are three policies available:
70
the value is interpreted the same for contained locations. This is
71
the default behaviour.
73
the value is only used for the exact location specified by the
76
for contained locations, any additional path components are
77
appended to the value.
79
Policies are specified by keys with names of the form "$var:policy".
80
For example, to define the push location for a tree of branches, the
81
following could be used::
84
push_location = sftp://example.com/location
85
push_location:policy = appendpath
87
With this configuration, the push location for ``/top/location/branch1``
88
would be ``sftp://example.com/location/branch1``.
91
The main configuration file, bazaar.conf
92
----------------------------------------
94
The main configuration file, ``$HOME/.bazaar/bazaar.conf``, only allows one
95
section called ``[DEFAULT]``. This default section contains the default
96
configuration options for all branches. The default section can be
97
overriden by providing a branch-specific section in ``locations.conf``.
99
A typical ``bazaar.conf`` section often looks like the following::
102
email = John Doe <jdoe@isp.com>
103
editor = /usr/bin/vim
104
check_signatures = check-available
105
create_signatures = when-required
107
``$HOME/.bazaar/locations.conf`` allows one to specify overriding settings for a
108
specific branch. The format is almost identical to the default section in
109
bazaar.conf with one significant change: The section header, instead of
110
saying default, will be the path to a branch that you wish to override a
111
value for. The '?' and '*' wildcards are supported::
113
[/home/jdoe/branches/nethack]
114
email = Nethack Admin <nethack@nethack.com>
116
[http://hypothetical.site.com/branches/devel-branch]
117
create_signatures = always
118
check_signatures = always
120
[http://bazaar-vcs.org/bzr/*]
121
check_signatures = require
123
Common Variable Options
124
=======================
128
The email address to use when committing a branch. Typically takes the form
131
email = Full Name <account@hostname.tld>
135
The path of the editor that you wish to use if *bzr commit* is run without
136
a commit message. This setting is trumped by the environment variable
137
``$BZR_EDITOR``, and overrides ``$VISUAL`` and ``$EDITOR``.
141
Defines the behavior for signatures.
144
The gnupg signature for revisions must be present and must be valid.
147
Do not check gnupg signatures of revisions.
150
(default) If gnupg signatures for revisions are present, check them.
151
Bazaar will fail if it finds a bad signature, but will not fail if
152
no signature is present.
156
Defines the behaviour of signing revisions.
159
Sign every new revision that is committed.
162
(default) Sign newly committed revisions only when the branch requires
166
Refuse to sign newly committed revisions, even if the branch
171
Only useful in ``locations.conf``. Defines whether or not the
172
configuration for this section applies to subdirectories:
175
(default) This section applies to subdirectories as well.
178
This section only applies to the branch at this directory and not
183
(Default: "gpg"). Which program should be used to sign and check revisions.
186
gpg_signing_command = /usr/bin/gnpg
190
(Default: "localhost"). SMTP server to use when Bazaar needs to send
191
email, eg. with ``merge-directive --mail-to``, or the bzr-email plugin.
193
smtp_username, smtp_password
194
----------------------------
195
User and password to authenticate to the SMTP server. If smtp_username
196
is set, and smtp_password is not, Bazaar will prompt for a password.
197
These settings are only needed if the SMTP server requires authentication
204
These options apply only to branches that use the "experimental-branch6"
205
format. They are usually set in ``.bzr/branch/branch.conf`` automatically, but
206
may be manually set in ``locations.conf`` or ``bazaar.conf``.
208
append_revisions_only
209
---------------------
210
If set to "True" then revisions can only be appended to the log, not
211
removed. A branch with this setting enabled can only pull from
212
another branch if the other branch's log is a longer version of its
213
own. This is normally set by ``bzr init --append-revisions-only``.
217
If present, the location of the default branch for pull or merge.
218
This option is normally set by ``pull --remember`` or ``merge
223
If present, the location of the default branch for push. This option
224
is normally set by ``push --remember``.
228
The location that commits should go to when acting as a checkout.
229
This option is normally set by ``bind``.
233
If set to "True", the branch should act as a checkout, and push each commit to
234
the bound_location. This option is normally set by ``bind``/``unbind``.