Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/mercurial/mail.py Wed Dec 19 10:11:32 2007 +0100 +++ b/mercurial/mail.py Wed Dec 19 11:56:19 2007 -0500 @@ -30,6 +30,8 @@ s.ehlo() username = ui.config('smtp', 'username') password = ui.config('smtp', 'password') + if username and not password: + password = ui.getpass() if username and password: ui.note(_('(authenticating to mail server as %s)\n') % (username))