~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-08-18 04:25:42 UTC
  • Revision ID: mbp@sourcefrog.net-20050818042542-6af9da978f695195
- check for email address in BRANCH_ROOT/.bzr/email, so you can 
  easily use different per-project personas

Show diffs side-by-side

added added

removed removed

Lines of Context:
1381
1381
    takes_options = ['email']
1382
1382
    
1383
1383
    def run(self, email=False):
 
1384
        try:
 
1385
            b = bzrlib.branch.find_branch('.')
 
1386
        except:
 
1387
            b = None
 
1388
        
1384
1389
        if email:
1385
 
            print bzrlib.osutils.user_email()
 
1390
            print bzrlib.osutils.user_email(b)
1386
1391
        else:
1387
 
            print bzrlib.osutils.username()
 
1392
            print bzrlib.osutils.username(b)
1388
1393
 
1389
1394
 
1390
1395
class cmd_selftest(Command):