~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Matthieu Moy
  • Date: 2006-07-13 14:10:11 UTC
  • mto: (1558.16.5 revert-missing)
  • mto: This revision was merged to the branch mainline in revision 1908.
  • Revision ID: Matthieu.Moy@imag.fr-20060713141011-959489ab273e0f82
BZREMAIL renamed to BZR_EMAIL.

Keep support for BZREMAIL with a deprecation warning.

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()