~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-07-12 21:53:00 UTC
  • mfrom: (1840.1.5 bzr.dev.whoami)
  • Revision ID: pqm@pqm.ubuntu.com-20060712215300-126aea223e34b65c
(robey) 'bzr whoami address' gives a warning if missing email address

Show diffs side-by-side

added added

removed removed

Lines of Context:
1830
1830
                self.outf.write(c.username() + '\n')
1831
1831
            return
1832
1832
 
 
1833
        # display a warning if an email address isn't included in the given name.
 
1834
        try:
 
1835
            config.extract_email_address(name)
 
1836
        except BzrError, e:
 
1837
            warning('"%s" does not seem to contain an email address.  '
 
1838
                    'This is allowed, but not recommended.', name)
 
1839
        
1833
1840
        # use global config unless --branch given
1834
1841
        if branch:
1835
1842
            c = Branch.open_containing('.')[0].get_config()