Mercurial > hg
changeset 27566:5d6f984c8375
commandserver: reset state of progress bar per command
A progress bar is normally disabled in command-server session, but chg can
enable it. This patch makes sure the last-print time is measured per command.
Otherwise, progress.delay could be ineffective if a progbar was loaded before
forking worker process.
This patch is corresponding to the following change.
https://bitbucket.org/yuja/chg/commits/2dfe3e90b365
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 14 Dec 2015 23:50:02 +0900 |
parents | e7937438e3f7 |
children | 54bc0e884385 |
files | mercurial/commandserver.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commandserver.py Mon Dec 14 23:13:42 2015 +0900 +++ b/mercurial/commandserver.py Mon Dec 14 23:50:02 2015 +0900 @@ -214,6 +214,11 @@ self.repo.ui = self.repo.dirstate._ui = repoui self.repo.invalidateall() + # reset last-print time of progress bar per command + # (progbar is singleton, we don't have to do for all uis) + if copiedui._progbar: + copiedui._progbar.resetstate() + for ui in uis: # any kind of interaction must use server channels, but chg may # replace channels by fully functional tty files. so nontty is