Mercurial > public > mercurial-scm > hg
comparison mercurial/progress.py @ 25847:56674fd6dabc
progress: mark experimental option
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 25 Jun 2015 17:56:54 -0500 |
parents | 79c75459321e |
children | 1139d7cf9405 |
comparison
equal
deleted
inserted
replaced
25846:c55eac3f388d | 25847:56674fd6dabc |
---|---|
185 initialpos = self.startvals[topic] | 185 initialpos = self.startvals[topic] |
186 target = total - initialpos | 186 target = total - initialpos |
187 delta = pos - initialpos | 187 delta = pos - initialpos |
188 if delta > 0: | 188 if delta > 0: |
189 elapsed = now - self.starttimes[topic] | 189 elapsed = now - self.starttimes[topic] |
190 # experimental config: progress.estimate | |
190 if elapsed > float( | 191 if elapsed > float( |
191 self.ui.config('progress', 'estimate', default=2)): | 192 self.ui.config('progress', 'estimate', default=2)): |
192 seconds = (elapsed * (target - delta)) // delta + 1 | 193 seconds = (elapsed * (target - delta)) // delta + 1 |
193 return fmtremaining(seconds) | 194 return fmtremaining(seconds) |
194 return '' | 195 return '' |