Commit Graph

8 Commits

Author SHA1 Message Date
Matt Mackall
8568a2cad9 progress: stop excessive clearing (issue4801)
The progress bar was being cleared on every write(), regardless of
whether it was currently displayed. This could foul up the display of
any writes that didn't include a linebreak.

In particular, the win32 mode of the color extension was turning
single prompt string writes into two writes, and the resulting
clear/write/clear/write pattern was making the prompt invisible.

We fix this by insisting that we have shown a progress bar and haven't
just cleared it (setting lastprint to 0).

Conveniently, the test suite already had instances of duplicate
clears.. that are now cleared up.
2016-05-06 17:53:06 -05:00
Matt Anderson
4dd1bfc11b 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.
2016-02-17 15:18:30 -08:00
Mads Kiilerich
09567db49a spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
Augie Fackler
b156fbc3ed progress: force a repaint of a printed progress bar after a clear()
This avoids some visual flickering of the progress bar in convert and
probably some other operations. Previously, a line of output would
erase the progress bar, and then it would wait `progress.refresh`
seconds (default of 0.1) before redrawing the progress bar. Now if
we've ever painted a progress bar, we schedule the progress bar for
immediate repainting on the next progress call, which helps lend the
illusion that the progress bar is "always" there. In practice, it's
merely there more of the time, but it ends up being a lot easier to
read during convert.
2015-09-26 00:10:48 -04:00
Gregory Szorc
733edbb319 progress: use absolute_import 2015-08-08 19:57:10 -07:00
Matt Mackall
db0a9a6103 progress: mark experimental option 2015-06-25 17:56:54 -05:00
Augie Fackler
200363343c 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.
2015-06-16 14:11:58 -04:00
Pierre-Yves David
c890b20511 progress: move most extension code into a 'mercurial.progress' module
This initiate the relocation of progress into core.
2015-06-07 17:19:20 -07:00