Show More
@@ -183,6 +183,8 class progbar(object): | |||||
183 | return min(int(self.ui.config('progress', 'width', default=tw)), tw) |
|
183 | return min(int(self.ui.config('progress', 'width', default=tw)), tw) | |
184 |
|
184 | |||
185 | def estimate(self, topic, pos, total, now): |
|
185 | def estimate(self, topic, pos, total, now): | |
|
186 | if total is None: | |||
|
187 | return '' | |||
186 | initialpos = self.startvals[topic] |
|
188 | initialpos = self.startvals[topic] | |
187 | target = total - initialpos |
|
189 | target = total - initialpos | |
188 | delta = pos - initialpos |
|
190 | delta = pos - initialpos |
@@ -141,3 +141,9 test delay time estimates | |||||
141 | loop [==============================> ] 3/4 2h47m |
|
141 | loop [==============================> ] 3/4 2h47m | |
142 | \r (esc) |
|
142 | \r (esc) | |
143 |
|
143 | |||
|
144 | Time estimates should not fail when there's no end point: | |||
|
145 | $ hg -y loop -- -4 2>&1 | python $TESTDIR/filtercr.py | |||
|
146 | ||||
|
147 | loop [ <=> ] 2 | |||
|
148 | loop [ <=> ] 3 | |||
|
149 | \r (esc) |
General Comments 0
You need to be logged in to leave comments.
Login now