diff -r 476069509e72 -r 9336bc7dca8e mercurial/ui.py --- a/mercurial/ui.py Tue Apr 29 12:37:36 2014 +0900 +++ b/mercurial/ui.py Sat Apr 26 18:13:06 2014 +0900 @@ -689,7 +689,12 @@ return default try: self.write_err(self.label(prompt or _('password: '), 'ui.prompt')) - return getpass.getpass('') + # disable getpass() only if explicitly specified. it's still valid + # to interact with tty even if fin is not a tty. + if self.configbool('ui', 'nontty'): + return self.fin.readline().rstrip('\n') + else: + return getpass.getpass('') except EOFError: raise util.Abort(_('response expected')) def status(self, *msg, **opts):