5
Description of the various ways to specify to Bazaar your email address for
8
Why set up an email address with Bazaar?
9
========================================
10
Bazaar stores the specified email address in revisions when they're
11
created so that people can tell who commited which revisions. The
12
email addresses are not verified, therefore they could be bogus, so
13
you have to trust the people involved in your project. Additionally,
14
the email address in a revision gives others a way to contact the
15
author of a revision for credit and/or blame. :)
17
How to set up your email address
18
================================
19
Bazaar will try to guess an email address based on your username and the
1
Why set up an email address with Bazaar-NG?
2
===========================================
3
Bazaar-NG stores the claimed email address in revisions when they're
4
created, so that people can tell who commited which revisions. Of course,
5
people can change the email address claimed, so you have to trust the
6
people involved. Additionally, the email address in a revision gives
7
others a way to contact the author of a revision for credit and/or blame.
10
How to setup your email address
11
===============================
12
Bazaar-NG will try to guess an email address based on your username and the
20
13
hostname if none is set. This will probably not be what you want, so three
21
ways exist to tell Bazaar what email to use:
14
ways exist to tell Bazaar-NG what email to use
23
You can set your email in one of several configuration files. Like
24
other configuration values, you can set it in ``bazaar.conf`` as a
25
general setting. If you want to override the value for a particular
26
branch, or set of branches, you can use ``locations.conf``.
27
``.bzr/branch/branch.conf`` will also work, but will cause all commits
28
to that branch to use the same email address, even if someone else
16
* You can set your email in the default ini file,
17
* You can set emails per-branch in the branch specific ini file,
18
* Or your email can be set by an environmental variable.
31
20
The order of precedence is
33
1. If the ``$BZR_EMAIL`` environment variable is set.
34
#. If an email is set for your current branch in the ``locations.conf``
22
1. If the `$BZREMAIL` env variable is set, use it.
23
2. If an email is set for your current branch in the `locations.conf` ini
36
#. If an email is set four your current branch in the
37
``.bzr/branch/branch.conf`` file.
38
#. If an email is set in the ``bazaar.conf`` default configuration file.
39
#. If the `$EMAIL` environment variable is set.
40
#. Bazaar will try to guess based on your username and the hostname.
25
3. If an email is set in the `bazaar.conf` default ini file.
26
4. If the `$EMAIL` env variable is set.
27
5. Bazaar-NG will try to guess based on your username and the hostname.
42
To check on what Bazaar thinks your current email is, use the ``whoami``
29
To check on what Bazaar-NG thinks your current email is, use the '''whoami'''
43
30
("who am i?") command::
56
43
% bzr whoami --branch 'Joe Cool <joe@example.com>'
58
These modify your global ``bazaar.conf`` or branch ``branch.conf`` file, respectively.
45
These modify your global bazaar.conf or branch branch.conf file, respectively.
60
Setting email via default configuration file
61
============================================
62
To use the default ini file, create the file ``$HOME/.bazaar/bazaar.conf`` (on
63
Windows this is ``%APPDATA%\bazaar\2.0\bazaar.conf``) and set an email address
47
Setting email via default ini file
48
==================================
49
To use the default ini file, create the file `$HOME/.bazaar/bazaar.conf` (on
50
Windows this is `%APPDATA%\bazaar\2.0\bazaar.conf`) and set an email address
64
51
as shown below. Please note that the word DEFAULT is case sensitive, and
65
must be in upper-case.
52
must be in upper-case.::
69
55
email=Your Name <name@isp.com>
74
60
Setting email on a per-branch basis
75
61
===================================
77
The second approach is to set email on a branch by branch basis by
78
using the ``$HOME/.bazaar/locations.conf`` configuration file,
63
The second approach is to set email on a branch by branch basis by using the
64
`$HOME/.bazaar/locations.conf` ini file, thusly::
81
66
[/some/branch/location]
82
67
email=Your Name <name@other-isp.com>
84
This will set your email address in the branch at ``/some/branch/location``,
85
overriding the default specified in the ``bazaar.conf`` above.
87
Setting email via environment variable
88
--------------------------------------
89
The final method Bazaar will use is checking for the ``$BZR_EMAIL``
90
and ``$EMAIL`` environment variables. Generally, you would use this
91
method to override the email in a script context. If you would like
92
to set a general default, then please see the ini methods above.
69
This will set your email address in the branch at `/some/branch/location`,
70
overriding the default specified in the `bazaar.conf` above.
72
Setting email via environment
73
-----------------------------
74
The final method Bazaar-NG will use is checking for the `$BZREMAIL` and
75
`$EMAIL` environment variables. Generally, one would use this method to
76
override the email in a script context. If you would like to set a general
77
default, then please see the ini methods above.
96
82
Some people want to avoid sharing their email address so as not to get
97
spam. Bazaar will never disclose your email address, unless you publish
83
spam. Bazaar-NG will never disclose your email address, unless you publish
98
84
a branch or changeset in a public location. It's recommended that you
99
*do* use a real address, so that people can contact you about your work,
85
''do'' use a real address, so that people can contact you about your work,
100
86
but it's not required. You can use an address which is obfuscated, which
101
87
bounces, or which goes through an anti-spam service such as
102
88
`spamgourmet.com`.