~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/configuration.txt

  • Committer: Wouter van Heyst
  • Date: 2006-06-07 16:05:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: larstiq@larstiq.dyndns.org-20060607160527-2b3649154d0e2e84
more code cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
====================
2
 
Bazaar configuration
3
 
====================
4
 
 
5
 
Information on how to configure Bazaar.
6
 
 
7
1
Location of configuration file
8
2
==============================
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
12
 
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, branches.conf, contains configuration information for specific
 
6
branches.
13
7
 
14
8
General Format
15
9
==============
16
10
An ini file has three types of contructs: section headers, section
17
11
variables and comments.
18
12
 
19
 
Comments
20
 
--------
 
13
comment
 
14
-------
21
15
A comment is any line that starts with a "#" (sometimes called a "hash
22
16
mark", "pound sign" or "number sign"). Comment lines are ignored by
23
 
Bazaar when parsing ini files.
 
17
Bazaar-NG when parsing ini files.
24
18
 
25
 
Section Headers
26
 
---------------
 
19
section header
 
20
--------------
27
21
A section header is a word enclosed in brackets that starts at the begining
28
 
of a line.  A typical section header looks like this::
 
22
of a line, typical section headers look like this::
29
23
 
30
24
    [DEFAULT]
31
25
 
32
 
The only valid section header for bazaar.conf is [DEFAULT], which is
33
 
case sensitive. The default section provides for setting variables
34
 
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.
35
29
 
36
 
For ``locations.conf``, the variables from the section with the
37
 
longest matching section header are used to the exclusion of other
38
 
potentially valid section headers. A section header uses the path for
39
 
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::
40
34
 
41
35
    [http://mybranches.isp.com/~jdoe/branchdir]
42
36
    [/home/jdoe/branches/]
43
37
 
44
38
 
45
39
 
46
 
Section Variables
 
40
section variables
47
41
-----------------
48
42
 
49
43
A section variable resides within a section. A section variable contains a
50
 
variable name, an equals sign and a value.  For example::
 
44
variable name, an equals sign and a value and generally takes the following
 
45
form::
51
46
 
52
47
    email            = John Doe <jdoe@isp.com>
53
48
    check_signatures = require
54
49
 
55
50
 
56
 
Variable Policies
57
 
-----------------
58
 
 
59
 
Variables defined in a section affect the named directory or URL plus
60
 
any locations they contain.  Policies can be used to change how a
61
 
variable value is interpreted for contained locations.  Currently
62
 
there are three policies available:
63
 
 
64
 
 none:
65
 
   the value is interpreted the same for contained locations.  This is
66
 
   the default behaviour.
67
 
 norecurse:
68
 
   the value is only used for the exact location specified by the
69
 
   section name.
70
 
 appendpath:
71
 
   for contained locations, any additional path components are
72
 
   appended to the value.
73
 
 
74
 
Policies are specified by keys with names of the form "$var:policy".
75
 
For example, to define the push location for a tree of branches, the
76
 
following could be used::
77
 
 
78
 
  [/top/location]
79
 
  push_location = sftp://example.com/location
80
 
  push_location:policy = appendpath
81
 
 
82
 
With this configuration, the push location for ``/top/location/branch1``
83
 
would be ``sftp://example.com/location/branch1``.
84
 
 
85
 
 
86
51
The main configuration file, bazaar.conf
87
52
----------------------------------------
88
53
 
89
 
The main configuration file, ``$HOME/.bazaar/bazaar.conf``, only allows one
90
 
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
91
56
configuration options for all branches. The default section can be
92
 
overriden by providing a branch-specific section in ``locations.conf``.
 
57
overriden by providing a branch specific section in branches.conf.
93
58
 
94
 
A typical ``bazaar.conf`` section often looks like the following::
 
59
A typical bazaar.conf section often looks like the following::
95
60
 
96
61
    [DEFAULT]
97
62
    email             = John Doe <jdoe@isp.com>
99
64
    check_signatures  = check-available
100
65
    create_signatures = when-required
101
66
 
102
 
``$HOME/.bazaar/locations.conf`` allows one to specify overriding settings for a
 
67
$HOME/.bazaar/branches.conf allows one to specify overriding settings for a
103
68
specific branch. The format is almost identical to the default section in
104
69
bazaar.conf with one significant change: The section header, instead of
105
70
saying default, will be the path to a branch that you wish to override a
106
 
value for. The '?' and '*' wildcards are supported::
 
71
value for. The ? and * wildcards are supported::
107
72
 
108
73
    [/home/jdoe/branches/nethack]
109
74
    email = Nethack Admin <nethack@nethack.com>
112
77
    create_signatures = always
113
78
    check_signatures  = always
114
79
 
115
 
    [http://bazaar-vcs.org/bzr/*]
 
80
    [http://bazaar-ng.org/bzr/*]
116
81
    check_signatures  = require
117
82
 
118
 
Common Variable Options
 
83
Common Variable options
119
84
=======================
120
85
 
121
86
email
128
93
editor
129
94
------
130
95
The path of the editor that you wish to use if *bzr commit* is run without
131
 
a commit log message. This setting is trumped by the environment variable
132
 
``$BZR_EDITOR``, and overrides ``$VISUAL`` and ``$EDITOR``.
 
96
a commit log message. This setting is trumped by the environment variables
 
97
$BZREDITOR or $EDITOR.
133
98
 
134
99
check_signatures
135
100
----------------
136
101
Defines the behavior for signatures.
137
102
 
138
103
require
139
 
    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
140
105
 
141
106
ignore
142
 
    Do not check gnupg signatures of revisions.
 
107
    Do not check gnupg signatures of revisions. 
143
108
 
144
109
check-available
145
110
    (default) If gnupg signatures for revisions are present, check them.
146
 
    Bazaar will fail if it finds a bad signature, but will not fail if
147
 
    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
148
113
 
149
114
create_signatures
150
115
-----------------
151
 
Defines the behaviour of signing revisions.
 
116
Defines the behaviour of signing revisions. Has three possible values:
 
117
always, never and when-requied.
152
118
 
153
119
always
154
 
    Sign every new revision that is committed.
 
120
    sign every new revision that is committed
155
121
 
156
122
when-required
157
123
    (default) Sign newly committed revisions only when the branch requires
158
 
    signed revisions.
 
124
    signed revisions
159
125
 
160
126
never
161
 
    Refuse to sign newly committed revisions, even if the branch
162
 
    requires signatures.
 
127
    Refuse to sign newly committed revisions, even if the branch requires signatures
163
128
 
164
129
recurse
165
130
-------
166
 
Only useful in ``locations.conf``. Defines whether or not the
167
 
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:
168
133
 
169
134
true
170
 
    (default) This section applies to subdirectories as well.
 
135
    (default) This section applies to subdirectories as well
171
136
 
172
137
false
173
138
    This section only applies to the branch at this directory and not
174
 
    branches below it.
 
139
    branches 
175
140
 
176
141
gpg_signing_command
177
142
-------------------
178
143
(Default: "gpg"). Which program should be used to sign and check revisions.
179
 
For example::
 
144
example::
180
145
 
181
146
    gpg_signing_command = /usr/bin/gnpg
182
147
 
183
 
smtp_server
184
 
-----------
185
 
(Default: "localhost"). SMTP server to use when Bazaar needs to send
186
 
email, eg. with ``merge-directive --mail-to``, or the bzr-email plugin.
187
 
 
188
 
smtp_username, smtp_password
189
 
----------------------------
190
 
User and password to authenticate to the SMTP server. If smtp_username
191
 
is set, and smtp_password is not, Bazaar will prompt for a password.
192
 
 
193
 
 
194
 
Branch 6 Options
195
 
================
196
 
 
197
 
These options apply only to branches that use the "experimental-branch6"
198
 
format.  They are usually set in ``.bzr/branch/branch.conf`` automatically, but
199
 
may be manually set in ``locations.conf`` or ``bazaar.conf``.
200
 
 
201
 
append_revisions_only
202
 
---------------------
203
 
If set to "True" then revisions can only be appended to the log, not
204
 
removed.  A branch with this setting enabled can only pull from
205
 
another branch if the other branch's log is a longer version of its
206
 
own.  This is normally set by ``bzr init --append-revisions-only``.
207
 
 
208
 
parent_location
209
 
---------------
210
 
If present, the location of the default branch for pull or merge.
211
 
This option is normally set by ``pull --remember`` or ``merge
212
 
--remember``
213
 
 
214
 
push_location
215
 
-------------
216
 
If present, the location of the default branch for push.  This option
217
 
is normally set by ``push --remember``.
218
 
 
219
 
bound_location
220
 
--------------
221
 
The location that commits should go to when acting as a checkout.
222
 
This option is normally set by ``bind``.
223
 
 
224
 
bound
225
 
-----
226
 
If set to "True", the branch should act as a checkout, and push each commit to
227
 
the bound_location.  This option is normally set by ``bind``/``unbind``.
228
 
 
229
 
 
230
 
Bug Tracker Options
231
 
===================
232
 
 
233
 
These options can go into bazaar.conf, branch.conf or into a branch-specific
234
 
configuration section in locations.conf.
235
 
 
236
 
bugzilla_<tracker_abbreviation>_url
237
 
-----------------------------------
238
 
If present, the location of the Bugzilla bug tracker referred to by
239
 
<tracker_abbreviation>. This option can then be used together with ``bzr commit
240
 
--fixes`` to mark bugs in that tracker as being fixed by that commit. For
241
 
example::
242
 
 
243
 
    bugzilla_squid_url = http://www.squid-cache.org/bugs
244
 
 
245
 
would allow ``bzr commit --fixes squid:1234`` to mark Squid's bug 1234 as
246
 
fixed.
247
 
 
248
 
trac_<tracker_abbrevation>_url
249
 
------------------------------
250
 
If present, the location of the Trac instance referred to by
251
 
<tracker_abbreviation>. This option can then be used together with ``bzr commit
252
 
--fixes`` to mark bugs in that tracker as being fixed by that commit. For
253
 
example::
254
 
 
255
 
    trac_twisted_url = http://www.twistedmatrix.com/trac
256
 
 
257
 
would allow ``bzr commit --fixes twisted:1234`` to mark Twisted's bug 1234 as
258
 
fixed.