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``.
1
Location of configuration file
2
==============================
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, branches.conf, contains configuration information for specific
25
10
An ini file has three types of contructs: section headers, section
26
11
variables and comments.
30
15
A comment is any line that starts with a "#" (sometimes called a "hash
31
16
mark", "pound sign" or "number sign"). Comment lines are ignored by
32
Bazaar when parsing ini files.
17
Bazaar-NG when parsing ini files.
36
21
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::
22
of a line, typical section headers look 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.
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.
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::
30
For branches.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::
50
35
[http://mybranches.isp.com/~jdoe/branchdir]
51
36
[/home/jdoe/branches/]
57
43
A section variable resides within a section. A section variable contains a
58
variable name, an equals sign and a value. For example::
44
variable name, an equals sign and a value and generally takes the following
60
47
email = John Doe <jdoe@isp.com>
61
48
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
51
The main configuration file, bazaar.conf
95
52
----------------------------------------
97
The main configuration file, ``$HOME/.bazaar/bazaar.conf``, only allows one
98
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
99
56
configuration options for all branches. The default section can be
100
overriden by providing a branch-specific section in ``locations.conf``.
57
overriden by providing a branch specific section in branches.conf.
102
A typical ``bazaar.conf`` section often looks like the following::
59
A typical bazaar.conf section often looks like the following::
105
62
email = John Doe <jdoe@isp.com>
138
95
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``.
96
a commit log message. This setting is trumped by the environment variables
97
$BZREDITOR or $EDITOR.
144
101
Defines the behavior for signatures.
147
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
150
Do not check gnupg signatures of revisions.
107
Do not check gnupg signatures of revisions.
153
110
(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.
111
Bazaar-NG will fail if it finds a bad signature, but will not fail if
112
no signature is present
157
114
create_signatures
158
115
-----------------
159
Defines the behaviour of signing revisions.
116
Defines the behaviour of signing revisions. Has three possible values:
117
always, never and when-requied.
162
Sign every new revision that is committed.
120
sign every new revision that is committed
165
123
(default) Sign newly committed revisions only when the branch requires
169
Refuse to sign newly committed revisions, even if the branch
127
Refuse to sign newly committed revisions, even if the branch requires signatures
174
Only useful in ``locations.conf``. Defines whether or not the
175
configuration for this section applies to subdirectories:
131
Only useful in branches.conf. Defines whether or not the configuration for
132
this section applies to subdirectories:
178
(default) This section applies to subdirectories as well.
135
(default) This section applies to subdirectories as well
181
138
This section only applies to the branch at this directory and not
184
141
gpg_signing_command
185
142
-------------------
186
143
(Default: "gpg"). Which program should be used to sign and check revisions.
189
146
gpg_signing_command = /usr/bin/gnpg
193
(Default: "localhost"). SMTP server to use when Bazaar needs to send
194
email, eg. with ``merge-directive --mail-to``, or the bzr-email plugin.
196
smtp_username, smtp_password
197
----------------------------
198
User and password to authenticate to the SMTP server. If smtp_username
199
is set, and smtp_password is not, Bazaar will prompt for a password.
200
These settings are only needed if the SMTP server requires authentication
207
These options apply only to branches that use the "experimental-branch6"
208
format. They are usually set in ``.bzr/branch/branch.conf`` automatically, but
209
may be manually set in ``locations.conf`` or ``bazaar.conf``.
211
append_revisions_only
212
---------------------
213
If set to "True" then revisions can only be appended to the log, not
214
removed. A branch with this setting enabled can only pull from
215
another branch if the other branch's log is a longer version of its
216
own. This is normally set by ``bzr init --append-revisions-only``.
220
If present, the location of the default branch for pull or merge.
221
This option is normally set by ``pull --remember`` or ``merge
226
If present, the location of the default branch for push. This option
227
is normally set by ``push --remember``.
231
The location that commits should go to when acting as a checkout.
232
This option is normally set by ``bind``.
236
If set to "True", the branch should act as a checkout, and push each commit to
237
the bound_location. This option is normally set by ``bind``/``unbind``.