ui: honor interactive=off even if isatty()
authorPatrick Mezard <pmezard@gmail.com>
Thu, 21 May 2009 20:59:36 +0200
changeset 8538 6419bc7b3d9c
parent 8537 b48a1e081f23
child 8539 9a4fe59b1eca
ui: honor interactive=off even if isatty()
mercurial/ui.py
--- 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():