~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-08-06 23:57:30 UTC
  • mfrom: (1558.16.5 revert-missing)
  • Revision ID: pqm@pqm.ubuntu.com-20060806235730-876748deb30a3d2d
Moy: change BZREMAIL to BZR_EMAIL

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
    
168
168
        Something similar to 'Martin Pool <mbp@sourcefrog.net>'
169
169
        
170
 
        $BZREMAIL can be set to override this, then
 
170
        $BZR_EMAIL can be set to override this (as well as the
 
171
        deprecated $BZREMAIL), then
171
172
        the concrete policy type is checked, and finally
172
173
        $EMAIL is examined.
173
174
        If none is found, a reasonable default is (hopefully)
175
176
    
176
177
        TODO: Check it's reasonably well-formed.
177
178
        """
 
179
        v = os.environ.get('BZR_EMAIL')
 
180
        if v:
 
181
            return v.decode(bzrlib.user_encoding)
178
182
        v = os.environ.get('BZREMAIL')
179
183
        if v:
 
184
            warning('BZREMAIL is deprecated in favor of BZR_EMAIL. Please update your configuration.')
180
185
            return v.decode(bzrlib.user_encoding)
181
186
    
182
187
        v = self._get_user_id()