Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 33073:c41cbe98822c
configitems: register 'ui.interactive'
That item default value is a bit special (None) so this adds a second proof
that everything is still working fine.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 23 Jun 2017 17:19:29 +0200 |
parents | e70cbae4c4e6 |
children | d9962854a4a2 |
comparison
equal
deleted
inserted
replaced
33072:e70cbae4c4e6 | 33073:c41cbe98822c |
---|---|
1137 configuration variable or - if it is unset - when `sys.stdin' points | 1137 configuration variable or - if it is unset - when `sys.stdin' points |
1138 to a terminal device. | 1138 to a terminal device. |
1139 | 1139 |
1140 This function refers to input only; for output, see `ui.formatted()'. | 1140 This function refers to input only; for output, see `ui.formatted()'. |
1141 ''' | 1141 ''' |
1142 i = self.configbool("ui", "interactive", None) | 1142 i = self.configbool("ui", "interactive") |
1143 if i is None: | 1143 if i is None: |
1144 # some environments replace stdin without implementing isatty | 1144 # some environments replace stdin without implementing isatty |
1145 # usually those are non-interactive | 1145 # usually those are non-interactive |
1146 return self._isatty(self.fin) | 1146 return self._isatty(self.fin) |
1147 | 1147 |