# HG changeset patch # User Arun Thomas # Date 1198083379 18000 # Node ID 4fba4fee0718021277307929c9536672e39d296a # Parent 5957c7b5894a6833f30855af0a3a0b5e81179b77 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. diff -r 5957c7b5894a -r 4fba4fee0718 mercurial/mail.py --- 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))