Mercurial > hg
comparison mercurial/ui.py @ 8538:6419bc7b3d9c
ui: honor interactive=off even if isatty()
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Thu, 21 May 2009 20:59:36 +0200 |
parents | f9a80054dd3c |
children | 2ed353a413b1 |
comparison
equal
deleted
inserted
replaced
8537:b48a1e081f23 | 8538:6419bc7b3d9c |
---|---|
244 except: pass | 244 except: pass |
245 try: sys.stderr.flush() | 245 try: sys.stderr.flush() |
246 except: pass | 246 except: pass |
247 | 247 |
248 def interactive(self): | 248 def interactive(self): |
249 return self.configbool("ui", "interactive") or sys.stdin.isatty() | 249 i = self.configbool("ui", "interactive", None) |
250 if i is None: | |
251 return sys.stdin.isatty() | |
252 return i | |
250 | 253 |
251 def _readline(self, prompt=''): | 254 def _readline(self, prompt=''): |
252 if sys.stdin.isatty(): | 255 if sys.stdin.isatty(): |
253 try: | 256 try: |
254 # magically add command line editing support, where | 257 # magically add command line editing support, where |