31
31
The order of precedence is
33
1. If the ``$BZR_EMAIL`` environment variable is set.
33
1. If the ``BZR_EMAIL`` environment variable is set.
34
34
#. If an email is set for your current branch in the ``locations.conf``
36
36
#. If an email is set four your current branch in the
37
37
``.bzr/branch/branch.conf`` file.
38
38
#. If an email is set in the ``bazaar.conf`` default configuration file.
39
#. If the `$EMAIL` environment variable is set.
39
#. If the `EMAIL` environment variable is set.
40
40
#. Bazaar will try to guess based on your username and the hostname.
42
42
To check on what Bazaar thinks your current email is, use the ``whoami``
61
61
Setting email via default configuration file
62
62
--------------------------------------------
64
To use the default ini file, create the file ``$HOME/.bazaar/bazaar.conf`` (on
65
Windows this is ``%APPDATA%\bazaar\2.0\bazaar.conf``) and set an email address
66
as shown below. Please note that the word DEFAULT is case sensitive, and
67
must be in upper-case.
64
To use the default ini file, create or edit the ``bazaar.conf`` file (in
65
``~/.bazaar/`` on Linix and in ``%APPDATA%\bazaar\2.0\`` in Windows)
66
and set an email address as shown below. Please note that the word DEFAULT
67
is case sensitive, and must be in upper-case.
71
71
email=Your Name <name@isp.com>
74
For more information on the ini file format, see ConfiguringBzr.
74
For more information on the ini file format, see `Configuration Settings`_ in
75
the Bazaar User Reference.
77
.. _Configuration Settings: ../user-reference/bzr_man.html#configuration-settings
76
79
Setting email on a per-branch basis
77
80
-----------------------------------
79
82
The second approach is to set email on a branch by branch basis by
80
using the ``$HOME/.bazaar/locations.conf`` configuration file,
83
using the ``locations.conf`` configuration file like this::
83
85
[/some/branch/location]
84
86
email=Your Name <name@other-isp.com>
89
91
Setting email via environment variable
90
92
--------------------------------------
91
The final method Bazaar will use is checking for the ``$BZR_EMAIL``
92
and ``$EMAIL`` environment variables. Generally, you would use this
93
The final method Bazaar will use is checking for the ``BZR_EMAIL``
94
and ``EMAIL`` environment variables. Generally, you would use this
93
95
method to override the email in a script context. If you would like
94
96
to set a general default, then please see the ini methods above.