Mercurial > hg
changeset 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 | a69983942fb4 |
children | 5fa399a0c385 |
files | mercurial/progress.py tests/test-progress.t |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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() -
--- 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):