Show More
@@ -359,9 +359,6 b" coreconfigitem('progress', 'delay'," | |||
|
359 | 359 | coreconfigitem('progress', 'disable', |
|
360 | 360 | default=False, |
|
361 | 361 | ) |
|
362 | coreconfigitem('progress', 'estimate', | |
|
363 | default=2, | |
|
364 | ) | |
|
365 | 362 | coreconfigitem('progress', 'refresh', |
|
366 | 363 | default=0.1, |
|
367 | 364 | ) |
@@ -215,19 +215,15 b' class progbar(object):' | |||
|
215 | 215 | delta = pos - initialpos |
|
216 | 216 | if delta > 0: |
|
217 | 217 | elapsed = now - self.starttimes[topic] |
|
218 | # experimental config: progress.estimate | |
|
219 | if elapsed > float( | |
|
220 | self.ui.config('progress', 'estimate')): | |
|
221 | seconds = (elapsed * (target - delta)) // delta + 1 | |
|
222 | return fmtremaining(seconds) | |
|
218 | seconds = (elapsed * (target - delta)) // delta + 1 | |
|
219 | return fmtremaining(seconds) | |
|
223 | 220 | return '' |
|
224 | 221 | |
|
225 | 222 | def speed(self, topic, pos, unit, now): |
|
226 | 223 | initialpos = self.startvals[topic] |
|
227 | 224 | delta = pos - initialpos |
|
228 | 225 | elapsed = now - self.starttimes[topic] |
|
229 |
if elapsed > |
|
|
230 | self.ui.config('progress', 'estimate')): | |
|
226 | if elapsed > 0: | |
|
231 | 227 | return _('%d %s/sec') % (delta / elapsed, unit) |
|
232 | 228 | return '' |
|
233 | 229 |
General Comments 0
You need to be logged in to leave comments.
Login now