mercurial/ui.py
changeset 40593 6f0941f4a184
parent 40592 83e571ea06a9
child 40594 234c2d8c9e48
equal deleted inserted replaced
40592:83e571ea06a9 40593:6f0941f4a184
  1462     def getpass(self, prompt=None, default=None):
  1462     def getpass(self, prompt=None, default=None):
  1463         if not self.interactive():
  1463         if not self.interactive():
  1464             return default
  1464             return default
  1465         try:
  1465         try:
  1466             self._writemsg(self._fmsgerr, prompt or _('password: '),
  1466             self._writemsg(self._fmsgerr, prompt or _('password: '),
  1467                            type='prompt')
  1467                            type='prompt', password=True)
  1468             # disable getpass() only if explicitly specified. it's still valid
  1468             # disable getpass() only if explicitly specified. it's still valid
  1469             # to interact with tty even if fin is not a tty.
  1469             # to interact with tty even if fin is not a tty.
  1470             with self.timeblockedsection('stdio'):
  1470             with self.timeblockedsection('stdio'):
  1471                 if self.configbool('ui', 'nontty'):
  1471                 if self.configbool('ui', 'nontty'):
  1472                     l = self._fin.readline()
  1472                     l = self._fin.readline()