1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
1 |
================ |
2 |
Setting up email |
|
3 |
================ |
|
4 |
||
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
5 |
The various ways that exist to tell Bazaar your email address for |
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
6 |
commits. |
7 |
||
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
8 |
Why set up an email address with Bazaar? |
9 |
======================================== |
|
10 |
Bazaar stores the claimed email address in revisions when they're |
|
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
11 |
created, so that people can tell who commited which revisions. Of course, |
12 |
people can change the email address claimed, so you have to trust the |
|
13 |
people involved. Additionally, the email address in a revision gives |
|
14 |
others a way to contact the author of a revision for credit and/or blame. |
|
15 |
:) |
|
16 |
||
17 |
How to setup your email address |
|
18 |
=============================== |
|
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
19 |
Bazaar will try to guess an email address based on your username and the |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
20 |
hostname if none is set. This will probably not be what you want, so three |
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
21 |
ways exist to tell Bazaar what email to use |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
22 |
|
23 |
* You can set your email in the default ini file, |
|
24 |
* You can set emails per-branch in the branch specific ini file, |
|
25 |
* Or your email can be set by an environmental variable. |
|
26 |
||
1610.2.2
by James Blackwell
Now they look good in rst2html |
27 |
The order of precedence is |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
28 |
|
29 |
1. If the `$BZREMAIL` env variable is set, use it. |
|
1770.2.2
by Aaron Bentley
Rename branches.conf to locations.conf |
30 |
2. If an email is set for your current branch in the `locations.conf` ini |
31 |
file. |
|
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
32 |
3. If an email is set in the `bazaar.conf` default ini file. |
33 |
4. If the `$EMAIL` env variable is set. |
|
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
34 |
5. Bazaar will try to guess based on your username and the hostname. |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
35 |
|
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
36 |
To check on what Bazaar thinks your current email is, use the '''whoami''' |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
37 |
("who am i?") command:: |
38 |
||
39 |
% bzr whoami |
|
40 |
Joe Cool <joe@example.com> |
|
1816.2.8
by Robey Pointer
ammend setting_up_email to mention that 'whoami' can now be used |
41 |
|
42 |
Setting email via the 'whoami' command |
|
43 |
====================================== |
|
44 |
You can use the whoami command to set your email globally:: |
|
45 |
||
46 |
% bzr whoami 'Joe Cool <joe@example.com>' |
|
47 |
||
48 |
or only for the current branch:: |
|
49 |
||
50 |
% bzr whoami --branch 'Joe Cool <joe@example.com>' |
|
51 |
||
52 |
These modify your global bazaar.conf or branch branch.conf file, respectively. |
|
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
53 |
|
54 |
Setting email via default ini file |
|
55 |
================================== |
|
1816.2.8
by Robey Pointer
ammend setting_up_email to mention that 'whoami' can now be used |
56 |
To use the default ini file, create the file `$HOME/.bazaar/bazaar.conf` (on |
57 |
Windows this is `%APPDATA%\bazaar\2.0\bazaar.conf`) and set an email address |
|
58 |
as shown below. Please note that the word DEFAULT is case sensitive, and |
|
59 |
must be in upper-case.:: |
|
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
60 |
|
61 |
[DEFAULT] |
|
62 |
email=Your Name <name@isp.com> |
|
63 |
||
64 |
||
65 |
For more information on the ini file format, see ConfiguringBzr. |
|
66 |
||
67 |
Setting email on a per-branch basis |
|
68 |
=================================== |
|
69 |
||
70 |
The second approach is to set email on a branch by branch basis by using the |
|
1770.2.2
by Aaron Bentley
Rename branches.conf to locations.conf |
71 |
`$HOME/.bazaar/locations.conf` ini file, thusly:: |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
72 |
|
73 |
[/some/branch/location] |
|
74 |
email=Your Name <name@other-isp.com> |
|
75 |
||
76 |
This will set your email address in the branch at `/some/branch/location`, |
|
77 |
overriding the default specified in the `bazaar.conf` above. |
|
78 |
||
79 |
Setting email via environment |
|
80 |
----------------------------- |
|
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
81 |
The final method Bazaar will use is checking for the `$BZREMAIL` and |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
82 |
`$EMAIL` environment variables. Generally, one would use this method to |
83 |
override the email in a script context. If you would like to set a general |
|
84 |
default, then please see the ini methods above. |
|
85 |
||
86 |
||
87 |
Concerns for spam |
|
88 |
================= |
|
89 |
Some people want to avoid sharing their email address so as not to get |
|
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
90 |
spam. Bazaar will never disclose your email address, unless you publish |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
91 |
a branch or changeset in a public location. It's recommended that you |
92 |
''do'' use a real address, so that people can contact you about your work, |
|
93 |
but it's not required. You can use an address which is obfuscated, which |
|
94 |
bounces, or which goes through an anti-spam service such as |
|
95 |
`spamgourmet.com`. |