5
Information on how to configure Bazaar.
8
.. TODO: Should have some explanation of why you'd want things in
11
Location of configuration file
12
==============================
13
Each user gets a pair of configurations files in ``$HOME/.bazaar``. The first
14
one, named ``bazaar.conf``, includes default configuration options. The other
15
file, ``locations.conf``, contains configuration information for specific
16
branch locations. These files are sometimes referred to as ``ini files``.
20
An ini file has three types of contructs: section headers, section
21
variables and comments.
25
A comment is any line that starts with a "#" (sometimes called a "hash
26
mark", "pound sign" or "number sign"). Comment lines are ignored by
27
Bazaar when parsing ini files.
31
A section header is a word enclosed in brackets that starts at the begining
32
of a line. A typical section header looks like this::
36
The only valid section header for bazaar.conf is [DEFAULT], which is
37
case sensitive. The default section provides for setting variables
38
which can be overridden with the branch config file.
40
For ``locations.conf``, the variables from the section with the
41
longest matching section header are used to the exclusion of other
42
potentially valid section headers. A section header uses the path for
43
the branch as the section header. Some examples include::
45
[http://mybranches.isp.com/~jdoe/branchdir]
46
[/home/jdoe/branches/]
53
A section variable resides within a section. A section variable contains a
54
variable name, an equals sign and a value. For example::
56
email = John Doe <jdoe@isp.com>
57
check_signatures = require
63
Variables defined in a section affect the named directory or URL plus
64
any locations they contain. Policies can be used to change how a
65
variable value is interpreted for contained locations. Currently
66
there are three policies available:
69
the value is interpreted the same for contained locations. This is
70
the default behaviour.
72
the value is only used for the exact location specified by the
75
for contained locations, any additional path components are
76
appended to the value.
78
Policies are specified by keys with names of the form "$var:policy".
79
For example, to define the push location for a tree of branches, the
80
following could be used::
83
push_location = sftp://example.com/location
84
push_location:policy = appendpath
86
With this configuration, the push location for ``/top/location/branch1``
87
would be ``sftp://example.com/location/branch1``.
90
The main configuration file, bazaar.conf
91
----------------------------------------
93
The main configuration file, ``$HOME/.bazaar/bazaar.conf``, only allows one
94
section called ``[DEFAULT]``. This default section contains the default
95
configuration options for all branches. The default section can be
96
overriden by providing a branch-specific section in ``locations.conf``.
98
A typical ``bazaar.conf`` section often looks like the following::
101
email = John Doe <jdoe@isp.com>
102
editor = /usr/bin/vim
103
check_signatures = check-available
104
create_signatures = when-required
106
``$HOME/.bazaar/locations.conf`` allows one to specify overriding settings for a
107
specific branch. The format is almost identical to the default section in
108
bazaar.conf with one significant change: The section header, instead of
109
saying default, will be the path to a branch that you wish to override a
110
value for. The '?' and '*' wildcards are supported::
112
[/home/jdoe/branches/nethack]
113
email = Nethack Admin <nethack@nethack.com>
115
[http://hypothetical.site.com/branches/devel-branch]
116
create_signatures = always
117
check_signatures = always
119
[http://bazaar-vcs.org/bzr/*]
120
check_signatures = require
122
Common Variable Options
123
=======================
127
The email address to use when committing a branch. Typically takes the form
130
email = Full Name <account@hostname.tld>
134
The path of the editor that you wish to use if *bzr commit* is run without
135
a commit log message. This setting is trumped by the environment variable
136
``$BZR_EDITOR``, and overrides ``$VISUAL`` and ``$EDITOR``.
140
Defines the behavior for signatures.
143
The gnupg signature for revisions must be present and must be valid.
146
Do not check gnupg signatures of revisions.
149
(default) If gnupg signatures for revisions are present, check them.
150
Bazaar will fail if it finds a bad signature, but will not fail if
151
no signature is present.
155
Defines the behaviour of signing revisions.
158
Sign every new revision that is committed.
161
(default) Sign newly committed revisions only when the branch requires
165
Refuse to sign newly committed revisions, even if the branch
170
Only useful in ``locations.conf``. Defines whether or not the
171
configuration for this section applies to subdirectories:
174
(default) This section applies to subdirectories as well.
177
This section only applies to the branch at this directory and not
182
(Default: "gpg"). Which program should be used to sign and check revisions.
185
gpg_signing_command = /usr/bin/gnpg
189
(Default: "localhost"). SMTP server to use when Bazaar needs to send
190
email, eg. with ``merge-directive --mail-to``, or the bzr-email plugin.
192
smtp_username, smtp_password
193
----------------------------
194
User and password to authenticate to the SMTP server. If smtp_username
195
is set, and smtp_password is not, Bazaar will prompt for a password.
201
These options apply only to branches that use the "experimental-branch6"
202
format. They are usually set in ``.bzr/branch/branch.conf`` automatically, but
203
may be manually set in ``locations.conf`` or ``bazaar.conf``.
205
append_revisions_only
206
---------------------
207
If set to "True" then revisions can only be appended to the log, not
208
removed. A branch with this setting enabled can only pull from
209
another branch if the other branch's log is a longer version of its
210
own. This is normally set by ``bzr init --append-revisions-only``.
214
If present, the location of the default branch for pull or merge.
215
This option is normally set by ``pull --remember`` or ``merge
220
If present, the location of the default branch for push. This option
221
is normally set by ``push --remember``.
225
The location that commits should go to when acting as a checkout.
226
This option is normally set by ``bind``.
230
If set to "True", the branch should act as a checkout, and push each commit to
231
the bound_location. This option is normally set by ``bind``/``unbind``.
237
These options can go into bazaar.conf, branch.conf or into a branch-specific
238
configuration section in locations.conf.
240
bugzilla_<tracker_abbreviation>_url
241
-----------------------------------
242
If present, the location of the Bugzilla bug tracker referred to by
243
<tracker_abbreviation>. This option can then be used together with ``bzr commit
244
--fixes`` to mark bugs in that tracker as being fixed by that commit. For
247
bugzilla_squid_url = http://www.squid-cache.org/bugs
249
would allow ``bzr commit --fixes squid:1234`` to mark Squid's bug 1234 as
252
trac_<tracker_abbrevation>_url
253
------------------------------
254
If present, the location of the Trac instance referred to by
255
<tracker_abbreviation>. This option can then be used together with ``bzr commit
256
--fixes`` to mark bugs in that tracker as being fixed by that commit. For
259
trac_twisted_url = http://www.twistedmatrix.com/trac
261
would allow ``bzr commit --fixes twisted:1234`` to mark Twisted's bug 1234 as