19
19
Using a network proxy
20
20
---------------------
22
If your network requires that you use an http proxy for outbound
22
If your network requires that you use an HTTP proxy for outbound
23
23
connections, you must set the ``http_proxy`` variable. If the proxy is
24
24
also required for https connections, you need to set ``https_proxy`` too.
25
25
If you need these and don't have them set, you may find that connections
37
37
which shouldn't be reached by the proxy. (See
38
38
<http://docs.python.org/library/urllib.html> for more details.)
40
Various ways to configure
41
-------------------------
43
As shown in the example above, there are various ways to
44
configure Bazaar, they all share some common properties though.
47
- a name which is generally a valid python identifier,
49
- a value which is a string. In some cases, Bazaar will be able
50
to recognize special values like 'True', 'False' to infer a
51
boolean type, but basically, as a user, you will always specify
54
Options are grouped in various contexts so the option name
55
uniquely identifies it in this context. When needed, options can
56
be made persistent by recording them in a configuration file.
41
59
Configuration files
42
60
-------------------
66
84
email = Your Name <email@example.com>
68
86
For further details on the syntax and configuration settings supported, see
69
`Configuration Settings <../user-reference/configuration-help.html>`_
87
`Configuration Settings <../user-reference/index.html#configuration-settings>`_
70
88
in the Bazaar User Reference.
91
Looking at the active configuration
92
-----------------------------------
94
To look at all the currently defined options, you can use the following
99
``bzr`` implements some rules to decide where to get the value of a
100
configuration option.
102
The current policy is to examine the existing configurations files in a
103
given order for matching definitions.
105
* ``locations.conf`` is searched first for a section whose name matches the
106
location considered (working tree, branch or remote branch),
108
* the current ``branch.conf`` is searched next,
110
* ``bazaar.conf`` is searched next,
112
* finally, some options can have default values generally defined in the
113
code itself and not displayed by ``bzr config`` (see `Configuration
114
Settings <../user-reference/index.html#configuration-settings>`_).
116
This is better understood by using ```bzr config`` with no arguments, which
117
will display some output of the form::
120
post_commit_to = commits@example.com
121
news_merge_files = NEWS
123
parent_location = bzr+ssh://bazaar.launchpad.net/+branch/bzr/
124
nickname = config-modify
125
push_location = bzr+ssh://bazaar.launchpad.net/~vila/bzr/config-modify/
129
Each configuration file is associated with a given scope whose name is
130
displayed before each set of defined options.
132
If you need to look at a specific option, you can use::
136
This will display only the option value and is intended to be used in
139
Modifying the active configuration
140
----------------------------------
142
To set an option to a given value use::
146
An option value can reference another option by enclosing it in curly
149
bzr config opt={other_opt}/subdir
151
If ``other_opt`` is set to ``'root``, ``bzr config opt`` will display::
155
Note that when ``--all`` is used, the references are left as-is to better
156
reflect the content of the config files and make it easier to organize them::
158
bzr config --all .*opt
162
opt = {other_opt}/subdir
169
To remove an option use::
171
bzr config --remove opt
73
174
Rule-based preferences
74
175
----------------------
78
179
``BZR_HOME/rules``.
80
181
For further information on how rules are searched and the detailed syntax of
81
the relevant files, see `Rules <../user-reference/rules-help.html>`_
182
the relevant files, see `Rules <../user-reference/index.html#rules>`_
82
183
in the Bazaar User Reference.
186
Escaping command lines
187
----------------------
189
When you give a program name or command line in configuration, you can quote
190
to include special characters or whitespace. The same rules are used across
193
The rules are: strings surrounded by double-quotes are interpreted as single
194
"words" even if they contain whitespace, and backslash may be used to quote
195
quotation marks. For example::
197
BZR_EDITOR="C:\Program Files\My Editor\myeditor.exe"