/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2008-02-13 03:30:01 UTC
  • mfrom: (3221 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3224.
  • Revision ID: robertc@robertcollins.net-20080213033001-rw70ul0zb02ph856
Merge to fix conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
================
2
 
Setting up email
3
 
================
 
1
Configuring email
 
2
=================
4
3
 
5
 
Description of the various ways to specify to Bazaar your email address for
6
 
commits.
 
4
.. Description of the various ways to specify to Bazaar your email address for commits.
7
5
 
8
6
Why set up an email address with Bazaar?
9
 
========================================
 
7
----------------------------------------
 
8
 
10
9
Bazaar stores the specified email address in revisions when they're
11
10
created so that people can tell who commited which revisions.  The
12
11
email addresses are not verified, therefore they could be bogus, so
15
14
author of a revision for credit and/or blame.  :)
16
15
 
17
16
How to set up your email address 
18
 
================================
 
17
--------------------------------
 
18
 
19
19
Bazaar will try to guess an email address based on your username and the
20
20
hostname if none is set.  This will probably not be what you want, so three
21
21
ways exist to tell Bazaar what email to use:
30
30
 
31
31
The order of precedence is
32
32
 
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``
35
35
    file.
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.
41
41
 
42
42
To check on what Bazaar thinks your current email is, use the ``whoami``
46
46
    Joe Cool <joe@example.com>
47
47
    
48
48
Setting email via the 'whoami' command
49
 
======================================
 
49
--------------------------------------
 
50
 
50
51
You can use the whoami command to set your email globally::
51
52
 
52
 
    % bzr whoami 'Joe Cool <joe@example.com>'
 
53
    % bzr whoami "Joe Cool <joe@example.com>"
53
54
 
54
55
or only for the current branch::
55
56
 
56
 
    % bzr whoami --branch 'Joe Cool <joe@example.com>'
 
57
    % bzr whoami --branch "Joe Cool <joe@example.com>"
57
58
 
58
59
These modify your global ``bazaar.conf`` or branch ``branch.conf`` file, respectively.
59
60
 
60
61
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
64
 
as shown below.  Please note that the word DEFAULT is case sensitive, and
65
 
must be in upper-case.
 
62
--------------------------------------------
 
63
 
 
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.
66
68
::
67
69
 
68
70
    [DEFAULT]
69
71
    email=Your Name <name@isp.com>
70
72
 
71
73
 
72
 
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.
 
76
 
 
77
.. _Configuration Settings: ../user-reference/bzr_man.html#configuration-settings
73
78
 
74
79
Setting email on a per-branch basis
75
 
===================================
 
80
-----------------------------------
76
81
 
77
82
The second approach is to set email on a branch by branch basis by
78
 
using the ``$HOME/.bazaar/locations.conf`` configuration file,
79
 
thusly::
 
83
using the ``locations.conf`` configuration file like this::
80
84
 
81
85
    [/some/branch/location]
82
86
    email=Your Name <name@other-isp.com>
86
90
 
87
91
Setting email via environment variable
88
92
--------------------------------------
89
 
The final method Bazaar will use is checking for the ``$BZR_EMAIL``
90
 
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
91
95
method to override the email in a script context.  If you would like
92
96
to set a general default, then please see the ini methods above.
93
97
 
94
98
Concerns about spam
95
 
===================
 
99
-------------------
96
100
Some people want to avoid sharing their email address so as not to get
97
101
spam.  Bazaar will never disclose your email address, unless you publish
98
102
a branch or changeset in a public location.  It's recommended that you