5
Information on how to configure Bazaar.
7
.. TODO: Should have some explanation of why you'd want things in
10
Location of configuration files
11
===============================
12
Each user gets a pair of configurations files in ``$HOME/.bazaar``. The first
13
one, named ``bazaar.conf``, includes default configuration options. The other
14
file, ``locations.conf``, contains configuration information for specific
15
branch locations. These files are sometimes referred to as ``ini files``.
17
Each branch can also contain a configuration file that sets values specific
18
to that branch. This file is found at ``.bzr/branch/branch.conf`` within the
19
branch. This file is visible to all users of a branch, if you wish to override
20
one of the values for a branch with a setting that is specific to you then you
21
can do so in ``locations.conf``.
25
An ini file has three types of contructs: section headers, section
26
variables and comments.
30
A comment is any line that starts with a "#" (sometimes called a "hash
31
mark", "pound sign" or "number sign"). Comment lines are ignored by
32
Bazaar when parsing ini files.
36
A section header is a word enclosed in brackets that starts at the begining
37
of a line. A typical section header looks like this::
41
The only valid section header for bazaar.conf is [DEFAULT], which is
42
case sensitive. The default section provides for setting variables
43
which can be overridden with the branch config file.
45
For ``locations.conf``, the variables from the section with the
46
longest matching section header are used to the exclusion of other
47
potentially valid section headers. A section header uses the path for
48
the branch as the section header. Some examples include::
50
[http://mybranches.isp.com/~jdoe/branchdir]
51
[/home/jdoe/branches/]
57
A section variable resides within a section. A section variable contains a
58
variable name, an equals sign and a value. For example::
60
email = John Doe <jdoe@isp.com>
61
check_signatures = require
67
Variables defined in a section affect the named directory or URL plus
68
any locations they contain. Policies can be used to change how a
69
variable value is interpreted for contained locations. Currently
70
there are three policies available:
73
the value is interpreted the same for contained locations. This is
74
the default behaviour.
76
the value is only used for the exact location specified by the
79
for contained locations, any additional path components are
80
appended to the value.
82
Policies are specified by keys with names of the form "$var:policy".
83
For example, to define the push location for a tree of branches, the
84
following could be used::
87
push_location = sftp://example.com/location
88
push_location:policy = appendpath
90
With this configuration, the push location for ``/top/location/branch1``
91
would be ``sftp://example.com/location/branch1``.
94
The main configuration file, bazaar.conf
95
----------------------------------------
97
The main configuration file, ``$HOME/.bazaar/bazaar.conf``, only allows one
98
section called ``[DEFAULT]``. This default section contains the default
99
configuration options for all branches. The default section can be
100
overriden by providing a branch-specific section in ``locations.conf``.
102
A typical ``bazaar.conf`` section often looks like the following::
105
email = John Doe <jdoe@isp.com>
106
editor = /usr/bin/vim
107
check_signatures = check-available
108
create_signatures = when-required
110
``$HOME/.bazaar/locations.conf`` allows one to specify overriding settings for a
111
specific branch. The format is almost identical to the default section in
112
bazaar.conf with one significant change: The section header, instead of
113
saying default, will be the path to a branch that you wish to override a
114
value for. The '?' and '*' wildcards are supported::
116
[/home/jdoe/branches/nethack]
117
email = Nethack Admin <nethack@nethack.com>
119
[http://hypothetical.site.com/branches/devel-branch]
120
create_signatures = always
121
check_signatures = always
123
[http://bazaar-vcs.org/bzr/*]
124
check_signatures = require
126
Common Variable Options
127
=======================
131
The email address to use when committing a branch. Typically takes the form
134
email = Full Name <account@hostname.tld>
138
The path of the editor that you wish to use if *bzr commit* is run without
139
a commit message. This setting is trumped by the environment variable
140
``$BZR_EDITOR``, and overrides ``$VISUAL`` and ``$EDITOR``.
144
Defines the behavior for signatures.
147
The gnupg signature for revisions must be present and must be valid.
150
Do not check gnupg signatures of revisions.
153
(default) If gnupg signatures for revisions are present, check them.
154
Bazaar will fail if it finds a bad signature, but will not fail if
155
no signature is present.
159
Defines the behaviour of signing revisions.
162
Sign every new revision that is committed.
165
(default) Sign newly committed revisions only when the branch requires
169
Refuse to sign newly committed revisions, even if the branch
174
Only useful in ``locations.conf``. Defines whether or not the
175
configuration for this section applies to subdirectories:
178
(default) This section applies to subdirectories as well.
181
This section only applies to the branch at this directory and not
186
(Default: "gpg"). Which program should be used to sign and check revisions.
189
gpg_signing_command = /usr/bin/gnpg
193
(Default: "bzr"). The path to the command that should be used to run the smart
194
server for bzr. This value may only be specified in locations.conf, because:
196
- it's needed before branch.conf is accessible
197
- allowing remote branch.conf files to specify commands would be a security
200
It is overridden by the BZR_REMOTE_PATH environment variable.
204
(Default: "localhost"). SMTP server to use when Bazaar needs to send
205
email, eg. with ``merge-directive --mail-to``, or the bzr-email plugin.
207
smtp_username, smtp_password
208
----------------------------
209
User and password to authenticate to the SMTP server. If smtp_username
210
is set, and smtp_password is not, Bazaar will prompt for a password.
211
These settings are only needed if the SMTP server requires authentication
216
A mail client to use for sending merge requests.
217
By default, bzr will try to use ``mapi`` on Windows. On other platforms, it
218
will try ``xdg-email``. If either of these fails, it will fall back to
221
Supported values for specific clients:
223
:evolution: Use Evolution.
226
:thunderbird: Use Mozilla Thunderbird or Icedove. For Thunderbird/Icedove 1.5,
227
this works around some bugs that xdg-email doesn't handle.
229
Supported generic values are:
232
:editor: Use your editor to compose the merge request. This also uses
233
your commit id, (see ``bzr whoami``), smtp_server and (optionally)
234
smtp_username and smtp_password.
235
:mapi: Use your preferred e-mail client on Windows.
236
:xdg-email: Use xdg-email to run your preferred mail program
240
The branch you intend to submit your current work to. This is automatically
241
set by ``bzr send``, and is also used by the ``submit:`` revision spec. This
242
should usually be set on a per-branch or per-location basis.
246
A publically-accessible version of this branch (implying that this version is
247
not publically-accessible). Used (and set) by ``bzr send``.
253
These options apply only to branches that use the "experimental-branch6"
254
format. They are usually set in ``.bzr/branch/branch.conf`` automatically, but
255
may be manually set in ``locations.conf`` or ``bazaar.conf``.
257
append_revisions_only
258
---------------------
259
If set to "True" then revisions can only be appended to the log, not
260
removed. A branch with this setting enabled can only pull from
261
another branch if the other branch's log is a longer version of its
262
own. This is normally set by ``bzr init --append-revisions-only``.
266
If present, the location of the default branch for pull or merge.
267
This option is normally set by ``pull --remember`` or ``merge
272
If present, the location of the default branch for push. This option
273
is normally set by ``push --remember``.
277
The location that commits should go to when acting as a checkout.
278
This option is normally set by ``bind``.
282
If set to "True", the branch should act as a checkout, and push each commit to
283
the bound_location. This option is normally set by ``bind``/``unbind``.