Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 22675:4e64d255f1a8
ui: fix comment about non-interactive prompts
This fixes my earlier in-flight addition to Mads' change.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 02 Oct 2014 18:00:05 -0500 |
parents | 9ab18a912c44 |
children | 524b786bd54f |
comparison
equal
deleted
inserted
replaced
22674:06c8b58647b9 | 22675:4e64d255f1a8 |
---|---|
681 try: | 681 try: |
682 r = self._readline(self.label(msg, 'ui.prompt')) | 682 r = self._readline(self.label(msg, 'ui.prompt')) |
683 if not r: | 683 if not r: |
684 r = default | 684 r = default |
685 # sometimes self.interactive disagrees with isatty, | 685 # sometimes self.interactive disagrees with isatty, |
686 # show default response | 686 # show response provided on stdin when simulating |
687 if not util.isatty(self.fin): | 687 if not util.isatty(self.fin): |
688 self.write(r, "\n") | 688 self.write(r, "\n") |
689 return r | 689 return r |
690 except EOFError: | 690 except EOFError: |
691 raise util.Abort(_('response expected')) | 691 raise util.Abort(_('response expected')) |