Mercurial > public > mercurial-scm > hg-stable
diff mercurial/progress.py @ 28171:2d20d1d2ea76
progress: display progress bar when HGPLAINEXCEPT contains "progress"
This patch changes "progress.shouldprint()" so a feature name is provided to
"ui.plain()" to determine if there is an exception specificed in HGPLAINEXCEPT
for the progress extension.
This will allow user-facing scripts to provide progress output while HGPLAIN
is enabled.
author | Matt Anderson <andersonmat@fb.com> |
---|---|
date | Wed, 17 Feb 2016 15:18:30 -0800 |
parents | 1aee2ab0f902 |
children | 222b8170d69e |
line wrap: on
line diff
--- a/mercurial/progress.py Wed Feb 17 19:38:44 2016 +0000 +++ b/mercurial/progress.py Wed Feb 17 15:18:30 2016 -0800 @@ -18,7 +18,7 @@ return ' '.join(s for s in args if s) def shouldprint(ui): - return not (ui.quiet or ui.plain()) and ( + return not (ui.quiet or ui.plain('progress')) and ( ui._isatty(sys.stderr) or ui.configbool('progress', 'assume-tty')) def fmtremaining(seconds):