5
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``.
7
Location of configuration file
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
25
16
An ini file has three types of contructs: section headers, section
26
17
variables and comments.
30
21
A comment is any line that starts with a "#" (sometimes called a "hash
31
22
mark", "pound sign" or "number sign"). Comment lines are ignored by
32
23
Bazaar when parsing ini files.
36
27
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::
28
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.
32
The only valid section header for bazaar.conf is [DEFAULT], which is case
33
senstive. The default section provides for setting variables which can be
34
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::
36
For locations.conf, the variables from the section with the longest matching
37
section header are used to the exclusion of other potentially valid section
38
headers. A section header uses the path for the branch as the section
39
header. Some examples include::
50
41
[http://mybranches.isp.com/~jdoe/branchdir]
51
42
[/home/jdoe/branches/]
57
49
A section variable resides within a section. A section variable contains a
58
variable name, an equals sign and a value. For example::
50
variable name, an equals sign and a value and generally takes the following
60
53
email = John Doe <jdoe@isp.com>
61
54
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
57
The main configuration file, bazaar.conf
95
58
----------------------------------------
97
The main configuration file, ``$HOME/.bazaar/bazaar.conf``, only allows one
98
section called ``[DEFAULT]``. This default section contains the default
60
The main configuration file, $HOME/.bazaar/bazaar.conf, only allows one
61
section called '''[DEFAULT]'''. This default section contains the default
99
62
configuration options for all branches. The default section can be
100
overriden by providing a branch-specific section in ``locations.conf``.
63
overriden by providing a branch specific section in locations.conf.
102
A typical ``bazaar.conf`` section often looks like the following::
65
A typical bazaar.conf section often looks like the following::
105
68
email = John Doe <jdoe@isp.com>
138
101
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``.
102
a commit log message. This setting is trumped by the environment variables
103
$BZREDITOR or $EDITOR.
144
107
Defines the behavior for signatures.
147
The gnupg signature for revisions must be present and must be valid.
110
the gnupg signature for revisions must be present and must be valid
150
Do not check gnupg signatures of revisions.
113
Do not check gnupg signatures of revisions.
153
116
(default) If gnupg signatures for revisions are present, check them.
154
117
Bazaar will fail if it finds a bad signature, but will not fail if
155
no signature is present.
118
no signature is present
157
120
create_signatures
158
121
-----------------
159
Defines the behaviour of signing revisions.
122
Defines the behaviour of signing revisions. Has three possible values:
123
always, never and when-requied.
162
Sign every new revision that is committed.
126
sign every new revision that is committed
165
129
(default) Sign newly committed revisions only when the branch requires
169
Refuse to sign newly committed revisions, even if the branch
133
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:
137
Only useful in locations.conf. Defines whether or not the configuration for
138
this section applies to subdirectories:
178
(default) This section applies to subdirectories as well.
141
(default) This section applies to subdirectories as well
181
144
This section only applies to the branch at this directory and not
184
147
gpg_signing_command
185
148
-------------------
186
149
(Default: "gpg"). Which program should be used to sign and check revisions.
189
152
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``.