comparison mercurial/mail.py @ 5749:4fba4fee0718

Patchbomb: Prompt password when using SMTP/TLS and no password in .hgrc. If .hgrc specifies SMTP/TLS and a username without specifying a password, prompt for a password.
author Arun Thomas <arun.thomas@gmail.com>
date Wed, 19 Dec 2007 11:56:19 -0500
parents 23889160905a
children dc6ed2736c81
comparison
equal deleted inserted replaced
5748:5957c7b5894a 5749:4fba4fee0718
28 s.ehlo() 28 s.ehlo()
29 s.starttls() 29 s.starttls()
30 s.ehlo() 30 s.ehlo()
31 username = ui.config('smtp', 'username') 31 username = ui.config('smtp', 'username')
32 password = ui.config('smtp', 'password') 32 password = ui.config('smtp', 'password')
33 if username and not password:
34 password = ui.getpass()
33 if username and password: 35 if username and password:
34 ui.note(_('(authenticating to mail server as %s)\n') % 36 ui.note(_('(authenticating to mail server as %s)\n') %
35 (username)) 37 (username))
36 s.login(username, password) 38 s.login(username, password)
37 return s 39 return s