--- a/mercurial/configitems.py Fri Jun 30 03:44:02 2017 +0200
+++ b/mercurial/configitems.py Fri Jun 30 03:44:04 2017 +0200
@@ -152,6 +152,9 @@
coreconfigitem('progress', 'clear-complete',
default=True,
)
+coreconfigitem('progress', 'estimate',
+ default=2,
+)
coreconfigitem('server', 'bundle1',
default=True,
)
--- a/mercurial/progress.py Fri Jun 30 03:44:02 2017 +0200
+++ b/mercurial/progress.py Fri Jun 30 03:44:04 2017 +0200
@@ -217,7 +217,7 @@
elapsed = now - self.starttimes[topic]
# experimental config: progress.estimate
if elapsed > float(
- self.ui.config('progress', 'estimate', default=2)):
+ self.ui.config('progress', 'estimate')):
seconds = (elapsed * (target - delta)) // delta + 1
return fmtremaining(seconds)
return ''
@@ -227,7 +227,7 @@
delta = pos - initialpos
elapsed = now - self.starttimes[topic]
if elapsed > float(
- self.ui.config('progress', 'estimate', default=2)):
+ self.ui.config('progress', 'estimate')):
return _('%d %s/sec') % (delta / elapsed, unit)
return ''