~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/en/user-guide/configuring_bazaar.txt

  • Committer: Martin
  • Date: 2011-03-22 00:33:21 UTC
  • mto: This revision was merged to the branch mainline in revision 5731.
  • Revision ID: gzlist@googlemail.com-20110322003321-h3n4q806g759tk7v
Tweak function descriptions in delta header for clarity

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
If ``whoami`` is used without an argument, the current value is displayed.
18
18
 
 
19
Using a network proxy
 
20
---------------------
 
21
 
 
22
If your network requires that you use an HTTP proxy for outbound
 
23
connections, you must set the ``http_proxy`` variable.  If the proxy is
 
24
also required for https connections, you need to set ``https_proxy`` too.
 
25
If you need these and don't have them set, you may find that connections
 
26
to Launchpad or other external servers fail or time out.
 
27
 
 
28
On Unix you typically want to set these in ``/etc/environment`` or
 
29
``~/.bash_profile`` and on Windows in the user profile.
 
30
 
 
31
::
 
32
 
 
33
  http_proxy=http://proxy.example.com:3128/
 
34
  https_proxy=http://proxy.example.com:3128/
 
35
 
 
36
The ``no_proxy`` variable can be set to a comma-separated list of hosts
 
37
which shouldn't be reached by the proxy.  (See
 
38
<http://docs.python.org/library/urllib.html> for more details.)
 
39
 
 
40
 
19
41
Configuration files
20
42
-------------------
21
43
 
22
 
Configuration files are located in ``$HOME/.bazaar`` on Linux/Unix and
 
44
Configuration files are located in ``$HOME/.bazaar`` on Unix and
23
45
``C:\Documents and Settings\<username>\Application Data\Bazaar\2.0`` on
24
46
Windows. There are three primary configuration files in this location:
25
47
 
44
66
  email = Your Name <email@example.com>
45
67
 
46
68
For further details on the syntax and configuration settings supported, see
47
 
`Configuration Settings <../user-reference/bzr_man.html#configuration-settings>`_
 
69
`Configuration Settings <../user-reference/index.html#configuration-settings>`_
48
70
in the Bazaar User Reference.
49
71
 
50
72
 
 
73
Looking at the active configuration
 
74
-----------------------------------
 
75
 
 
76
To look at all the currently defined options, you can use the following
 
77
command::
 
78
 
 
79
  bzr config
 
80
 
 
81
``bzr`` implements some rules to decide where to get the value of a
 
82
configuration option.
 
83
 
 
84
The current policy is to examine the existing configurations files in a
 
85
given order for matching definitions.
 
86
 
 
87
  * ``locations.conf`` is searched first for a section whose name matches the
 
88
    location considered (working tree, branch or remote branch),
 
89
 
 
90
  * the current ``branch.conf`` is searched next,
 
91
 
 
92
  * ``bazaar.conf`` is searched next,
 
93
 
 
94
  * finally, some options can have default values generally defined in the
 
95
    code itself and not displayed by ``bzr config`` (see `Configuration
 
96
    Settings <../user-reference/index.html#configuration-settings>`_).
 
97
 
 
98
This is better understood by using ```bzr config`` with no arguments, which
 
99
will display some output of the form::
 
100
 
 
101
  locations:
 
102
    post_commit_to = commits@example.com
 
103
    news_merge_files = NEWS
 
104
  branch:
 
105
    parent_location = bzr+ssh://bazaar.launchpad.net/+branch/bzr/
 
106
    nickname = config-modify
 
107
    push_location = bzr+ssh://bazaar.launchpad.net/~vila/bzr/config-modify/
 
108
  bazaar:
 
109
    debug_flags = hpss,
 
110
 
 
111
Each configuration file is associated with a given scope whose name is
 
112
displayed before each set of defined options.
 
113
 
 
114
Modifying the active configuration
 
115
----------------------------------
 
116
 
 
117
To set an option to a given value use::
 
118
 
 
119
  bzr config opt=value
 
120
 
 
121
To remove an option use::
 
122
 
 
123
  bzr config --remove opt
 
124
 
 
125
 
51
126
Rule-based preferences
52
127
----------------------
53
128
 
56
131
``BZR_HOME/rules``.
57
132
 
58
133
For further information on how rules are searched and the detailed syntax of
59
 
the relevant files, see `Rules <../user-reference/bzr_man.html#rules>`_
 
134
the relevant files, see `Rules <../user-reference/index.html#rules>`_
60
135
in the Bazaar User Reference.
 
136
 
 
137
 
 
138
Escaping command lines
 
139
----------------------
 
140
 
 
141
When you give a program name or command line in configuration, you can quote
 
142
to include special characters or whitespace.  The same rules are used across
 
143
all platforms.
 
144
 
 
145
The rules are: strings surrounded by double-quotes are interpreted as single
 
146
"words" even if they contain whitespace, and backslash may be used to quote
 
147
quotation marks.  For example::
 
148
 
 
149
    BZR_EDITOR="C:\Program Files\My Editor\myeditor.exe"