Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/progress.py @ 41144:7b80406b8271
progress: move cached debug flag from progress.progbar to scmutil.progress
It's simpler this way. One possible drawback (and a possisble
advantage) is that we now check the debug flag once per topic, so
processes that generate new topics all the time will still check the
flag frequently.
Differential Revision: https://phab.mercurial-scm.org/D5528
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 08 Jan 2019 00:12:08 -0800 |
parents | 6603de284b0a |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
41143:8cf92ca92bfe | 41144:7b80406b8271 |
---|---|
102 float(self.ui.config( | 102 float(self.ui.config( |
103 'progress', 'changedelay'))) | 103 'progress', 'changedelay'))) |
104 self.order = self.ui.configlist('progress', 'format') | 104 self.order = self.ui.configlist('progress', 'format') |
105 self.estimateinterval = self.ui.configwith( | 105 self.estimateinterval = self.ui.configwith( |
106 float, 'progress', 'estimateinterval') | 106 float, 'progress', 'estimateinterval') |
107 # developer config: progress.debug | |
108 self.debug = self.ui.configbool('progress', 'debug') | |
109 | 107 |
110 def show(self, now, topic, pos, item, unit, total): | 108 def show(self, now, topic, pos, item, unit, total): |
111 if not shouldprint(self.ui): | 109 if not shouldprint(self.ui): |
112 return | 110 return |
113 termwidth = self.width() | 111 termwidth = self.width() |