# HG changeset patch # User Augie Fackler # Date 1434478318 14400 # Node ID 79c75459321e1e14bf081a16947e7a03f6c8e5a5 # Parent a69983942fb4dbfdf5ca8c7a123120ed09ead5db 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. diff -r a69983942fb4 -r 79c75459321e mercurial/progress.py --- a/mercurial/progress.py Mon Jun 15 13:31:22 2015 -0500 +++ b/mercurial/progress.py Tue Jun 16 14:11:58 2015 -0400 @@ -17,8 +17,8 @@ return ' '.join(s for s in args if s) def shouldprint(ui): - return not ui.plain() and (ui._isatty(sys.stderr) or - ui.configbool('progress', 'assume-tty')) + return not (ui.quiet or ui.plain()) and ( + ui._isatty(sys.stderr) or ui.configbool('progress', 'assume-tty')) def fmtremaining(seconds): """format a number of remaining seconds in humain readable way @@ -249,4 +249,3 @@ self.show(now, topic, *self.topicstates[topic]) finally: self._refreshlock.release() - diff -r a69983942fb4 -r 79c75459321e tests/test-progress.t --- a/tests/test-progress.t Mon Jun 15 13:31:22 2015 -0500 +++ b/tests/test-progress.t Tue Jun 16 14:11:58 2015 -0400 @@ -76,7 +76,8 @@ loop [===============> ] 1/3\r (no-eol) (esc) loop [===============================> ] 2/3\r (no-eol) (esc) \r (no-eol) (esc) - +no progress with --quiet + $ hg -y loop 3 --quiet test nested short-lived topics (which shouldn't display with nestdelay):