~bzr-pqm/bzr/bzr.dev

1861.2.6 by Alexander Belchenko
branding: change Bazaar-NG to Bazaar
1
====================
2
Bazaar configuration
3
====================
1821.1.1 by Alexander Belchenko
win32 installer for bzr.dev.0.9
4
1861.2.6 by Alexander Belchenko
branding: change Bazaar-NG to Bazaar
5
Information on how to configure Bazaar.
1821.1.1 by Alexander Belchenko
win32 installer for bzr.dev.0.9
6
2513.1.8 by Martin Pool
Doc testing of exceptions
7
.. TODO: Should have some explanation of why you'd want things in
8
.. branch.conf.
9
2601.1.1 by James Westby
Split out bug tracker configuration in to its own file.
10
Location of configuration files
11
===============================
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
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``.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
16
2601.1.1 by James Westby
Split out bug tracker configuration in to its own file.
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``.
22
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
23
General Format
24
==============
25
An ini file has three types of contructs: section headers, section
26
variables and comments.
27
2120.6.14 by James Henstridge
Fix RST syntax as suggested by j-a-meinel
28
Comments
29
--------
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
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
1861.2.6 by Alexander Belchenko
branding: change Bazaar-NG to Bazaar
32
Bazaar when parsing ini files.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
33
2120.6.14 by James Henstridge
Fix RST syntax as suggested by j-a-meinel
34
Section Headers
35
---------------
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
36
A section header is a word enclosed in brackets that starts at the begining
2293.1.6 by Brad Crittenden
post review changes
37
of a line.  A typical section header looks like this::
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
38
39
    [DEFAULT]
40
2293.1.6 by Brad Crittenden
post review changes
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.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
44
2293.1.6 by Brad Crittenden
post review changes
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::
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
49
50
    [http://mybranches.isp.com/~jdoe/branchdir]
51
    [/home/jdoe/branches/]
52
53
2120.6.14 by James Henstridge
Fix RST syntax as suggested by j-a-meinel
54
Section Variables
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
55
-----------------
56
57
A section variable resides within a section. A section variable contains a
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
58
variable name, an equals sign and a value.  For example::
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
59
60
    email            = John Doe <jdoe@isp.com>
61
    check_signatures = require
62
63
2120.6.14 by James Henstridge
Fix RST syntax as suggested by j-a-meinel
64
Variable Policies
2120.6.13 by James Henstridge
update doc/configuration.txt with information about policies
65
-----------------
66
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:
71
2120.6.14 by James Henstridge
Fix RST syntax as suggested by j-a-meinel
72
 none:
73
   the value is interpreted the same for contained locations.  This is
74
   the default behaviour.
75
 norecurse:
76
   the value is only used for the exact location specified by the
77
   section name.
78
 appendpath:
79
   for contained locations, any additional path components are
80
   appended to the value.
2120.6.13 by James Henstridge
update doc/configuration.txt with information about policies
81
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
2120.6.14 by James Henstridge
Fix RST syntax as suggested by j-a-meinel
84
following could be used::
2120.6.13 by James Henstridge
update doc/configuration.txt with information about policies
85
86
  [/top/location]
87
  push_location = sftp://example.com/location
88
  push_location:policy = appendpath
89
2120.6.14 by James Henstridge
Fix RST syntax as suggested by j-a-meinel
90
With this configuration, the push location for ``/top/location/branch1``
91
would be ``sftp://example.com/location/branch1``.
2120.6.13 by James Henstridge
update doc/configuration.txt with information about policies
92
93
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
94
The main configuration file, bazaar.conf
95
----------------------------------------
96
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
97
The main configuration file, ``$HOME/.bazaar/bazaar.conf``, only allows one
98
section called ``[DEFAULT]``. This default section contains the default
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
99
configuration options for all branches. The default section can be
2293.1.6 by Brad Crittenden
post review changes
100
overriden by providing a branch-specific section in ``locations.conf``.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
101
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
102
A typical ``bazaar.conf`` section often looks like the following::
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
103
104
    [DEFAULT]
105
    email             = John Doe <jdoe@isp.com>
106
    editor            = /usr/bin/vim
107
    check_signatures  = check-available
108
    create_signatures = when-required
109
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
110
``$HOME/.bazaar/locations.conf`` allows one to specify overriding settings for a
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
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
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
114
value for. The '?' and '*' wildcards are supported::
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
115
116
    [/home/jdoe/branches/nethack]
117
    email = Nethack Admin <nethack@nethack.com>
118
119
    [http://hypothetical.site.com/branches/devel-branch]
120
    create_signatures = always
121
    check_signatures  = always
122
1861.2.8 by Alexander Belchenko
More branding: bazaar-ng -> Bazaar; bazaar-ng.org -> bazaar-vcs.org
123
    [http://bazaar-vcs.org/bzr/*]
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
124
    check_signatures  = require
125
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
126
Common Variable Options
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
127
=======================
128
129
email
130
-----
131
The email address to use when committing a branch. Typically takes the form
132
of::
133
134
    email = Full Name <account@hostname.tld>
135
136
editor
137
------
138
The path of the editor that you wish to use if *bzr commit* is run without
2601.1.1 by James Westby
Split out bug tracker configuration in to its own file.
139
a commit message. This setting is trumped by the environment variable
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
140
``$BZR_EDITOR``, and overrides ``$VISUAL`` and ``$EDITOR``.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
141
142
check_signatures
143
----------------
144
Defines the behavior for signatures.
145
146
require
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
147
    The gnupg signature for revisions must be present and must be valid.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
148
149
ignore
2376.4.35 by Jonathan Lange
Include configuration documentation for tracker config options.
150
    Do not check gnupg signatures of revisions.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
151
152
check-available
153
    (default) If gnupg signatures for revisions are present, check them.
1861.2.6 by Alexander Belchenko
branding: change Bazaar-NG to Bazaar
154
    Bazaar will fail if it finds a bad signature, but will not fail if
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
155
    no signature is present.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
156
157
create_signatures
158
-----------------
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
159
Defines the behaviour of signing revisions.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
160
161
always
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
162
    Sign every new revision that is committed.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
163
164
when-required
165
    (default) Sign newly committed revisions only when the branch requires
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
166
    signed revisions.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
167
168
never
2293.1.6 by Brad Crittenden
post review changes
169
    Refuse to sign newly committed revisions, even if the branch
170
    requires signatures.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
171
172
recurse
173
-------
2293.1.6 by Brad Crittenden
post review changes
174
Only useful in ``locations.conf``. Defines whether or not the
175
configuration for this section applies to subdirectories:
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
176
177
true
2293.1.6 by Brad Crittenden
post review changes
178
    (default) This section applies to subdirectories as well.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
179
180
false
181
    This section only applies to the branch at this directory and not
2376.4.35 by Jonathan Lange
Include configuration documentation for tracker config options.
182
    branches below it.
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
183
184
gpg_signing_command
185
-------------------
186
(Default: "gpg"). Which program should be used to sign and check revisions.
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
187
For example::
1610.2.1 by James Blackwell
Copied in docs for wiki & First round cleanup
188
189
    gpg_signing_command = /usr/bin/gnpg
190
2535.2.1 by Adeodato Simó
New SMTPConnection class, a reduced version of that in bzr-email.
191
smtp_server
192
-----------
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.
195
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.
2601.1.1 by James Westby
Split out bug tracker configuration in to its own file.
200
These settings are only needed if the SMTP server requires authentication
201
to send mail.
2535.2.1 by Adeodato Simó
New SMTPConnection class, a reduced version of that in bzr-email.
202
2230.3.43 by Aaron Bentley
Update docs
203
204
Branch 6 Options
205
================
206
207
These options apply only to branches that use the "experimental-branch6"
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
208
format.  They are usually set in ``.bzr/branch/branch.conf`` automatically, but
209
may be manually set in ``locations.conf`` or ``bazaar.conf``.
2230.3.43 by Aaron Bentley
Update docs
210
211
append_revisions_only
212
---------------------
2293.1.6 by Brad Crittenden
post review changes
213
If set to "True" then revisions can only be appended to the log, not
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
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``.
2230.3.43 by Aaron Bentley
Update docs
217
218
parent_location
219
---------------
220
If present, the location of the default branch for pull or merge.
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
221
This option is normally set by ``pull --remember`` or ``merge
2601.1.1 by James Westby
Split out bug tracker configuration in to its own file.
222
--remember``.
2230.3.43 by Aaron Bentley
Update docs
223
224
push_location
225
-------------
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
226
If present, the location of the default branch for push.  This option
227
is normally set by ``push --remember``.
2230.3.43 by Aaron Bentley
Update docs
228
229
bound_location
230
--------------
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
231
The location that commits should go to when acting as a checkout.
232
This option is normally set by ``bind``.
2230.3.43 by Aaron Bentley
Update docs
233
234
bound
235
-----
236
If set to "True", the branch should act as a checkout, and push each commit to
2293.1.3 by Brad Crittenden
Updated version_info.txt for grammar changes
237
the bound_location.  This option is normally set by ``bind``/``unbind``.
2376.4.35 by Jonathan Lange
Include configuration documentation for tracker config options.
238