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