5
Information on how to configure Bazaar.
8
.. TODO: Should have some explanation of why you'd want things in
11
1
Location of configuration file
12
2
==============================
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``.
3
Each user gets a pair of configurations files in $HOME/.bazaar. The first
4
one, named bazaar.conf, includes default configuration options. The other
5
file, locations.conf, contains configuration information for specific
20
10
An ini file has three types of contructs: section headers, section
21
11
variables and comments.
25
15
A comment is any line that starts with a "#" (sometimes called a "hash
26
16
mark", "pound sign" or "number sign"). Comment lines are ignored by
27
Bazaar when parsing ini files.
17
Bazaar-NG when parsing ini files.
31
21
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::
22
of a line, typical section headers look 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.
26
The only valid section header for bazaar.conf is [DEFAULT], which is case
27
senstive. The default section provides for setting variables which can be
28
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::
30
For locations.conf, the variables from the section with the longest matching
31
section header are used to the exclusion of other potentially valid section
32
headers. A section header uses the path for the branch as the section
33
header. Some examples include::
45
35
[http://mybranches.isp.com/~jdoe/branchdir]
46
36
[/home/jdoe/branches/]
53
43
A section variable resides within a section. A section variable contains a
54
variable name, an equals sign and a value. For example::
44
variable name, an equals sign and a value and generally takes the following
56
47
email = John Doe <jdoe@isp.com>
57
48
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
51
The main configuration file, bazaar.conf
91
52
----------------------------------------
93
The main configuration file, ``$HOME/.bazaar/bazaar.conf``, only allows one
94
section called ``[DEFAULT]``. This default section contains the default
54
The main configuration file, $HOME/.bazaar/bazaar.conf, only allows one
55
section called '''[DEFAULT]'''. This default section contains the default
95
56
configuration options for all branches. The default section can be
96
overriden by providing a branch-specific section in ``locations.conf``.
57
overriden by providing a branch specific section in locations.conf.
98
A typical ``bazaar.conf`` section often looks like the following::
59
A typical bazaar.conf section often looks like the following::
101
62
email = John Doe <jdoe@isp.com>
134
95
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``.
96
a commit log message. This setting is trumped by the environment variables
97
$BZREDITOR or $EDITOR.
140
101
Defines the behavior for signatures.
143
The gnupg signature for revisions must be present and must be valid.
104
the gnupg signature for revisions must be present and must be valid
146
Do not check gnupg signatures of revisions.
107
Do not check gnupg signatures of revisions.
149
110
(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.
111
Bazaar-NG will fail if it finds a bad signature, but will not fail if
112
no signature is present
153
114
create_signatures
154
115
-----------------
155
Defines the behaviour of signing revisions.
116
Defines the behaviour of signing revisions. Has three possible values:
117
always, never and when-requied.
158
Sign every new revision that is committed.
120
sign every new revision that is committed
161
123
(default) Sign newly committed revisions only when the branch requires
165
Refuse to sign newly committed revisions, even if the branch
127
Refuse to sign newly committed revisions, even if the branch requires signatures
170
Only useful in ``locations.conf``. Defines whether or not the
171
configuration for this section applies to subdirectories:
131
Only useful in locations.conf. Defines whether or not the configuration for
132
this section applies to subdirectories:
174
(default) This section applies to subdirectories as well.
135
(default) This section applies to subdirectories as well
177
138
This section only applies to the branch at this directory and not
180
141
gpg_signing_command
181
142
-------------------
182
143
(Default: "gpg"). Which program should be used to sign and check revisions.
185
146
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