Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/ui.py Thu May 21 22:41:18 2009 +0200 +++ b/mercurial/ui.py Thu May 21 20:59:36 2009 +0200 @@ -246,7 +246,10 @@ except: pass def interactive(self): - return self.configbool("ui", "interactive") or sys.stdin.isatty() + i = self.configbool("ui", "interactive", None) + if i is None: + return sys.stdin.isatty() + return i def _readline(self, prompt=''): if sys.stdin.isatty():