Patchwork D828: progress: remove progress.estimate config

login
register
mail settings
Submitter phabricator
Date Sept. 27, 2017, 11:48 p.m.
Message ID <375473a1b6cc61bd9fe7512ffb7989ed@localhost.localdomain>
Download mbox | patch
Permalink /patch/24190/
State Not Applicable
Headers show

Comments

phabricator - Sept. 27, 2017, 11:48 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf428c347d32b: progress: remove progress.estimate config (authored by quark, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D828?vs=2130&id=2133

REVISION DETAIL
  https://phab.mercurial-scm.org/D828

AFFECTED FILES
  mercurial/configitems.py
  mercurial/progress.py

CHANGE DETAILS




To: quark, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/progress.py b/mercurial/progress.py
--- a/mercurial/progress.py
+++ b/mercurial/progress.py
@@ -215,19 +215,15 @@ 
         delta = pos - initialpos
         if delta > 0:
             elapsed = now - self.starttimes[topic]
-            # experimental config: progress.estimate
-            if elapsed > float(
-                self.ui.config('progress', 'estimate')):
-                seconds = (elapsed * (target - delta)) // delta + 1
-                return fmtremaining(seconds)
+            seconds = (elapsed * (target - delta)) // delta + 1
+            return fmtremaining(seconds)
         return ''
 
     def speed(self, topic, pos, unit, now):
         initialpos = self.startvals[topic]
         delta = pos - initialpos
         elapsed = now - self.starttimes[topic]
-        if elapsed > float(
-            self.ui.config('progress', 'estimate')):
+        if elapsed > 0:
             return _('%d %s/sec') % (delta / elapsed, unit)
         return ''
 
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -359,9 +359,6 @@ 
 coreconfigitem('progress', 'disable',
     default=False,
 )
-coreconfigitem('progress', 'estimate',
-    default=2,
-)
 coreconfigitem('progress', 'refresh',
     default=0.1,
 )