1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
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. |
|
8 |
:) |
|
9 |
||
10 |
How to setup your email address |
|
11 |
=============================== |
|
12 |
Bazaar-NG will try to guess an email address based on your username and the |
|
13 |
hostname if none is set. This will probably not be what you want, so three |
|
1610.2.2
by James Blackwell
Now they look good in rst2html |
14 |
ways exist to tell Bazaar-NG what email to use |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
15 |
|
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. |
|
19 |
||
1610.2.2
by James Blackwell
Now they look good in rst2html |
20 |
The order of precedence is |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
21 |
|
22 |
1. If the `$BZREMAIL` env variable is set, use it. |
|
1770.2.2
by Aaron Bentley
Rename branches.conf to locations.conf |
23 |
2. If an email is set for your current branch in the `locations.conf` ini |
24 |
file. |
|
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
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. |
|
28 |
||
29 |
To check on what Bazaar-NG thinks your current email is, use the '''whoami''' |
|
30 |
("who am i?") command:: |
|
31 |
||
32 |
% bzr whoami |
|
33 |
Joe Cool <joe@example.com> |
|
34 |
||
35 |
Setting email via default ini file |
|
36 |
================================== |
|
37 |
The first method is using the default ini file. To use the default ini |
|
38 |
method, create the file `$HOME/.bazaar/bazaar.conf` (on Windows this is |
|
39 |
`%APPDATA%\bazaar\2.0\bazaar.conf`) and set an email address as shown |
|
40 |
below. Please note that the word DEFAULT is case sensitive, and must be in |
|
41 |
upper-case.:: |
|
42 |
||
43 |
[DEFAULT] |
|
44 |
email=Your Name <name@isp.com> |
|
45 |
||
46 |
||
47 |
For more information on the ini file format, see ConfiguringBzr. |
|
48 |
||
49 |
Setting email on a per-branch basis |
|
50 |
=================================== |
|
51 |
||
52 |
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 |
53 |
`$HOME/.bazaar/locations.conf` ini file, thusly:: |
1610.2.1
by James Blackwell
Copied in docs for wiki & First round cleanup |
54 |
|
55 |
[/some/branch/location] |
|
56 |
email=Your Name <name@other-isp.com> |
|
57 |
||
58 |
This will set your email address in the branch at `/some/branch/location`, |
|
59 |
overriding the default specified in the `bazaar.conf` above. |
|
60 |
||
61 |
Setting email via environment |
|
62 |
----------------------------- |
|
63 |
The final method Bazaar-NG will use is checking for the `$BZREMAIL` and |
|
64 |
`$EMAIL` environment variables. Generally, one would use this method to |
|
65 |
override the email in a script context. If you would like to set a general |
|
66 |
default, then please see the ini methods above. |
|
67 |
||
68 |
||
69 |
Concerns for spam |
|
70 |
================= |
|
71 |
Some people want to avoid sharing their email address so as not to get |
|
72 |
spam. Bazaar-NG will never disclose your email address, unless you publish |
|
73 |
a branch or changeset in a public location. It's recommended that you |
|
74 |
''do'' use a real address, so that people can contact you about your work, |
|
75 |
but it's not required. You can use an address which is obfuscated, which |
|
76 |
bounces, or which goes through an anti-spam service such as |
|
77 |
`spamgourmet.com`. |