comparison mercurial/progress.py @ 25581:79c75459321e

progress: respect ui.quiet (issue4726) Caught when I was running the hgsubversion testsuite and it started printing progress bars over top of my test output lines.
author Augie Fackler <augie@google.com>
date Tue, 16 Jun 2015 14:11:58 -0400
parents 93b8b0049932
children 56674fd6dabc
comparison
equal deleted inserted replaced
25580:a69983942fb4 25581:79c75459321e
15 15
16 def spacejoin(*args): 16 def spacejoin(*args):
17 return ' '.join(s for s in args if s) 17 return ' '.join(s for s in args if s)
18 18
19 def shouldprint(ui): 19 def shouldprint(ui):
20 return not ui.plain() and (ui._isatty(sys.stderr) or 20 return not (ui.quiet or ui.plain()) and (
21 ui.configbool('progress', 'assume-tty')) 21 ui._isatty(sys.stderr) or ui.configbool('progress', 'assume-tty'))
22 22
23 def fmtremaining(seconds): 23 def fmtremaining(seconds):
24 """format a number of remaining seconds in humain readable way 24 """format a number of remaining seconds in humain readable way
25 25
26 This will properly display seconds, minutes, hours, days if needed""" 26 This will properly display seconds, minutes, hours, days if needed"""
247 if self._oktoprint(now): 247 if self._oktoprint(now):
248 self.lastprint = now 248 self.lastprint = now
249 self.show(now, topic, *self.topicstates[topic]) 249 self.show(now, topic, *self.topicstates[topic])
250 finally: 250 finally:
251 self._refreshlock.release() 251 self._refreshlock.release()
252